From a024a784e2e2eff4afebc8e996f1c81abcd55ac0 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 24 Feb 2017 16:28:42 +0100 Subject: cmake/i18n: fix dependencies Was broken on Unix make. --- cmake/opentrack-boilerplate.cmake | 3 ++- cmake/opentrack-install.cmake | 2 +- cmake/opentrack-policy.cmake | 8 ++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake index 1bd79a97..eaab2f99 100644 --- a/cmake/opentrack-boilerplate.cmake +++ b/cmake/opentrack-boilerplate.cmake @@ -227,11 +227,12 @@ function(opentrack_boilerplate n) set_property(GLOBAL PROPERTY "opentrack-ts-${i}" "${tt}") endforeach() + get_property(modules GLOBAL PROPERTY opentrack-all-modules) list(APPEND modules "${n}") set_property(GLOBAL PROPERTY opentrack-all-modules "${modules}") foreach(i ${langs}) - add_custom_command(OUTPUT ${i} + add_custom_command(OUTPUT "${i}" COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_SOURCE_DIR}/lang" COMMAND "${Qt5_DIR}/../../../bin/lupdate" -silent -recursive -no-obsolete -locations relative . -ts "${i}" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" diff --git a/cmake/opentrack-install.cmake b/cmake/opentrack-install.cmake index 6a1f9725..4762c5f7 100644 --- a/cmake/opentrack-install.cmake +++ b/cmake/opentrack-install.cmake @@ -68,7 +68,7 @@ function(merge_translations) add_custom_command(OUTPUT "${qm-output}" COMMAND "${Qt5_DIR}/../../../bin/lrelease" -nounfinished -silent ${ts} -qm "${qm-output}" - DEPENDS ${ts} ${deps} + DEPENDS ${deps} COMMENT "Running lrelease for ${i}") add_custom_target(i18n-lang-${i} ALL DEPENDS "${qm-output}") diff --git a/cmake/opentrack-policy.cmake b/cmake/opentrack-policy.cmake index 6416c535..2d88e218 100644 --- a/cmake/opentrack-policy.cmake +++ b/cmake/opentrack-policy.cmake @@ -17,3 +17,11 @@ endif() if(POLICY CMP0063) cmake_policy(SET CMP0063 NEW) endif() + +if(POLICY CMP0053) + cmake_policy(SET CMP0053 OLD) +endif() + +if(POLICY CMP0011) + cmake_policy(SET CMP0011 NEW) +endif() -- cgit v1.2.3