diff --git a/ci/appveyor.ps1 b/ci/appveyor.ps1 index 05f1330..5a0f308 100644 --- a/ci/appveyor.ps1 +++ b/ci/appveyor.ps1 @@ -6,7 +6,7 @@ Init @("ninja", "extra-cmake-modules", "png2ico") mkdir -Force $env:APPVEYOR_BUILD_FOLDER\work\build\snorenotify cd $env:APPVEYOR_BUILD_FOLDER\work\build\snorenotify -LogExec cmake -G"Ninja" $env:APPVEYOR_BUILD_FOLDER -DCMAKE_BUILD_TYPE=Release -DWITH_SNORE_DAEMON=ON -DWITH_FRONTENDS=ON -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_ROOT" +LogExec cmake -G"Ninja" $env:APPVEYOR_BUILD_FOLDER -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_ROOT" CmakeImageInstall "$env:APPVEYOR_BUILD_FOLDER\work\image" SetupSnoreSend "$env:APPVEYOR_BUILD_FOLDER\work\image\bin" @{ diff --git a/lang/CMakeLists.txt b/lang/CMakeLists.txt index 0d8a851..323d615 100644 --- a/lang/CMakeLists.txt +++ b/lang/CMakeLists.txt @@ -8,10 +8,19 @@ foreach( lang ${LIBSNORE_LANGS} ) endforeach() set( snore_i18n_content "${snore_i18n_content}\n\n" ) -file( WRITE ${CMAKE_BINARY_DIR}/lang/snore_i18n.qrc "${snore_i18n_content}" ) +file( WRITE ${CMAKE_BINARY_DIR}/lang/snore_i18n.qrc.in "${snore_i18n_content}" ) qt5_add_translation(libsnore_lang ${TS_FILES}) +add_custom_command(OUTPUT snore_i18n.qrc + COMMAND ${CMAKE_COMMAND} + ARGS -E copy ${CMAKE_BINARY_DIR}/lang/snore_i18n.qrc.in ${CMAKE_BINARY_DIR}/lang/snore_i18n.qrc + WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") + + +add_custom_target(libsnore_lang_translation ALL DEPENDS ${libsnore_lang} DEPENDS snore_i18n.qrc) + + set(SNORE_RCS ${SNORE_RCS} ${CMAKE_BINARY_DIR}/lang/snore_i18n.qrc PARENT_SCOPE)