mirror of
https://github.com/reactos/CMake.git
synced 2024-12-02 00:26:18 +00:00
4d72006bd6
Several platform-wide linker flag variables are defined in Modules/Platform/<os>.cmake files for C and then copied by the Modules/CMake<lang>Information.cmake file for each language. We now use this approach for the variables CMAKE_EXE_EXPORTS_${lang}_FLAG CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS to avoid duplication for multiple languages in each platform file.
14 lines
661 B
CMake
14 lines
661 B
CMake
IF(EXISTS /usr/include/dlfcn.h)
|
|
SET(CMAKE_DL_LIBS "")
|
|
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
|
|
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
|
|
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
|
|
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") # -rpath
|
|
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") # : or empty
|
|
SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,")
|
|
SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
|
|
SET(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
|
|
ENDIF(EXISTS /usr/include/dlfcn.h)
|
|
|
|
INCLUDE(Platform/UnixPaths)
|