Don't link to indirect deps anymore, thanks to ewoerner for pointing that out
authorManuel Nickschas <sputnick@quassel-irc.org>
Mon, 29 Sep 2008 12:46:17 +0000 (14:46 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Mon, 29 Sep 2008 12:46:17 +0000 (14:46 +0200)
cmake/modules/QuasselMacros.cmake
i18n/CMakeLists.txt

index 1f4d2fd..707afc9 100644 (file)
@@ -9,7 +9,10 @@ macro(setup_qt4_variables)
     set(MAIN MAIN)
   ENDIF(WIN32)
   foreach(qtmod CORE ${ARGV} ${MAIN})
-    set(QUASSEL_QT_LIBRARIES ${QUASSEL_QT_LIBRARIES} ${QT_QT${qtmod}_LIBRARY} ${QT_${qtmod}_LIB_DEPENDENCIES})
+    set(QUASSEL_QT_LIBRARIES ${QUASSEL_QT_LIBRARIES} ${QT_QT${qtmod}_LIBRARY})
+    if(STATIC)
+      set(QUASSEL_QT_LIBRARIES ${QUASSEL_QT_LIBRARIES} ${QT_${qtmod}_LIB_DEPENDENCIES})
+    endif(STATIC)
   endforeach(qtmod ${ARGV})
   set(QUASSEL_QT_LIBRARIES ${QUASSEL_QT_LIBRARIES} ${QT_LIBRARIES})
 endmacro(setup_qt4_variables)
index 909b968..feb774e 100644 (file)
@@ -22,22 +22,22 @@ if(QT_LRELEASE_EXECUTABLE)
       set(gen_linguas "${gen_linguas} ${lang}")
     endif(flg)
   endforeach(TS_FILE ${avail_tsfiles})
-
-  # Write resource file
-  set(resfile ${CMAKE_CURRENT_BINARY_DIR}/i18n.qrc)
-  file(WRITE ${resfile} "<!DOCTYPE RCC><RCC version=\"1.0\">\n"
-                        "<qresource prefix=\"/i18n\">\n")
-  foreach(file ${qm_files})
-    get_filename_component(file ${file} NAME)
-    file(APPEND ${resfile} "    <file>${file}</file>\n")
-  endforeach(file ${qm_files})
-  file(APPEND ${resfile} "</qresource>\n</RCC>\n")
-  add_custom_command(OUTPUT ${resfile} DEPENDS ${qm_files})
-  #set_directory_properties(PROPERTIES
-  #      ADDITIONAL_MAKE_CLEAN_FILES "${outfiles} i18n.qrc")
-  qt4_add_resources(RC_I18N ${resfile})
-  add_custom_target(i18n DEPENDS ${RC_I18N})
   message(STATUS "Including languages:${gen_linguas}")
 else(QT_LRELEASE_EXECUTABLE)
   message(STATUS "WARNING: lrelease not found, you won't have translations!")
 endif(QT_LRELEASE_EXECUTABLE)
+
+# Write resource file
+set(resfile ${CMAKE_CURRENT_BINARY_DIR}/i18n.qrc)
+file(WRITE ${resfile} "<!DOCTYPE RCC><RCC version=\"1.0\">\n"
+                      "<qresource prefix=\"/i18n\">\n")
+foreach(file ${qm_files})
+  get_filename_component(file ${file} NAME)
+  file(APPEND ${resfile} "    <file>${file}</file>\n")
+endforeach(file ${qm_files})
+file(APPEND ${resfile} "</qresource>\n</RCC>\n")
+
+#add_custom_command(OUTPUT ${resfile} DEPENDS ${qm_files})
+set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${qm_files} i18n.qrc")
+qt4_add_resources(RC_I18N ${resfile})
+add_custom_target(i18n DEPENDS ${RC_I18N})