summaryrefslogtreecommitdiffstats
path: root/Modules/FindQt4.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-01-08 16:14:12 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-01-08 16:14:16 (GMT)
commitf7f34a46e674fcf0326b0dbbc6dbb35c9e3c022f (patch)
tree2a556a0358e403e4961b8f4a23bf2767899a437d /Modules/FindQt4.cmake
parentf4a314394039708e772374e54a31959f2de14825 (diff)
parent3c413e2a31b4fcb6a99dba04669c6a6517b97832 (diff)
downloadCMake-f7f34a46e674fcf0326b0dbbc6dbb35c9e3c022f.zip
CMake-f7f34a46e674fcf0326b0dbbc6dbb35c9e3c022f.tar.gz
CMake-f7f34a46e674fcf0326b0dbbc6dbb35c9e3c022f.tar.bz2
Merge topic 'use_generator_is_multi_config'
3c413e2a GENERATOR_IS_MULTI_CONFIG: Use for multi-config checks in Modules c267ea1c GENERATOR_IS_MULTI_CONFIG: Use for multi-config checks in Tests Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1627
Diffstat (limited to 'Modules/FindQt4.cmake')
-rw-r--r--Modules/FindQt4.cmake11
1 files changed, 6 insertions, 5 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index 714e4af..a65c533 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -398,13 +398,14 @@ macro (_QT4_ADJUST_LIB_VARS _camelCaseBasename)
# if the release- as well as the debug-version of the library have been found:
if (QT_${basename}_LIBRARY_DEBUG AND QT_${basename}_LIBRARY_RELEASE)
- # if the generator supports configuration types then set
- # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value
- if (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
+ # if the generator is multi-config or if CMAKE_BUILD_TYPE is set for
+ # single-config generators, set optimized and debug libraries
+ get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
+ if(_isMultiConfig OR CMAKE_BUILD_TYPE)
set(QT_${basename}_LIBRARY optimized ${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG})
else()
- # if there are no configuration types and CMAKE_BUILD_TYPE has no value
- # then just use the release libraries
+ # For single-config generators where CMAKE_BUILD_TYPE has no value,
+ # just use the release libraries
set(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_RELEASE} )
endif()
set(QT_${basename}_LIBRARIES optimized ${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG})