2018-10-24 21:15:16 -04:00
|
|
|
set_directory_properties(PROPERTIES CLEAN_NO_CUSTOM 1)
|
2018-10-20 01:19:14 -04:00
|
|
|
find_package(Qt5LinguistTools REQUIRED)
|
|
|
|
|
|
|
|
file(GLOB TS_FILES "${PROJECT_SOURCE_DIR}/translations/*.ts")
|
|
|
|
file(GLOB TS_SRC_FILES "${PROJECT_SOURCE_DIR}/src/*")
|
|
|
|
qt5_create_translation(QM_FILES ${TS_SRC_FILES} ${TS_FILES}
|
|
|
|
OPTIONS -no-obsolete)
|
2018-10-24 21:15:16 -04:00
|
|
|
# qt5_add_translation(QM_FILES ${TS_FILES})
|
2018-10-20 01:19:14 -04:00
|
|
|
add_custom_target(translations ALL DEPENDS ${QM_FILES})
|
2019-01-20 18:03:14 -05:00
|
|
|
add_dependencies(${CMAKE_PROJECT_NAME} translations)
|
2018-10-20 16:15:14 -04:00
|
|
|
install(FILES ${QM_FILES} DESTINATION
|
|
|
|
${CMAKE_INSTALL_DATAROOTDIR}/qt5/translations)
|