summaryrefslogtreecommitdiffstats
path: root/src/corelib/Qt5CoreMacros.cmake
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2012-10-02 12:04:00 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-04 11:58:48 +0200
commitd24b867e56e7e4519185f37c12f02bcebd1c31f2 (patch)
tree1cf005b48cfdcde8f9a0ed8e8af2ca2ae3ce0a3a /src/corelib/Qt5CoreMacros.cmake
parent595deca5c909d99a8cd157b9fb6c82c64b1db1f5 (diff)
CMake: Improve QT5_GET_MOC_FLAGS macro
We need to handle CMAKE_INCLUDE_CURRENT_DIR for include directories. Otherwise generated files located in the current binary directory are not found as expected. e.g. *.json file as meta data for Qt5's plugins generated at build time. Change-Id: I14ae1e7013f9d8b485aa990d50db4a03ca4f4b81 Reviewed-by: Yuchen Deng <loaden@gmail.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src/corelib/Qt5CoreMacros.cmake')
-rw-r--r--src/corelib/Qt5CoreMacros.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/Qt5CoreMacros.cmake b/src/corelib/Qt5CoreMacros.cmake
index b0d9135010..089445a184 100644
--- a/src/corelib/Qt5CoreMacros.cmake
+++ b/src/corelib/Qt5CoreMacros.cmake
@@ -69,6 +69,10 @@ macro(QT5_GET_MOC_FLAGS _moc_flags)
set(${_moc_flags})
get_directory_property(_inc_DIRS INCLUDE_DIRECTORIES)
+ if(CMAKE_INCLUDE_CURRENT_DIR)
+ list(APPEND _inc_DIRS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
+ endif()
+
foreach(_current ${_inc_DIRS})
if("${_current}" MATCHES "\\.framework/?$")
string(REGEX REPLACE "/[^/]+\\.framework" "" framework_path "${_current}")