summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2009-10-05 15:21:30 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2009-10-05 15:21:30 (GMT)
commitbca63bb738646fda2eff7a64e3030e9fdf000205 (patch)
tree5d00805ac755959a5f95bddbccd29e27563cf562 /Modules
parentc118fd4c556ea5190355f2d64f5aef8dee235cdb (diff)
downloadCMake-bca63bb738646fda2eff7a64e3030e9fdf000205.zip
CMake-bca63bb738646fda2eff7a64e3030e9fdf000205.tar.gz
CMake-bca63bb738646fda2eff7a64e3030e9fdf000205.tar.bz2
When getting include dirs for moc, also watch for framework includes and use -F instead of -I.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindQt4.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index 5734adf..66f6805 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -1032,7 +1032,12 @@ IF (QT4_QMAKE_FOUND)
GET_DIRECTORY_PROPERTY(_inc_DIRS INCLUDE_DIRECTORIES)
FOREACH(_current ${_inc_DIRS})
- SET(${_moc_flags} ${${_moc_flags}} "-I${_current}")
+ IF("${_current}" MATCHES ".framework/?$")
+ STRING(REGEX REPLACE "/[^/]+.framework" "" framework_path "${_current}")
+ SET(${_moc_flags} ${${_moc_flags}} "-F${framework_path}")
+ ELSE("${_current}" MATCHES ".framework/?$")
+ SET(${_moc_flags} ${${_moc_flags}} "-I${_current}")
+ ENDIF("${_current}" MATCHES ".framework/?$")
ENDFOREACH(_current ${_inc_DIRS})
GET_DIRECTORY_PROPERTY(_defines COMPILE_DEFINITIONS)