Only define QT_NAMESPACE if it is used.

Fixes non-namespaced builds.

Change-Id: I0ec3c29f58042313dfa864f15c2b2d47914cdedb
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This commit is contained in:
Stephen Kelly 2012-02-15 22:12:41 +01:00 committed by Qt by Nokia
parent 7e970eb58c
commit 1b08a48588

View File

@ -12,5 +12,7 @@ if (NOT \"$${CMAKE_ADD_FPIE_FLAGS}\" STREQUAL \"\")
set(Qt5Core_COMPILE_FLAGS "-fPIE")
endif()
list(APPEND Qt5Core_DEFINITIONS -DQT_NAMESPACE=$$QT_NAMESPACE)
list(APPEND Qt5Core_COMPILE_DEFINITIONS QT_NAMESPACE=$$QT_NAMESPACE)
if (NOT \"$$QT_NAMESPACE\" STREQUAL \"\")
list(APPEND Qt5Core_DEFINITIONS -DQT_NAMESPACE=$$QT_NAMESPACE)
list(APPEND Qt5Core_COMPILE_DEFINITIONS QT_NAMESPACE=$$QT_NAMESPACE)
endif()