Browse Source

tde_create_translated_desktop: Cleaning the LINGUAS file

that is generated for merging desktop file translations
will not be performed as a POST BUILD command, but as a
separate target.

This solves premature file deletion if multiple desktop
files use a common translation folder.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/35/head
Slávek Banko 5 months ago
parent
commit
7183c21e08
No known key found for this signature in database GPG Key ID: 608F5293A04BE668
1 changed files with 13 additions and 4 deletions
  1. +13
    -4
      modules/TDEMacros.cmake

+ 13
- 4
modules/TDEMacros.cmake View File

@@ -1684,12 +1684,21 @@ macro( tde_create_translated_desktop )
DEPENDS ${_src}
)
add_custom_target( "${_out_name}-translated" ALL DEPENDS ${_out_name} )
add_custom_command(
TARGET "${_out_name}-translated"
POST_BUILD COMMAND ${CMAKE_COMMAND} -E remove ${_po_dir}/LINGUAS
)
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${_out_name} DESTINATION ${_dest} )

# cleanup LINGUAS file
get_filename_component( _linguas_path "${_po_dir}/LINGUAS" ABSOLUTE )
file( RELATIVE_PATH _linguas_path "${CMAKE_SOURCE_DIR}" "${_linguas_path}" )
string( REPLACE "/" "+" _linguas_cleanup_target "${_linguas_path}" )
if( NOT TARGET ${_linguas_cleanup_target} )
add_custom_target( ${_linguas_cleanup_target} ALL
COMMAND ${CMAKE_COMMAND} -E remove ${_po_dir}/LINGUAS
COMMENT "Cleanup ${_linguas_path} file..."
)
endif( NOT TARGET ${_linguas_cleanup_target} )

add_dependencies( ${_linguas_cleanup_target} "${_out_name}-translated" )

else( )

# create template for intltool-merge


Loading…
Cancel
Save