summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2020-07-27 17:38:39 +0200
committerSlávek Banko <slavek.banko@axis.cz>2020-07-27 17:38:39 +0200
commit63b5532a298ccf95e310ae853ff53ade506daf7e (patch)
tree50c85e8c267c255c1b703bbba3183fde0aa45654
parent9f86304bdd4be37b625ee3ae9d37f2c4006dea14 (diff)
downloadcmake-63b5532a.tar.gz
cmake-63b5532a.zip
tde_create_translated_desktop: Allow generating a translated desktopHEADmaster
file that will not be installed directly. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--modules/TDEMacros.cmake19
1 files changed, 14 insertions, 5 deletions
diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake
index 07f161f..4554826 100644
--- a/modules/TDEMacros.cmake
+++ b/modules/TDEMacros.cmake
@@ -1933,6 +1933,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}" )
@@ -2002,11 +2009,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()