From f0ba19fde558b2ef8ac80132f163de3d0750869f Mon Sep 17 00:00:00 2001 From: TheCharlatan Date: Wed, 2 May 2018 17:11:02 +0200 Subject: Add lrelease to the depends This includes a minimal qt build without gui --- translations/CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'translations') diff --git a/translations/CMakeLists.txt b/translations/CMakeLists.txt index fdd5014a7..dc7772c1d 100644 --- a/translations/CMakeLists.txt +++ b/translations/CMakeLists.txt @@ -42,7 +42,12 @@ IF(NOT CMAKE_CROSSCOMPILING) add_executable(generate_translations_header generate_translations_header.c) ENDIF(NOT CMAKE_CROSSCOMPILING) -find_program(LRELEASE lrelease) +if(LRELEASE_PATH STREQUAL "") + find_program(LRELEASE lrelease) +else() + set(LRELEASE ${LRELEASE_PATH}/lrelease) +endif() + if(LRELEASE STREQUAL "LRELEASE-NOTFOUND") set(ts_files "") message(WARNING "lrelease program not found, translation files not built") @@ -68,7 +73,7 @@ string(REPLACE ".ts" ".qm" qm_files "${ts_files}") add_custom_command(TARGET generate_translations_header POST_BUILD - COMMAND generate_translations_header ${qm_files} + COMMAND ./generate_translations_header ${qm_files} WORKING_DIRECTORY "${CMAKE_CURRENT_BIN_DIR}" COMMENT "Generating embedded translations header") -- cgit v1.2.3