tde_create_translated_desktop: PO_DIR can be specified as relative.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 1baa4cbbd1)
r14.0.x
Slávek Banko 4 years ago
parent b69bc31c49
commit 05e7242b4e
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -1893,16 +1893,25 @@ macro( tde_create_translated_desktop )
get_filename_component( _out_name ${_basename} NAME ) get_filename_component( _out_name ${_basename} NAME )
endif( ) endif( )
# if no po directory specified, try to determine it # determine po directory
if( NOT _po_dir ) if( _po_dir )
if( EXISTS ${CMAKE_SOURCE_DIR}/translations/desktop_files/${_basename} AND set( _po_base ${_po_dir} )
IS_DIRECTORY ${CMAKE_SOURCE_DIR}/translations/desktop_files/${_basename} ) else()
set( _po_dir ${CMAKE_SOURCE_DIR}/translations/desktop_files/${_basename} ) 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 elseif( EXISTS ${CMAKE_SOURCE_DIR}/po/desktop_files/${_po_base} AND
IS_DIRECTORY ${CMAKE_SOURCE_DIR}/po/desktop_files/${_basename} ) IS_DIRECTORY ${CMAKE_SOURCE_DIR}/po/desktop_files/${_po_base} )
set( _po_dir ${CMAKE_SOURCE_DIR}/po/desktop_files/${_basename} ) set( _po_dir ${CMAKE_SOURCE_DIR}/po/desktop_files/${_po_base} )
else()
set( _po_dir ${CMAKE_SOURCE_DIR}/translations/desktop_files )
endif( ) endif( )
endif( ) endif( )

Loading…
Cancel
Save