Merge topic 'Qt4-NO_DEBUG-define'

3e97bcb Use a config-specific moc parameters file, if needed.
b9f0d81 Define QT_NO_DEBUG for non-debug use of Qt 4.
This commit is contained in:
Brad King 2013-12-19 10:13:23 -05:00 committed by CMake Topic Stage
commit aed192d2cd
2 changed files with 5 additions and 0 deletions

View File

@ -1203,6 +1203,10 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
"${QT_MKSPECS_DIR}/default" "${QT_MKSPECS_DIR}/default"
${QT_INCLUDE_DIR} ${QT_INCLUDE_DIR}
) )
set_property(TARGET Qt4::QtCore APPEND PROPERTY
INTERFACE_COMPILE_DEFINITIONS
$<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG>
)
set_property(TARGET Qt4::QtCore PROPERTY set_property(TARGET Qt4::QtCore PROPERTY
INTERFACE_QT_MAJOR_VERSION 4 INTERFACE_QT_MAJOR_VERSION 4
) )

View File

@ -120,6 +120,7 @@ macro (QT4_CREATE_MOC_COMMAND infile outfile moc_flags moc_options moc_target)
string (REPLACE ";" "\n" _moc_parameters "${_moc_parameters}") string (REPLACE ";" "\n" _moc_parameters "${_moc_parameters}")
if(moc_target) if(moc_target)
set (_moc_parameters_file ${_moc_parameters_file}$<$<BOOL:$<CONFIGURATION>>:_$<CONFIGURATION>>)
set(targetincludes "$<TARGET_PROPERTY:${moc_target},INCLUDE_DIRECTORIES>") set(targetincludes "$<TARGET_PROPERTY:${moc_target},INCLUDE_DIRECTORIES>")
set(targetdefines "$<TARGET_PROPERTY:${moc_target},COMPILE_DEFINITIONS>") set(targetdefines "$<TARGET_PROPERTY:${moc_target},COMPILE_DEFINITIONS>")