summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2020-06-23 19:37:31 +0200
committerSlávek Banko <slavek.banko@axis.cz>2020-06-25 00:39:45 +0200
commit1baa4cbbd1bcfd4765c5aeeed07506f312e03bb6 (patch)
treeec1f29afb6ed9b3e8322db3e064b41e002ed931c /modules
parent690e7a7ec30cb96baf8c8f0a3f69969ad074aad1 (diff)
downloadtde-cmake-1baa4cbbd1bcfd4765c5aeeed07506f312e03bb6.tar.gz
tde-cmake-1baa4cbbd1bcfd4765c5aeeed07506f312e03bb6.zip
tde_create_translated_desktop: PO_DIR can be specified as relative.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'modules')
-rw-r--r--modules/TDEMacros.cmake25
1 files changed, 17 insertions, 8 deletions
diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake
index 972de94..ef49af0 100644
--- a/modules/TDEMacros.cmake
+++ b/modules/TDEMacros.cmake
@@ -1893,16 +1893,25 @@ macro( tde_create_translated_desktop )
get_filename_component( _out_name ${_basename} NAME )
endif( )
- # if no po directory specified, try to determine it
- if( NOT _po_dir )
- if( EXISTS ${CMAKE_SOURCE_DIR}/translations/desktop_files/${_basename} AND
- IS_DIRECTORY ${CMAKE_SOURCE_DIR}/translations/desktop_files/${_basename} )
- set( _po_dir ${CMAKE_SOURCE_DIR}/translations/desktop_files/${_basename} )
+ # determine po directory
+ if( _po_dir )
+ set( _po_base ${_po_dir} )
+ else()
+ get_filename_component( _po_base ${_basename} NAME )
+ endif()
+ if( IS_ABSOLUTE ${_po_base} )
+ set( _po_dir ${_po_base} )
+ else()
+ if( EXISTS ${CMAKE_SOURCE_DIR}/translations/desktop_files/${_po_base} AND
+ IS_DIRECTORY ${CMAKE_SOURCE_DIR}/translations/desktop_files/${_po_base} )
+ set( _po_dir ${CMAKE_SOURCE_DIR}/translations/desktop_files/${_po_base} )
- elseif( EXISTS ${CMAKE_SOURCE_DIR}/po/desktop_files/${_basename} AND
- IS_DIRECTORY ${CMAKE_SOURCE_DIR}/po/desktop_files/${_basename} )
- set( _po_dir ${CMAKE_SOURCE_DIR}/po/desktop_files/${_basename} )
+ elseif( EXISTS ${CMAKE_SOURCE_DIR}/po/desktop_files/${_po_base} AND
+ IS_DIRECTORY ${CMAKE_SOURCE_DIR}/po/desktop_files/${_po_base} )
+ set( _po_dir ${CMAKE_SOURCE_DIR}/po/desktop_files/${_po_base} )
+ else()
+ set( _po_dir ${CMAKE_SOURCE_DIR}/translations/desktop_files )
endif( )
endif( )