8f86407cfd
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.
8 lines
285 B
CMake
8 lines
285 B
CMake
project(autoexport)
|
|
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${autoexport_BINARY_DIR}/bin)
|
|
add_subdirectory(sub)
|
|
add_library(autoexport SHARED hello.cxx world.cxx foo.c)
|
|
add_executable(say say.cxx)
|
|
target_link_libraries(say autoexport autoexport2)
|