Add CMakeL10n rules.

Create translation template.
Add CMake rules to build translations.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/3/head
Slávek Banko 5 years ago
parent d9228e4fc3
commit 3dc2f27d3c
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -0,0 +1,23 @@
#################################################
#
# (C) 2018 Slávek Banko
# slavek.banko (AT) axis.cz
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
cmake_minimum_required( VERSION 2.8 )
##### include our cmake modules #################
set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
include( TDEL10n )
##### create translation templates ##############
tde_l10n_auto_add_subdirectories( )

@ -45,6 +45,13 @@ endif( )
# option( WITH_LDAP "Enable LDAP support" OFF )
##### user requested modules ####################
option( BUILD_ALL "Build all" ON )
option( BUILD_DOC "Build documentation" ${BUILD_ALL} )
option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} )
##### configure checks ##########################
include( ConfigureChecks.cmake )

@ -17,3 +17,18 @@ test_big_endian(WORDS_BIGENDIAN)
find_package( TQt )
find_package( TDE )
##### gettext
if( BUILD_TRANSLATIONS )
include( FindGettext )
if( GETTEXT_FOUND )
set( MSGFMT_EXECUTABLE ${GETTEXT_MSGFMT_EXECUTABLE}
CACHE FILEPATH "path to msgfmt executable" )
endif( GETTEXT_FOUND )
if( NOT MSGFMT_EXECUTABLE )
tde_message_fatal( "msgfmt is required but was not found on your system." )
endif( NOT MSGFMT_EXECUTABLE )
endif( BUILD_TRANSLATIONS )

@ -0,0 +1,3 @@
##### create translation templates ##############
tde_l10n_auto_add_subdirectories( )

@ -9,10 +9,10 @@
#
#################################################
add_subdirectory( doc )
tde_conditional_add_subdirectory( BUILD_DOC doc )
add_subdirectory( pics )
add_subdirectory( src )
add_subdirectory( vpn-plugins )
# add_subdirectory( po )
tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po )
install( FILES tdenetworkmanager.conf DESTINATION ${DBUS_SYS_DIR} )

@ -0,0 +1,6 @@
# build translations if some are already available
file( GLOB _srcs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.po )
if( _srcs )
tde_create_translation( LANG auto OUTPUT_NAME ${PROJECT_NAME} )
endif( )

File diff suppressed because it is too large Load Diff

@ -0,0 +1,6 @@
##### create translation templates ##############
tde_l10n_create_template(
CATALOG "tdenetworkmanager"
DESTINATION "../po"
)
Loading…
Cancel
Save