summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/TDEMacros.cmake17
1 files changed, 13 insertions, 4 deletions
diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake
index 8478f2a..60b6842 100644
--- a/modules/TDEMacros.cmake
+++ b/modules/TDEMacros.cmake
@@ -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