[applications/amarok] added cmake support for translations

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/amarok@1228680 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
samelian 14 years ago
parent 20b40b2428
commit 65246190b6

@ -9,7 +9,7 @@
# #
################################################# #################################################
cmake_minimum_required( VERSION 2.6 ) cmake_minimum_required( VERSION 2.8 )
##### general package setup ##################### ##### general package setup #####################
@ -52,6 +52,7 @@ option( WITH_LIBGPOD "Enable iPod support from libgpod" OFF )
option( BUILD_ALL "Build all" OFF ) option( BUILD_ALL "Build all" OFF )
option( BUILD_DOC "Build doc" ${BUILD_ALL} ) option( BUILD_DOC "Build doc" ${BUILD_ALL} )
option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} )
##### configure checks ########################## ##### configure checks ##########################
@ -63,10 +64,9 @@ include( ConfigureChecks.cmake )
add_definitions( add_definitions(
-DHAVE_CONFIG_H -DHAVE_CONFIG_H
${TQT_CFLAGS_OTHER}
) )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include tqt.h" ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" ) set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" )
set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" ) set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" )
@ -75,6 +75,7 @@ set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" )
add_subdirectory( amarok ) add_subdirectory( amarok )
tde_conditional_add_subdirectory( BUILD_DOC doc ) tde_conditional_add_subdirectory( BUILD_DOC doc )
tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po )
##### write configure files ##################### ##### write configure files #####################

@ -9,6 +9,13 @@
# #
################################################# #################################################
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( )
check_type_size( "int" SIZEOF_INT BUILTIN_TYPES_ONLY ) check_type_size( "int" SIZEOF_INT BUILTIN_TYPES_ONLY )
check_type_size( "long" SIZEOF_LONG BUILTIN_TYPES_ONLY ) check_type_size( "long" SIZEOF_LONG BUILTIN_TYPES_ONLY )

@ -0,0 +1,17 @@
#################################################
#
# (C) 2010-2011 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
file( GLOB_RECURSE po_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} amarok.po )
foreach( _po ${po_files} )
get_filename_component( _lang ${_po} PATH )
tde_create_translation( FILES ${_po} LANG ${_lang} )
endforeach( )
Loading…
Cancel
Save