Skip to content

Commit

Permalink
buildsystem - on windows, dlls are versioned and have 'd' in debug mode
Browse files Browse the repository at this point in the history
i.e debug mode client lib is kdsoap1d.dll
and in release mode it's kdsoap1.dll

for both autogen and CMake buildsystems
  • Loading branch information
Allen Winter committed Mar 4, 2016
1 parent 7151124 commit 6b2ea91
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
4 changes: 2 additions & 2 deletions kdsoap.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 8 additions & 2 deletions src/KDSoapClient/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions src/KDSoapClient/KDSoapClient.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
TEMPLATE = lib
TARGET = kdsoap
CONFIG(debug, debug|release):!unix:TARGET = $${TARGET}d
TARGET = $${KDSOAPLIB}
QT -= gui
QT += network

Expand Down
10 changes: 8 additions & 2 deletions src/KDSoapServer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions src/KDSoapServer/KDSoapServer.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
TEMPLATE = lib
TARGET = kdsoap-server
CONFIG(debug, debug|release):!unix:TARGET = $${TARGET}d
TARGET = $${KDSOAPSERVERLIB}
QT -= gui

QT += network
Expand Down
1 change: 1 addition & 0 deletions variables.pri
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ staticlib {
win32 {
DLLDESTDIR = $${TOP_BUILD_DIR}/bin
CONFIG += dll
CONFIG += skip_target_version_ext
}
}
}
Expand Down

0 comments on commit 6b2ea91

Please sign in to comment.