Browse Source

tde_create_translated_desktop: PO_DIR can be specified as relative.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/57/head
Slávek Banko 2 months ago
parent
commit
1baa4cbbd1
No known key found for this signature in database GPG Key ID: 608F5293A04BE668
1 changed files with 17 additions and 8 deletions
  1. +17
    -8
      modules/TDEMacros.cmake

+ 17
- 8
modules/TDEMacros.cmake View File

@@ -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( )



Loading…
Cancel
Save