Fix ExportImport test cmp0022NEW build on Watcom
The test uses generate_export_header(cmp0022OLD ...) to generate the cmp0022_export.h header used by both cmp0022OLD and cmp0022NEW. In the latter the _EXPORTS symbol does not match what the header expects so the library does not export anything. The Watcom linker does not like to create shared libraries that do not export any symbols. Fix this by setting the DEFINE_SYMBOL property on cmp0022NEW to match that of cmp0022OLD as the header expects.
This commit is contained in:
parent
574fec97fd
commit
295a42c96c
|
@ -240,6 +240,7 @@ target_include_directories(cmp0022OLD PUBLIC
|
||||||
)
|
)
|
||||||
cmake_policy(SET CMP0022 NEW)
|
cmake_policy(SET CMP0022 NEW)
|
||||||
add_library(cmp0022NEW SHARED cmp0022_vs6_1.cpp)
|
add_library(cmp0022NEW SHARED cmp0022_vs6_1.cpp)
|
||||||
|
set_property(TARGET cmp0022NEW PROPERTY DEFINE_SYMBOL cmp0022OLD_EXPORTS)
|
||||||
target_include_directories(cmp0022NEW PUBLIC
|
target_include_directories(cmp0022NEW PUBLIC
|
||||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR}>"
|
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR}>"
|
||||||
"$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/cmp0022>"
|
"$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/cmp0022>"
|
||||||
|
|
Loading…
Reference in New Issue