Windows: Optionally generate DLL module definition files automatically

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.
This commit is contained in:
Bill Hoffman
2015-06-19 16:12:43 -04:00
committed by Brad King
parent 069aa93b55
commit 8f86407cfd
26 changed files with 455 additions and 3 deletions

View File

@@ -46,8 +46,10 @@ else()
set(_PLATFORM_LINK_FLAGS "")
endif()
set(CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS 1)
if(CMAKE_GENERATOR MATCHES "Visual Studio 6")
set (CMAKE_NO_BUILD_TYPE 1)
set(CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS 0) # not implemented for VS6
endif()
if(NOT CMAKE_NO_BUILD_TYPE AND CMAKE_GENERATOR MATCHES "Visual Studio")
set (CMAKE_NO_BUILD_TYPE 1)