diff options
| -rw-r--r-- | modules/KDE4Macros.cmake | 30 | ||||
| -rw-r--r-- | modules/MacroLogFeature.cmake | 10 | 
2 files changed, 34 insertions, 6 deletions
diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index fd5e62e4..2174427b 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -155,11 +155,39 @@ macro (KDE4_ADD_UI_FILES _sources )  endmacro (KDE4_ADD_UI_FILES) +# this is basically a copy of the qt4_get_moc_flags() macros from FindQt4.cmake +# which is for internal use only, so we should not use it here: +macro (_KDE4_GET_MOC_FLAGS _moc_flags) +   set(${_moc_flags}) +   get_directory_property(_inc_DIRS INCLUDE_DIRECTORIES) + +   foreach(_current ${_inc_DIRS}) +      set(${_moc_flags} ${${_moc_flags}} "-I${_current}") +   endforeach(_current ${_inc_DIRS}) + +   get_directory_property(_defines COMPILE_DEFINITIONS) +   foreach(_current ${_defines}) +      set(${_moc_flags} ${${_moc_flags}} "-D${_current}") +   endforeach(_current ${_defines}) + +   if(Q_WS_WIN) +      set(${_moc_flags} ${${_moc_flags}} -DWIN32) +   endif(Q_WS_WIN) + +   # 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(_KDE4_GET_MOC_FLAGS) + +  #create the implementation files from the ui files and add them to the list of sources  #usage: KDE4_ADD_UI3_FILES(foo_SRCS ${ui_files})  macro (KDE4_ADD_UI3_FILES _sources ) -   qt4_get_moc_flags(_moc_INCS) +   _kde4_get_moc_flags(_moc_INCS)     foreach (_current_FILE ${ARGN}) diff --git a/modules/MacroLogFeature.cmake b/modules/MacroLogFeature.cmake index 5db50edf..541078c8 100644 --- a/modules/MacroLogFeature.cmake +++ b/modules/MacroLogFeature.cmake @@ -53,18 +53,18 @@ ENDIF (NOT _macroLogFeatureAlreadyIncluded)  MACRO(MACRO_LOG_FEATURE _var _package _description _url ) # _required _minvers _comments) -   SET(_required "${ARGV4}") +   STRING(TOUPPER "${ARGV4}" _required)     SET(_minvers "${ARGV5}")     SET(_comments "${ARGV6}") - +        IF (${_var})       SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/EnabledFeatures.txt)     ELSE (${_var}) -     IF (${_required} MATCHES "[Tt][Rr][Uu][Ee]") +     IF ("${_required}" STREQUAL "TRUE")         SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/MissingRequirements.txt) -     ELSE (${_required} MATCHES "[Tt][Rr][Uu][Ee]") +     ELSE ("${_required}" STREQUAL "TRUE")         SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/DisabledFeatures.txt) -     ENDIF (${_required} MATCHES "[Tt][Rr][Uu][Ee]") +     ENDIF ("${_required}" STREQUAL "TRUE")     ENDIF (${_var})     SET(_logtext "   * ${_package}")  | 
