From a08e7644672e0750d49aecadb149a0a2f8ccacb5 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sun, 16 Jun 2019 23:38:44 +0200 Subject: [PATCH] CMake: add compiled branding translations to build dir - Copy the .qm files (compiled translations) into the build dir as part of the build process. This is independent of **installing** those same translations, but does allow the translations to be used by Calamares when run from the build dir for testing. --- CMakeModules/CalamaresAddBrandingSubdirectory.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeModules/CalamaresAddBrandingSubdirectory.cmake b/CMakeModules/CalamaresAddBrandingSubdirectory.cmake index 78330e245..344777eb0 100644 --- a/CMakeModules/CalamaresAddBrandingSubdirectory.cmake +++ b/CMakeModules/CalamaresAddBrandingSubdirectory.cmake @@ -107,7 +107,9 @@ function( calamares_add_branding_translations NAME ) file( GLOB BRANDING_TRANSLATION_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${SUBDIRECTORY}/lang/calamares-${NAME}_*.ts" ) if ( BRANDING_TRANSLATION_FILES ) qt5_add_translation( QM_FILES ${BRANDING_TRANSLATION_FILES} ) - add_custom_target( branding-translation-${NAME} ALL DEPENDS ${QM_FILES} ) + add_custom_target( branding-translation-${NAME} ALL DEPENDS ${QM_FILES} + COMMAND ${CMAKE_COMMAND} -E copy ${QM_FILES} ${CMAKE_CURRENT_BINARY_DIR}/${SUBDIRECTORY}/lang/ + ) install( FILES ${QM_FILES} DESTINATION ${BRANDING_COMPONENT_DESTINATION}/lang/ ) list( LENGTH BRANDING_TRANSLATION_FILES _branding_count ) message( " ${Green}BRANDING_TRANSLATIONS:${ColorReset} ${_branding_count} language(s)" )