Uh, apparently, cmake-2.6 is not always downward compatible to 2.4...
authorManuel Nickschas <sputnick@quassel-irc.org>
Mon, 1 Sep 2008 21:55:49 +0000 (23:55 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Mon, 1 Sep 2008 21:55:49 +0000 (23:55 +0200)
cmake/modules/FindQt4.cmake
cmake/modules/QuasselGenerateTranslations.cmake

index 678cf4a..fd9a4f2 100644 (file)
@@ -1145,10 +1145,18 @@ IF (QT4_QMAKE_FOUND)
   # Added by Sput to provide definitions to moc calls
   MACRO (QT4_GET_MOC_DEFINES _moc_DEFINES)
      SET(${_moc_DEFINES})
-     GET_DIRECTORY_PROPERTY(_defines DEFINITIONS)
-     FOREACH(_current ${_defines})
-        SET(${_moc_DEFINES} ${${_moc_DEFINES}} -D${_current})
-     ENDFOREACH(_current ${_defines})
+     IF(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION LESS 6)
+       GET_DIRECTORY_PROPERTY(_defines DEFINITIONS)
+       SEPARATE_ARGUMENTS(_defines)
+       FOREACH(_current ${_defines})
+         SET(${_moc_DEFINES} ${${_moc_DEFINES}} ${_current})
+       ENDFOREACH(_current ${_defines})
+     ELSE(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION LESS 6)
+       GET_DIRECTORY_PROPERTY(_defines COMPILE_DEFINITIONS)
+       FOREACH(_current ${_defines})
+         SET(${_moc_DEFINES} ${${_moc_DEFINES}} -D${_current})
+       ENDFOREACH(_current ${_defines})
+     ENDIF(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION LESS 6)
 
   ENDMACRO(QT4_GET_MOC_DEFINES)
 
index 99c87a3..a5fc97d 100644 (file)
@@ -53,8 +53,8 @@ macro(quassel_generate_i18n_resource outvar)
     endforeach(file ${outfiles})
     file(APPEND ${resfile} "</qresource>\n</RCC>\n")
     add_custom_command(OUTPUT ${resfile} DEPENDS ${outfiles})
-    set_directory_properties(PROPERTIES
-          ADDITIONAL_MAKE_CLEAN_FILES "${outfiles} i18n.qrc")
+    #set_directory_properties(PROPERTIES
+    #      ADDITIONAL_MAKE_CLEAN_FILES "${outfiles} i18n.qrc")
 
     # Generate resource
     qt4_add_resources(RC_OUT ${resfile})