mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Merge pull request #3091
64f36300
Check if lrelease is working before trying to use it (Guillaume LE VAILLANT)
This commit is contained in:
commit
35d5aa36c9
1 changed files with 15 additions and 8 deletions
|
@ -36,6 +36,12 @@ find_program(LRELEASE lrelease)
|
||||||
if(LRELEASE STREQUAL "LRELEASE-NOTFOUND")
|
if(LRELEASE STREQUAL "LRELEASE-NOTFOUND")
|
||||||
set(ts_files "")
|
set(ts_files "")
|
||||||
message(WARNING "lrelease program not found, translation files not built")
|
message(WARNING "lrelease program not found, translation files not built")
|
||||||
|
else()
|
||||||
|
execute_process(COMMAND ${LRELEASE} -version
|
||||||
|
RESULT_VARIABLE lrelease_ret)
|
||||||
|
if(NOT lrelease_ret EQUAL "0")
|
||||||
|
set(ts_files "")
|
||||||
|
message(WARNING "lrelease program not working, translation files not built")
|
||||||
else()
|
else()
|
||||||
file(GLOB ts_files RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" *.ts)
|
file(GLOB ts_files RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" *.ts)
|
||||||
foreach(ts_file ${ts_files})
|
foreach(ts_file ${ts_files})
|
||||||
|
@ -46,6 +52,7 @@ else()
|
||||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BIN_DIR}")
|
WORKING_DIRECTORY "${CMAKE_CURRENT_BIN_DIR}")
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
string(REPLACE ".ts" ".qm" qm_files "${ts_files}")
|
string(REPLACE ".ts" ".qm" qm_files "${ts_files}")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue