Create target property WINDOWS_EXPORT_ALL_SYMBOLS to automatically generate a module definition file from MS-compatible .obj files and give it to the linker in order to export all symbols from the .dll part of a SHARED library.
6 lines
178 B
CMake
6 lines
178 B
CMake
add_library(autoexport2 SHARED sub.cxx)
|
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
|
# Try msvc "big" object format.
|
|
target_compile_options(autoexport2 PRIVATE /bigobj)
|
|
endif()
|