attempted to implement localization loading
This commit is contained in:
+16
-11
@@ -43,6 +43,7 @@ add_subdirectory(shaders)
|
||||
add_subdirectory(task)
|
||||
add_subdirectory(threading)
|
||||
add_subdirectory(timeline)
|
||||
add_subdirectory(ts)
|
||||
add_subdirectory(tool)
|
||||
add_subdirectory(ui)
|
||||
add_subdirectory(undo)
|
||||
@@ -62,11 +63,25 @@ if(APPLE)
|
||||
)
|
||||
endif()
|
||||
|
||||
# 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(ts/translations.qrc.in ts/translations.qrc @ONLY)
|
||||
|
||||
set(OLIVE_RESOURCES
|
||||
${OLIVE_RESOURCES}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/ts/translations.qrc
|
||||
)
|
||||
|
||||
# Add executable
|
||||
add_executable(${OLIVE_TARGET}
|
||||
${OLIVE_SOURCES}
|
||||
${OLIVE_RESOURCES}
|
||||
${OLIVE_QM_FILES}
|
||||
)
|
||||
|
||||
if(APPLE)
|
||||
@@ -265,16 +280,6 @@ endif()
|
||||
# Set compiler definitions
|
||||
target_compile_definitions(${OLIVE_TARGET} PRIVATE ${OLIVE_DEFINITIONS})
|
||||
|
||||
set(OLIVE_TS_FILES
|
||||
# FIXME: Empty variable
|
||||
)
|
||||
|
||||
if(UPDATE_TS)
|
||||
qt5_create_translation(OLIVE_QM_FILES ${CMAKE_SOURCE_DIR} ${OLIVE_TS_FILES})
|
||||
else()
|
||||
qt5_add_translation(OLIVE_QM_FILES ${OLIVE_TS_FILES})
|
||||
endif()
|
||||
|
||||
add_subdirectory(packaging)
|
||||
|
||||
if(DOXYGEN_FOUND)
|
||||
|
||||
Reference in New Issue
Block a user