forked from Bananymous/banan-os
				
			
		
			
				
	
	
		
			21 lines
		
	
	
		
			883 B
		
	
	
	
		
			CMake
		
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			883 B
		
	
	
	
		
			CMake
		
	
	
	
| # This module is shared by multiple languages; use include blocker.
 | |
| include_guard()
 | |
| 
 | |
| macro(__banan_os_compiler_gnu lang)
 | |
|   set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-rpath,")
 | |
|   set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":")
 | |
|   set(CMAKE_SHARED_LIBRARY_RPATH_LINK_${lang}_FLAG "-Wl,-rpath-link,")
 | |
|   set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "-Wl,-soname,")
 | |
|   set(CMAKE_EXE_EXPORTS_${lang}_FLAG "-Wl,--export-dynamic")
 | |
| 
 | |
|   # Initialize link type selection flags.  These flags are used when
 | |
|   # building a shared library, shared module, or executable that links
 | |
|   # to other libraries to select whether to use the static or shared
 | |
|   # versions of the libraries.
 | |
|   foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
 | |
|     set(CMAKE_${type}_LINK_STATIC_${lang}_FLAGS "-Wl,-Bstatic")
 | |
|     set(CMAKE_${type}_LINK_DYNAMIC_${lang}_FLAGS "-Wl,-Bdynamic")
 | |
|   endforeach()
 | |
| 
 | |
| endmacro()
 |