Skip to content
Snippets Groups Projects
Commit ccb9704b authored by Antoine Lorence's avatar Antoine Lorence
Browse files

[CMake] Move translation files to the right folder

parent 3661802d
No related branches found
No related tags found
No related merge requests found
......@@ -60,7 +60,7 @@ find_package(Qwt 6.0)
include_directories(${QWT_INCLUDE_DIRS})
# We want to generate everything in the right target folder, for easier deployment
set(DEPLOY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/eiimage)
set(DEPLOY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/eiimage CACHE PATH "The folder to use for deployment." FORCE)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${DEPLOY_OUTPUT_DIRECTORY})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DEPLOY_OUTPUT_DIRECTORY})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${DEPLOY_OUTPUT_DIRECTORY})
......
......@@ -180,18 +180,22 @@ qt5_wrap_ui(WRAPPED_UIS ${UIS})
qt5_add_resources(RCC_FILES "eiimage_app_res.qrc")
set(TS_FILES eiimage_en.ts eiimage_fr.ts)
# Uncommento only 1 of the 2 folowing commands, depending on your needs
# Uncomment only 1 of the 2 folowing commands, depending on your needs
# -1- Use current translations files
qt5_add_translation(QM_FILES ${TS_FILES})
# -2- Update translations files with changes from c++ sources
# qt5_create_translation(QM_FILES ${eiimage_SOURCES} ${TS_FILES})
foreach(__FILE ${QM_FILES})
file(COPY ${__FILE} DESTINATION ${DEPLOY_OUTPUT_DIRECTORY})
endforeach()
# Avoid awful console on Windows
if(WIN32)
set(EXTRA_FLAGS WIN32)
endif()
add_executable(eiimage ${EXTRA_FLAGS} ${eiimage_SOURCES} ${WRAPPED_UIS} ${UIS} ${TS_FILES} ${RCC_FILES})
add_executable(eiimage ${EXTRA_FLAGS} ${eiimage_SOURCES} ${WRAPPED_UIS} ${UIS} ${QM_FILES} ${TS_FILES} ${RCC_FILES})
target_link_libraries(eiimage
core
Qt5::Core
......
Subproject commit ff02452583df5f97839bf86dedf8362f1c28b70a
Subproject commit 10011e3f08cdd573f5b486802182e7bfabbe936d
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment