diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2020-07-27 17:38:39 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2020-07-29 18:36:37 +0200 |
commit | 641dd35df12becc8ee3680114a7003cd4027faf2 (patch) | |
tree | ea5e0dc69843936866f16bb211a9733fbfd20130 /modules | |
parent | 70dcc78db778672b0be2b32ba36209ed380417d0 (diff) | |
download | tde-cmake-641dd35df12becc8ee3680114a7003cd4027faf2.tar.gz tde-cmake-641dd35df12becc8ee3680114a7003cd4027faf2.zip |
tde_create_translated_desktop: Allow generating a translated desktop
file that will not be installed directly.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 63b5532a298ccf95e310ae853ff53ade506daf7e)
Diffstat (limited to 'modules')
-rw-r--r-- | modules/TDEMacros.cmake | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake index 1c6aa0b..344937b 100644 --- a/modules/TDEMacros.cmake +++ b/modules/TDEMacros.cmake @@ -1746,6 +1746,13 @@ macro( tde_create_translated_desktop ) endif( ) endif( ) + # if the translated desktop file is not installed, generate to the specified output name + if( "${_dest}" STREQUAL "-" ) + set( _basename "${_out_name}" ) + get_filename_component( _out_dir "${CMAKE_CURRENT_BINARY_DIR}/${_out_name}" PATH ) + file( MAKE_DIRECTORY "${_out_dir}" ) + endif( ) + # are there any translations available? unset( _translations ) if( EXISTS "${_po_dir}" AND IS_DIRECTORY "${_po_dir}" ) @@ -1815,11 +1822,13 @@ macro( tde_create_translated_desktop ) endif( ) # install traslated desktop file - install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/${_basename} - RENAME ${_out_name} - DESTINATION ${_dest} - ) + if( NOT "${_dest}" STREQUAL "-" ) + install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/${_basename} + RENAME ${_out_name} + DESTINATION ${_dest} + ) + endif() endforeach() |