diff options
| author | Alexander Neundorf <neundorf@kde.org> | 2008-06-05 20:59:29 +0000 | 
|---|---|---|
| committer | Alexander Neundorf <neundorf@kde.org> | 2008-06-05 20:59:29 +0000 | 
| commit | a12676439f9fd2a3bb672b6e53cc124d53b96028 (patch) | |
| tree | cddaf4a465e8f26b167c920c0bda0f93de3f7b2b /modules | |
| parent | f81e1536cec58ab362e9d45ddf7df7e51874658c (diff) | |
| download | extra-cmake-modules-a12676439f9fd2a3bb672b6e53cc124d53b96028.tar.gz extra-cmake-modules-a12676439f9fd2a3bb672b6e53cc124d53b96028.tar.bz2 | |
-add -F /Library/Frameworks to the moc arguments, otherwise moc doesn't find the 
include dirs in frameworks when Qt is built as plain framework, which means that e.g. 
Q_OS_UNIX is not set and also Q_INTERFACE doesn't work
Alex
svn path=/trunk/KDE/kdelibs/; revision=817360
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/FindQt4.cmake | 10 | 
1 files changed, 8 insertions, 2 deletions
| diff --git a/modules/FindQt4.cmake b/modules/FindQt4.cmake index b6f791dd..90a3fc17 100644 --- a/modules/FindQt4.cmake +++ b/modules/FindQt4.cmake @@ -1134,6 +1134,12 @@ IF (QT4_QMAKE_FOUND)          SET(${_moc_INC_DIRS} ${${_moc_INC_DIRS}} "-I" ${_current})       ENDFOREACH(_current ${_inc_DIRS}) +     # if Qt is installed only as framework, add -F /library/Frameworks to the moc arguments +     # otherwise moc can't find the headers in the framework include dirs +     IF(APPLE  AND  "${QT_QTCORE_INCLUDE_DIR}" MATCHES "/Library/Frameworks/") +        SET(${_moc_INC_DIRS} ${${_moc_INC_DIRS}} "-F /Library/Frameworks") +     ENDIF(APPLE  AND  "${QT_QTCORE_INCLUDE_DIR}" MATCHES "/Library/Frameworks/") +    ENDMACRO(QT4_GET_MOC_INC_DIRS) @@ -1152,11 +1158,11 @@ IF (QT4_QMAKE_FOUND)            COMMAND ${QT_MOC_EXECUTABLE}            ARGS @"${_moc_parameter_file}"            DEPENDS ${abs_infile}) -     ELSE (MSVC_IDE)      +     ELSE (MSVC_IDE)          ADD_CUSTOM_COMMAND(OUTPUT ${outfile}             COMMAND ${QT_MOC_EXECUTABLE}             ARGS ${moc_includes} -o ${outfile} ${abs_infile} -           DEPENDS ${abs_infile})      +           DEPENDS ${abs_infile})       ENDIF (MSVC_IDE)       SET_SOURCE_FILES_PROPERTIES(${outfile} PROPERTIES SKIP_AUTOMOC TRUE)  # dont run automoc on this file | 
