From 00503d387e60cd4ecda07c05bd501f5bb8df4f07 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 27 Feb 2014 16:22:28 -0500 Subject: Watcom: Fix creation of DLLs without any exported symbols Create each DLL import library by passing "option implib=..." to the linker for its SHARED library. This works even when there are no symbols to be exported. Leave the option out for MODULE libraries because we do not need an import library for them. For executables, retain the separate invocation of wlib because we want an import library only when the ENABLE_EXPORTS property is set, and in that case the project should provide symbols. Suggested-by: J Decker --- Modules/Platform/Windows-wcl386.cmake | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Modules/Platform/Windows-wcl386.cmake b/Modules/Platform/Windows-wcl386.cmake index 8a03b29..d61ea47 100644 --- a/Modules/Platform/Windows-wcl386.cmake +++ b/Modules/Platform/Windows-wcl386.cmake @@ -65,11 +65,10 @@ set(CMAKE_C_CREATE_PREPROCESSED_SOURCE set(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE " ${CMAKE_START_TEMP_FILE} ${CMAKE_WCL_QUIET} -dWIN32 -d+ -fo -pl -cc++ ${CMAKE_END_TEMP_FILE}") -set(CMAKE_CXX_CREATE_SHARED_MODULE - "wlink ${CMAKE_START_TEMP_FILE} system nt_dll ${CMAKE_WLINK_QUIET} name '' option caseexact file {} ${CMAKE_END_TEMP_FILE}") set(CMAKE_CXX_CREATE_SHARED_LIBRARY - ${CMAKE_CXX_CREATE_SHARED_MODULE} - ${CMAKE_CXX_CREATE_IMPORT_LIBRARY}) + "wlink ${CMAKE_START_TEMP_FILE} system nt_dll ${CMAKE_WLINK_QUIET} name '' option implib= option caseexact file {} ${CMAKE_END_TEMP_FILE}") +string(REPLACE " option implib=" "" + CMAKE_CXX_CREATE_SHARED_MODULE "${CMAKE_CXX_CREATE_SHARED_LIBRARY}") # create a C shared library set(CMAKE_C_CREATE_SHARED_LIBRARY ${CMAKE_CXX_CREATE_SHARED_LIBRARY}) -- cgit v0.12