Commit fb433b09 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Fix translations

parent 083fc309
......@@ -9,7 +9,6 @@ Makefile*
/src/__/
/src/config.h
/src/qrc_resources-ts.cxx
/src/qrc_resources.cxx
/src/vlmc_automoc.cpp
vlmc
......
......@@ -96,10 +96,7 @@ ELSE (WIN32)
LIST( APPEND VLMC_SRCS Main/vlmc.cpp )
ENDIF(WIN32)
SET(VLMC_RCC
../resources.qrc
../ts/resources-ts.qrc
)
SET(VLMC_RCC ../resources.qrc)
IF (WIN32)
LIST( APPEND VLMC_RCC ../resources/styles.qrc )
......@@ -243,9 +240,12 @@ ELSE(NOT WITH_GUI)
ENDIF(WITH_CRASHHANDLER_GUI)
qt5_wrap_ui(VLMC_UIS_H ${VLMC_UIS})
qt5_add_resources(VLMC_RCC_SRCS ${VLMC_RCC})
vlmc_get_ts(VLMC_QMS)
vlmc_create_ts_resources("${VLMC_QMS}" "${CMAKE_CURRENT_BINARY_DIR}/ts-resource.qrc")
list(APPEND VLMC_RCC ${CMAKE_CURRENT_BINARY_DIR}/ts-resource.qrc)
qt5_add_resources(VLMC_RCC_SRCS ${VLMC_RCC})
IF( MINGW )
# resource compilation for MinGW
......@@ -274,7 +274,7 @@ ELSE(NOT WITH_GUI)
LIST( APPEND VLMC_SRCS Gui/preview/RenderWidget.h )
ENDIF( APPLE )
ADD_EXECUTABLE( vlmc ${GUI_TYPE} ${VLMC_SRCS} ${VLMC_MOC_SRCS} ${VLMC_UIS_H} ${VLMC_RCC_SRCS} ${VLMC_QMS} )
ADD_EXECUTABLE( vlmc ${GUI_TYPE} ${VLMC_SRCS} ${VLMC_MOC_SRCS} ${VLMC_UIS_H} ${VLMC_RCC_SRCS} )
TARGET_LINK_LIBRARIES( vlmc ${VLMC_LIBS} )
if (NOT Qt4_FOUND)
qt5_use_modules(vlmc Core Gui Widgets Network)
......
......@@ -72,3 +72,13 @@ function(vlmc_get_ts VLMC_QM_FILES_OUT)
set(${VLMC_QM_FILES_OUT} "" PARENT_SCOPE)
endif()
endfunction()
function(vlmc_create_ts_resources VLMC_QMS_IN VLMC_QRC_FILE_IN)
set(QRC_SRC "<RCC><qresource prefix=\"/ts\">")
foreach(qm ${VLMC_QMS_IN})
get_filename_component(QM_NAME ${qm} NAME)
set(QRC_SRC "${QRC_SRC} <file alias=\"${QM_NAME}\">${qm}</file>")
endforeach()
set(QRC_SRC "${QRC_SRC}</qresource></RCC>")
file(WRITE ${VLMC_QRC_FILE_IN} ${QRC_SRC})
endfunction()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment