X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=cmake%2Fmodules%2FQuasselMacros.cmake;h=8d05417e3375caacd5407c9113ca6a3af0cf2c1f;hb=e052c6532456d818b804ce726c8a6e66c81ad8a0;hp=099e8a22f22a4b9d9f9635b7a524672c9cc952d5;hpb=907e6c4c2f5e199600b54213f6964d2c50bdc700;p=quassel.git diff --git a/cmake/modules/QuasselMacros.cmake b/cmake/modules/QuasselMacros.cmake index 099e8a22..8d05417e 100644 --- a/cmake/modules/QuasselMacros.cmake +++ b/cmake/modules/QuasselMacros.cmake @@ -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)