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)
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})