summaryrefslogtreecommitdiffstats
path: root/Modules/UseQt4.cmake
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-01-13 12:04:03 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-01-13 14:53:00 (GMT)
commit2509c7678feb2efab79a384fd0b0b35cee8d02b0 (patch)
tree35e6ad54478645423d0c9f5c3f910b05276068a2 /Modules/UseQt4.cmake
parent325ca1f253fa6acc463b241b615671948b432dcd (diff)
downloadCMake-2509c7678feb2efab79a384fd0b0b35cee8d02b0.zip
CMake-2509c7678feb2efab79a384fd0b0b35cee8d02b0.tar.gz
CMake-2509c7678feb2efab79a384fd0b0b35cee8d02b0.tar.bz2
Qt4: Use generator expression in COMPILE_DEFINITIONS (#14692)
Commit 5bb53f6b (cmTarget: Deprecate COMPILE_DEFINITIONS_ properties with a policy., 2013-12-30) deprecated the config-specific COMPILE_DEFINITIONS_* properties in favour of using generator expressions. Set the directory property in UseQt4.cmake to match the INTERFACE_COMPILE_DEFINITIONS on the Qt4::QtCore and Qt5::Core IMPORTED targets. Setting QT_NO_DEBUG is sufficient because qglobal.h sets the corresponding QT_DEBUG definition if required.
Diffstat (limited to 'Modules/UseQt4.cmake')
-rw-r--r--Modules/UseQt4.cmake8
1 files changed, 1 insertions, 7 deletions
diff --git a/Modules/UseQt4.cmake b/Modules/UseQt4.cmake
index aa036b7..7478310 100644
--- a/Modules/UseQt4.cmake
+++ b/Modules/UseQt4.cmake
@@ -22,13 +22,7 @@
# License text for the above reference.)
add_definitions(${QT_DEFINITIONS})
-set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG QT_DEBUG)
-set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE QT_NO_DEBUG)
-set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO QT_NO_DEBUG)
-set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_MINSIZEREL QT_NO_DEBUG)
-if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
- set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS QT_NO_DEBUG)
-endif()
+set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG>)
if(QT_INCLUDE_DIRS_NO_SYSTEM)
include_directories(${QT_INCLUDE_DIR})