summaryrefslogtreecommitdiffstats
path: root/Modules/UseQt4.cmake
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2008-02-01 17:02:19 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2008-02-01 17:02:19 (GMT)
commitd94087ab44fcef17f82b587b540193eb98e9e5bb (patch)
tree8b685170d079dcda1585a29f06c1d353e21b3543 /Modules/UseQt4.cmake
parentf1b334ca7ade2867dcb94dc9c012dfc7b4039341 (diff)
downloadCMake-d94087ab44fcef17f82b587b540193eb98e9e5bb.zip
CMake-d94087ab44fcef17f82b587b540193eb98e9e5bb.tar.gz
CMake-d94087ab44fcef17f82b587b540193eb98e9e5bb.tar.bz2
ENH: Use new COMPILE_DEFINITIONS_* with set_property to
add Qt release/debug defines.
Diffstat (limited to 'Modules/UseQt4.cmake')
-rw-r--r--Modules/UseQt4.cmake15
1 files changed, 4 insertions, 11 deletions
diff --git a/Modules/UseQt4.cmake b/Modules/UseQt4.cmake
index bdc723c..143e59e 100644
--- a/Modules/UseQt4.cmake
+++ b/Modules/UseQt4.cmake
@@ -5,17 +5,10 @@
ADD_DEFINITIONS(${QT_DEFINITIONS})
-
-# check that QT_NO_DEBUG is defined for release configurations
-MACRO(QT_CHECK_FLAG_EXISTS FLAG VAR DOC)
- IF(NOT ${VAR} MATCHES "${FLAG}")
- SET(${VAR} "${${VAR}} ${FLAG}"
- CACHE STRING "Flags used by the compiler during ${DOC} builds." FORCE)
- ENDIF(NOT ${VAR} MATCHES "${FLAG}")
-ENDMACRO(QT_CHECK_FLAG_EXISTS FLAG VAR)
-QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_RELWITHDEBINFO "Release with Debug Info")
-QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_RELEASE "release")
-QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_MINSIZEREL "release minsize")
+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)
INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR})