CrucibleConfigureSharedLibraryExports.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
include_guard(GLOBAL) function(crucible_configure_shared_library_exports) # This makes it unnecessary to use a dllexport/dllimport macro for Windows if(MSVC) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON CACHE INTERNAL "") endif() # This makes backtraces work on ELF-based systems (i.e., Linux) if(UNIX AND NOT APPLE) if(CMAKE_EXE_LINKER_FLAGS) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -rdynamic" CACHE INTERNAL "") else() set(CMAKE_EXE_LINKER_FLAGS "-rdynamic" CACHE INTERNAL "") endif() endif() endfunction()