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.
This commit is contained in:
parent
f3f8f3ea46
commit
a08e764467
@ -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)" )
|
||||
|
Loading…
Reference in New Issue
Block a user