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 4 years ago
parent 690e7a7ec3
commit 1baa4cbbd1
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