Убран параметр "Путь к исходникам"

This commit is contained in:
Andrei Astafev 2019-07-19 11:08:14 +03:00
parent 58a568b2a6
commit a34958e578

View File

@ -10,16 +10,10 @@ function(qt_translation)
set(_ts_dir ${_QTTR_TS_DIR})
set(_languages ${_QTTR_LANGUAGES})
get_target_property(_sources ${_target} SOURCES)
get_target_property(_source_dir ${_target} SOURCE_DIR)
set(L10N_QRC_BODY "")
make_directory(${_ts_dir})
set(_sources_list "")
foreach(_s ${_sources})
list(APPEND _sources_list ${_source_dir}/${_s})
endforeach()
foreach(_lang ${_languages})
set(_ts "${_target}_${_lang}.ts")
set(_qm "${_target}_${_lang}.qm")
@ -28,8 +22,8 @@ function(qt_translation)
string(APPEND L10N_QRC_BODY "<file alias=\"${_qm}\">${CMAKE_BINARY_DIR}/${_qm}</file>\n")
add_custom_target(${_target}_l10n_${_lang}
COMMAND ${Qt5_LUPDATE_EXECUTABLE} ${_sources_list} -ts ${_ts_dir}/${_ts} -target-language ${_lang}
DEPENDS ${_sources_list})
COMMAND ${Qt5_LUPDATE_EXECUTABLE} ${_sources} -ts ${_ts_dir}/${_ts} -target-language ${_lang}
DEPENDS ${_sources})
if(NOT EXISTS "${_ts_dir}/${_ts}")
add_custom_target(${_ts} DEPENDS ${_target}_l10n_${_lang})
@ -40,7 +34,7 @@ function(qt_translation)
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${_qm}
COMMAND ${Qt5_LRELEASE_EXECUTABLE}
ARGS ${_ts_dir}/${_ts} -qm ${CMAKE_BINARY_DIR}/${_qm}
DEPENDS ${_ts} ${_sources_list})
DEPENDS ${_ts} ${_sources})
endforeach()
configure_file(${CMLIB_MODULE_DIR}/qrc/l10n.qrc.in