cmake: reworked everything and add unit tests

This commit is contained in:
itsmattkc
2021-04-22 11:50:24 +10:00
parent 46e457f0aa
commit 3929004535
11 changed files with 551 additions and 228 deletions
+16
View File
@@ -33,3 +33,19 @@ set(OLIVE_TS_FILES
ts/zh_TW.ts
PARENT_SCOPE
)
# Add translations
qt5_add_translation(OLIVE_QM_FILES ${OLIVE_TS_FILES})
set(QRC_BODY "")
foreach(QM_FILE ${OLIVE_QM_FILES})
get_filename_component(QM_FILENAME_COMPONENT ${QM_FILE} NAME_WE)
string(APPEND QRC_BODY "<file alias=\"${QM_FILENAME_COMPONENT}\">${QM_FILE}</file>\n")
endforeach()
configure_file(translations.qrc.in translations.qrc @ONLY)
set(OLIVE_RESOURCES
${OLIVE_RESOURCES}
${CMAKE_CURRENT_BINARY_DIR}/translations.qrc
PARENT_SCOPE
)