X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=cmake%2Fmodules%2FQuasselMacros.cmake;h=8d05417e3375caacd5407c9113ca6a3af0cf2c1f;hp=1f4d2fdf6145b5cde1a0b11cc449570ba9e44434;hb=b99ec3f4d2ff365931b18597babefb875a759d61;hpb=5cfabc7f10123e0e4f03f76ef8ecbdd6c36df511 diff --git a/cmake/modules/QuasselMacros.cmake b/cmake/modules/QuasselMacros.cmake index 1f4d2fdf..8d05417e 100644 --- a/cmake/modules/QuasselMacros.cmake +++ b/cmake/modules/QuasselMacros.cmake @@ -9,20 +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 .ts file +# This generates a .qm from a .po file macro(generate_qm outvar basename) - set(input ${CMAKE_SOURCE_DIR}/i18n/${basename}.ts) - set(output ${CMAKE_CURRENT_BINARY_DIR}/${basename}.qm) + set(input ${CMAKE_SOURCE_DIR}/po/${basename}.po) + set(output ${CMAKE_BINARY_DIR}/po/${basename}.qm) add_custom_command(OUTPUT ${output} - COMMAND ${QT_LRELEASE_EXECUTABLE} - ARGS ${input} - -qm ${output} - -silent -compress - DEPENDS ${basename}.ts) + COMMAND ${QT_LCONVERT_EXECUTABLE} + ARGS -i ${input} + -of qm + -o ${output} + DEPENDS ${basename}.po) set(${outvar} ${output}) endmacro(generate_qm outvar basename)