diff options
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/features/create_cmake.prf | 13 | ||||
-rw-r--r-- | mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in | 2 |
2 files changed, 11 insertions, 4 deletions
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf index 65c637244b..5c561042cd 100644 --- a/mkspecs/features/create_cmake.prf +++ b/mkspecs/features/create_cmake.prf @@ -138,8 +138,8 @@ CMAKE_RELEASE_TYPE = # the debug libraries at build time. equals(QMAKE_HOST.os, Windows): CMAKE_BIN_SUFFIX = ".exe" -debug_and_release|CONFIG(debug, debug|release): CMAKE_DEBUG_TYPE = debug -debug_and_release|CONFIG(release, debug|release): CMAKE_RELEASE_TYPE = release +if(debug_and_release:build_all)|CONFIG(debug, debug|release): CMAKE_DEBUG_TYPE = debug +if(debug_and_release:build_all)|CONFIG(release, debug|release): CMAKE_RELEASE_TYPE = release # CMAKE_DEBUG_AND_RELEASE is used to tell the _populate_$${CMAKE_MODULE_NAME}_target_properties # functions whether a Configuration specific generator expression needs to be added to the values @@ -153,7 +153,14 @@ debug_and_release|CONFIG(release, debug|release): CMAKE_RELEASE_TYPE = release # <CONFIG> equivalent to the value specified by CMAKE_BUILD_TYPE. # This means that when Qt was built in a Release configuration, and the application in a Debug # configuration, IMPORTED_LOCATION_RELEASE will be used for the Qt libraries. -debug_and_release { +# +# Note that we need to check for the "debug_and_release" feature, and not the CONFIG value, because +# the CONFIG value is always set to true on Windows in msvc-desktop.conf disregarding whether the +# configure line specified just -debug or just -release. +# This also means that if a user configures and builds Qt with -release, and then calls nmake debug +# to build debug libraries of Qt, the generated CMake file won't know about debug libraries, +# and will always link against the release libraries. +qtConfig(debug_and_release) { CMAKE_DEBUG_AND_RELEASE = TRUE } else { CMAKE_DEBUG_AND_RELEASE = FALSE diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in index 7a599d30d5..4d3dc1bd35 100644 --- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in @@ -397,7 +397,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY INTERFACE_QT_ENABLED_FEATURES $$join(QT.$${MODULE}.enabled_features, ";")) set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY INTERFACE_QT_DISABLED_FEATURES $$join(QT.$${MODULE}.disabled_features, ";")) - set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY QT_PLUGIN_TYPES \"$${CMAKE_MODULE_PLUGIN_TYPES}\") + set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY INTERFACE_QT_PLUGIN_TYPES \"$${CMAKE_MODULE_PLUGIN_TYPES}\") set(_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST TRUE) foreach (_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIR ${Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS}) |