diff options
author | Slávek Banko <[email protected]> | 2020-05-03 01:18:06 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2020-05-07 14:37:03 +0200 |
commit | e8a95f169ebebc7d4aa0350cb059f8e5b0fcb018 (patch) | |
tree | 4f7a7909f31e79d34c7626d2b386659feba1f37f /modules/TDEMacros.cmake | |
parent | 9138b8f339759751c22d5ddfcd4d644d3a4ed021 (diff) | |
download | tde-cmake-e8a95f169ebebc7d4aa0350cb059f8e5b0fcb018.tar.gz tde-cmake-e8a95f169ebebc7d4aa0350cb059f8e5b0fcb018.zip |
tde_create_translated_desktop: Allow spaces around the equal sign.
Signed-off-by: Slávek Banko <[email protected]>
Diffstat (limited to 'modules/TDEMacros.cmake')
-rw-r--r-- | modules/TDEMacros.cmake | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake index 92e54c3..fc82267 100644 --- a/modules/TDEMacros.cmake +++ b/modules/TDEMacros.cmake @@ -1735,7 +1735,7 @@ macro( tde_create_translated_desktop ) # create template for intltool-merge file( READ ${_src} _src_data ) string( REPLACE ";" "|" _keywords_match "(${_keywords_desktop})" ) - string( REGEX REPLACE "(^|\n)${_keywords_match}=" "\\1_\\2=" _src_data "${_src_data}" ) + string( REGEX REPLACE "(^|\n)${_keywords_match}[ ]*=[ ]*" "\\1_\\2=" _src_data "${_src_data}" ) file( WRITE ${CMAKE_CURRENT_BINARY_DIR}/${_out_name}.in "${_src_data}" ) # merge translations command @@ -1749,19 +1749,18 @@ macro( tde_create_translated_desktop ) # merge translations target add_custom_target( "${_target}" ALL DEPENDS ${_out_name} ) - install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${_out_name} DESTINATION ${_dest} ) else( ) - # just install the original file without translations - install( - FILES ${CMAKE_CURRENT_SOURCE_DIR}/${_src} - RENAME ${_out_name} - DESTINATION ${_dest} - ) + # just write the original file without translations + file( READ ${_src} _src_data ) + file( WRITE ${CMAKE_CURRENT_BINARY_DIR}/${_out_name} "${_src_data}" ) endif( ) + # install traslated desktop file + install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${_out_name} DESTINATION ${_dest} ) + endmacro( ) |