Fix cmake support for translations

pull/1/head
Alexander Golubev 11 years ago committed by Slávek Banko
parent 06c56ee1e1
commit e113ed917c

@ -35,6 +35,13 @@ include( TDESetupPaths )
tde_setup_paths( ) tde_setup_paths( )
##### user requested modules ####################
option( BUILD_ALL "Build all" OFF )
option( BUILD_DOC "Build doc" ${BUILD_ALL} )
option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} )
##### configure checks ########################## ##### configure checks ##########################
include( ConfigureChecks.cmake ) include( ConfigureChecks.cmake )
@ -54,8 +61,8 @@ set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" )
##### source directories ######################## ##### source directories ########################
add_subdirectory( src ) add_subdirectory( src )
add_subdirectory( doc ) tde_conditional_add_subdirectory( BUILD_DOC doc )
add_subdirectory( po ) tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po )
##### write configure files ##################### ##### write configure files #####################

@ -57,6 +57,14 @@ if( NOT DBUS_TQT_FOUND )
tde_message_fatal( "dbus-tqt is required, but was not found on your system" ) tde_message_fatal( "dbus-tqt is required, but was not found on your system" )
endif( ) endif( )
# check for msgfmt
if( BUILD_TRANSLATIONS AND NOT DEFINED MSGFMT_EXECUTABLE )
find_program( MSGFMT_EXECUTABLE msgfmt )
if( NOT MSGFMT_EXECUTABLE )
tde_message_fatal( "msgfmt program is required, but was not found on your system" )
endif( )
endif( )
# required stuff # required stuff
find_package( TQt ) find_package( TQt )

@ -1,7 +1,7 @@
################################################# #################################################
# #
# (C) 2010-2011 Serghei Amelian # (C) 2013 Golubev Alexander
# serghei (DOT) amelian (AT) gmail.com # fatzer2 (AT) gmail.com
# #
# Improvements and feedback are welcome # Improvements and feedback are welcome
# #
@ -9,9 +9,4 @@
# #
################################################# #################################################
# file( GLOB_RECURSE po_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} tdepowersave.po ) tde_create_translation( LANG auto OUTPUT_NAME tdepowersave )
foreach( _po ${po_files} )
get_filename_component( _lang ${_po} PATH )
tde_create_translation( FILES ${_po} LANG ${_lang} )
endforeach( )

Loading…
Cancel
Save