From bca63bb738646fda2eff7a64e3030e9fdf000205 Mon Sep 17 00:00:00 2001 From: Clinton Stimpson Date: Mon, 5 Oct 2009 11:21:30 -0400 Subject: [PATCH] When getting include dirs for moc, also watch for framework includes and use -F instead of -I. --- Modules/FindQt4.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index 5734adf7a..66f68056c 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)