Fixed: Define QT_NO_DEBUG in Release with Qt 5 also in PCH

--HG--
branch : develop
This commit is contained in:
kervala 2015-12-25 15:31:34 +01:00
parent 21ada78b63
commit 75d16f7054

View file

@ -145,19 +145,22 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
ENDFOREACH() ENDFOREACH()
ENDIF() ENDIF()
# Hack to define missing QT_NO_DEBUG with Qt 5.2 # Special Qt 5 cases
IF(USE_QT5 AND _UPPER_BUILD STREQUAL "RELEASE") IF(GLOBAL_DEFINITIONS MATCHES "QT_CORE_LIB")
LIST(APPEND GLOBAL_DEFINITIONS " -DQT_NO_DEBUG") # Hack to define missing QT_NO_DEBUG with Qt 5.2
ENDIF() IF(_UPPER_BUILD STREQUAL "RELEASE")
LIST(APPEND GLOBAL_DEFINITIONS " -DQT_NO_DEBUG")
ENDIF()
# Qt5_POSITION_INDEPENDENT_CODE should be true if Qt was compiled with PIE # Qt5_POSITION_INDEPENDENT_CODE should be true if Qt was compiled with PIE
IF(Qt5_POSITION_INDEPENDENT_CODE AND GLOBAL_DEFINITIONS MATCHES "QT_CORE_LIB") IF(Qt5_POSITION_INDEPENDENT_CODE)
SET(_USE_PIE ON) SET(_USE_PIE ON)
ENDIF() ENDIF()
IF(_USE_PIE) IF(_USE_PIE)
LIST(APPEND _FLAGS " ${CMAKE_CXX_COMPILE_OPTIONS_PIE}") LIST(APPEND _FLAGS " ${CMAKE_CXX_COMPILE_OPTIONS_PIE}")
LIST(APPEND _FLAGS " ${CMAKE_CXX_COMPILE_OPTIONS_PIC}") LIST(APPEND _FLAGS " ${CMAKE_CXX_COMPILE_OPTIONS_PIC}")
ENDIF()
ENDIF() ENDIF()
LIST(APPEND _FLAGS " ${GLOBAL_DEFINITIONS}") LIST(APPEND _FLAGS " ${GLOBAL_DEFINITIONS}")