From 6b2ea919b35edc88e1e64347bdfae6d07e2b3336 Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Thu, 3 Mar 2016 16:53:54 -0500 Subject: [PATCH] buildsystem - on windows, dlls are versioned and have 'd' in debug mode i.e debug mode client lib is kdsoap1d.dll and in release mode it's kdsoap1.dll for both autogen and CMake buildsystems --- CMakeLists.txt | 2 +- kdsoap.pro | 4 ++-- src/KDSoapClient/CMakeLists.txt | 10 ++++++++-- src/KDSoapClient/KDSoapClient.pro | 3 +-- src/KDSoapServer/CMakeLists.txt | 10 ++++++++-- src/KDSoapServer/KDSoapServer.pro | 3 +-- variables.pri | 1 + 7 files changed, 22 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d71258099..18b7d1cb2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,7 +98,7 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR) if(UNIX) set(CMAKE_INSTALL_PREFIX "/usr/local/KDAB/${PROJECT_NAME}-${${PROJECT_NAME}_VERSION}") elseif(WIN32) - set(CMAKE_INSTALL_PREFIX "C:\\KDAB\\${PROJECT_NAME}-$$VERSION") + set(CMAKE_INSTALL_PREFIX "C:\\KDAB\\${PROJECT_NAME}-${${PROJECT_NAME}_VERSION}") endif() endif() diff --git a/kdsoap.pro b/kdsoap.pro index 225ab1f22..5548f19a5 100644 --- a/kdsoap.pro +++ b/kdsoap.pro @@ -64,8 +64,8 @@ CONFIG(debug, debug|release) { } !unix:!mac:!staticlib:VERSION_SUFFIX=$$MAJOR_VERSION -KDSOAPLIB = kdsoap$$DEBUG_SUFFIX$$VERSION_SUFFIX -KDSOAPSERVERLIB = kdsoap-server$$DEBUG_SUFFIX$$VERSION_SUFFIX +KDSOAPLIB = kdsoap$$VERSION_SUFFIX$$DEBUG_SUFFIX +KDSOAPSERVERLIB = kdsoap-server$$VERSION_SUFFIX$$DEBUG_SUFFIX message(Install prefix is $$INSTALL_PREFIX) diff --git a/src/KDSoapClient/CMakeLists.txt b/src/KDSoapClient/CMakeLists.txt index 72d86dfcf..1758ca385 100644 --- a/src/KDSoapClient/CMakeLists.txt +++ b/src/KDSoapClient/CMakeLists.txt @@ -36,8 +36,14 @@ set_target_properties(kdsoap PROPERTIES VERSION ${${PROJECT_NAME}_VERSION}) # append d to debug libraries for windows builds if(WIN32) - string(CONCAT debug_postfix "d" ${${PROJECT_NAME}_VERSION_MAJOR}) - set_target_properties(kdsoap PROPERTIES DEBUG_POSTFIX ${debug_postfix}) + set(postfix ${${PROJECT_NAME}_VERSION_MAJOR}) + string(TOUPPER ${CMAKE_BUILD_TYPE} UPPER_BUILD_TYPE) + if(${UPPER_BUILD_TYPE} MATCHES "^DEBUG") + string(CONCAT postfix ${postfix} "d") + set_target_properties(kdsoap PROPERTIES DEBUG_POSTFIX ${postfix}) + else() + set_target_properties(kdsoap PROPERTIES ${UPPER_BUILD_TYPE}_POSTFIX ${postfix}) + endif() endif() if(KDSoap_IS_ROOT_PROJECT) diff --git a/src/KDSoapClient/KDSoapClient.pro b/src/KDSoapClient/KDSoapClient.pro index e5eefa79a..672f52d16 100644 --- a/src/KDSoapClient/KDSoapClient.pro +++ b/src/KDSoapClient/KDSoapClient.pro @@ -1,6 +1,5 @@ TEMPLATE = lib -TARGET = kdsoap -CONFIG(debug, debug|release):!unix:TARGET = $${TARGET}d +TARGET = $${KDSOAPLIB} QT -= gui QT += network diff --git a/src/KDSoapServer/CMakeLists.txt b/src/KDSoapServer/CMakeLists.txt index 04e1e0f42..56b1f28cf 100644 --- a/src/KDSoapServer/CMakeLists.txt +++ b/src/KDSoapServer/CMakeLists.txt @@ -33,8 +33,14 @@ set_target_properties(kdsoap-server PROPERTIES VERSION ${${PROJECT_NAME}_VERSION # append d to debug libraries for windows builds if(WIN32) - string(CONCAT debug_postfix "d" ${${PROJECT_NAME}_VERSION_MAJOR}) - set_target_properties(kdsoap-server PROPERTIES DEBUG_POSTFIX ${debug_postfix}) + set(postfix ${${PROJECT_NAME}_VERSION_MAJOR}) + string(TOUPPER ${CMAKE_BUILD_TYPE} UPPER_BUILD_TYPE) + if(${UPPER_BUILD_TYPE} MATCHES "^DEBUG") + string(CONCAT postfix ${postfix} "d") + set_target_properties(kdsoap-server PROPERTIES DEBUG_POSTFIX ${postfix}) + else() + set_target_properties(kdsoap-server PROPERTIES ${UPPER_BUILD_TYPE}_POSTFIX ${postfix}) + endif() endif() if(KDSoap_IS_ROOT_PROJECT) diff --git a/src/KDSoapServer/KDSoapServer.pro b/src/KDSoapServer/KDSoapServer.pro index 4223e238b..f2037913e 100644 --- a/src/KDSoapServer/KDSoapServer.pro +++ b/src/KDSoapServer/KDSoapServer.pro @@ -1,6 +1,5 @@ TEMPLATE = lib -TARGET = kdsoap-server -CONFIG(debug, debug|release):!unix:TARGET = $${TARGET}d +TARGET = $${KDSOAPSERVERLIB} QT -= gui QT += network diff --git a/variables.pri b/variables.pri index 5de70a3f7..f7e3a601f 100644 --- a/variables.pri +++ b/variables.pri @@ -32,6 +32,7 @@ staticlib { win32 { DLLDESTDIR = $${TOP_BUILD_DIR}/bin CONFIG += dll + CONFIG += skip_target_version_ext } } }