Look for the phonon4 library in addition to plain phonon, as the Qt build on windows...
[quassel.git] / cmake / modules / QuasselMacros.cmake
index 099e8a2..8d05417 100644 (file)
@@ -9,7 +9,23 @@ 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)
+
+# This generates a .qm from a .po file
+macro(generate_qm outvar basename)
+  set(input ${CMAKE_SOURCE_DIR}/po/${basename}.po)
+  set(output ${CMAKE_BINARY_DIR}/po/${basename}.qm)
+  add_custom_command(OUTPUT ${output}
+          COMMAND ${QT_LCONVERT_EXECUTABLE}
+          ARGS -i ${input}
+               -of qm
+               -o ${output}
+          DEPENDS ${basename}.po)
+  set(${outvar} ${output})
+endmacro(generate_qm outvar basename)