Use common rules for build and install documentation and translations.

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

@ -14,7 +14,7 @@ cmake_minimum_required( VERSION 2.8.12 )
##### general package setup #####################
project( tdeio-gopher )
project( tdeio_gopher )
##### include essential cmake modules ###########
@ -55,9 +55,7 @@ include( ConfigureChecks.cmake )
###### global compiler settings #################
add_definitions(
-DHAVE_CONFIG_H
)
add_definitions( -DHAVE_CONFIG_H )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
@ -67,8 +65,12 @@ set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined"
##### source directories ########################
add_subdirectory( src )
tde_conditional_add_subdirectory( BUILD_DOC doc )
tde_conditional_add_subdirectory( BUILD_TRANSLATIONS translations )
##### other data ################################
tde_conditional_add_project_docs( BUILD_DOC )
tde_conditional_add_project_translations( BUILD_TRANSLATIONS )
##### write configure files #####################

@ -1,14 +0,0 @@
file( GLOB _dirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} * )
string( REGEX REPLACE "[ \r\n\t]+" ";" _linguas "$ENV{LINGUAS}" )
foreach( _dir ${_dirs} )
if( IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${_dir} AND
EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_dir}/CMakeLists.txt )
if( "${_dir}" STREQUAL "en" OR
"${_dir}" STREQUAL "man" OR
"${_linguas}" MATCHES "^;*$" OR
";${_linguas};" MATCHES ";${_dir};" )
add_subdirectory( ${_dir} )
endif( )
endif()
endforeach()

@ -1,12 +0,0 @@
#################################################
#
# (C) 2011 Timothy Pearson
# kb9vqf (AT) pearsoncomputing.net
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
tde_create_handbook( LANG ca DESTINATION tdeio-gopher )

@ -1,12 +0,0 @@
#################################################
#
# (C) 2011 Timothy Pearson
# kb9vqf (AT) pearsoncomputing.net
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
tde_create_handbook( LANG da DESTINATION tdeio-gopher )

@ -1,12 +0,0 @@
#################################################
#
# (C) 2011 Timothy Pearson
# kb9vqf (AT) pearsoncomputing.net
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
tde_create_handbook( LANG de DESTINATION tdeio-gopher )

@ -1,12 +0,0 @@
#################################################
#
# (C) 2011 Timothy Pearson
# kb9vqf (AT) pearsoncomputing.net
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
tde_create_handbook( DESTINATION tdeioslave/gopher)

@ -1,12 +0,0 @@
#################################################
#
# (C) 2011 Timothy Pearson
# kb9vqf (AT) pearsoncomputing.net
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
tde_create_handbook( LANG en_GB DESTINATION tdeio-gopher )

@ -1,12 +0,0 @@
#################################################
#
# (C) 2011 Timothy Pearson
# kb9vqf (AT) pearsoncomputing.net
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
tde_create_handbook( LANG es DESTINATION tdeio-gopher )

@ -1,12 +0,0 @@
#################################################
#
# (C) 2011 Timothy Pearson
# kb9vqf (AT) pearsoncomputing.net
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
tde_create_handbook( LANG et DESTINATION tdeio-gopher )

@ -1,12 +0,0 @@
#################################################
#
# (C) 2011 Timothy Pearson
# kb9vqf (AT) pearsoncomputing.net
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
tde_create_handbook( LANG fr DESTINATION tdeio-gopher )

@ -1,12 +0,0 @@
#################################################
#
# (C) 2011 Timothy Pearson
# kb9vqf (AT) pearsoncomputing.net
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
tde_create_handbook( LANG gl DESTINATION tdeio-gopher )

@ -1,12 +0,0 @@
#################################################
#
# (C) 2011 Timothy Pearson
# kb9vqf (AT) pearsoncomputing.net
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
tde_create_handbook( LANG hu DESTINATION tdeio-gopher )

@ -1,12 +0,0 @@
#################################################
#
# (C) 2011 Timothy Pearson
# kb9vqf (AT) pearsoncomputing.net
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
tde_create_handbook( LANG it DESTINATION tdeio-gopher )

@ -1,12 +0,0 @@
#################################################
#
# (C) 2011 Timothy Pearson
# kb9vqf (AT) pearsoncomputing.net
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
tde_create_handbook( LANG nl DESTINATION tdeio-gopher )

@ -1,12 +0,0 @@
#################################################
#
# (C) 2011 Timothy Pearson
# kb9vqf (AT) pearsoncomputing.net
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
tde_create_handbook( LANG pl DESTINATION tdeio-gopher )

@ -1,12 +0,0 @@
#################################################
#
# (C) 2011 Timothy Pearson
# kb9vqf (AT) pearsoncomputing.net
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
tde_create_handbook( LANG pt DESTINATION tdeio-gopher )

@ -1,12 +0,0 @@
#################################################
#
# (C) 2011 Timothy Pearson
# kb9vqf (AT) pearsoncomputing.net
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
tde_create_handbook( LANG pt_BR DESTINATION tdeio-gopher )

@ -1,12 +0,0 @@
#################################################
#
# (C) 2011 Timothy Pearson
# kb9vqf (AT) pearsoncomputing.net
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
tde_create_handbook( LANG ro DESTINATION tdeio-gopher )

@ -1,12 +0,0 @@
#################################################
#
# (C) 2011 Timothy Pearson
# kb9vqf (AT) pearsoncomputing.net
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
tde_create_handbook( LANG ru DESTINATION tdeio-gopher )

@ -0,0 +1,18 @@
<?xml version="1.0" ?>
<!DOCTYPE article PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
<!ENTITY % addindex "IGNORE">
<!ENTITY % Slovak "INCLUDE"> <!-- change language only here -->
]>
<article lang="&language;" id="gopher">
<title>gopher</title>
<para> <command>gopher</command> začal ako distribuovaná informačná služba na University of Minnesota. Gopher umožňuje prístup k informáciám na serveroch Gopher na počítačoch v Internete.</para>
<para> Gopher je prehliadacia internetová služba, ktorá používa rozhranie menu. Používateľ vyberie informáciu z menu a vráti sa nové menu alebo sa zobrazí textový súbor. Položky môžu byť na pôvodnom serveri Gopher alebo na inom serveri (alebo počítači). Gopher dokáže <quote>tunelovať</quote> z jedného Gophera na iný bez toho, aby si to používateľ všimol. Gopher udržiava presné umiestnenie počítačov skryté, takže vytvára <quote>ilúziu</quote> jedného veľkého systému spojených menu. </para>
<para> Gopher umožňuje ukladať umiestnenia do <quote>záložiek</quote>, takže používateľ môže sledovať <quote>záložku</quote> priamo namiesto hľadania v menu. Menu Gopheru nie sú štandardizované. </para>
<para> Zdroj: <ulink url="http://tlc.nlm.nih.gov/resources/tutorials/internetdistlrn/gophrdef.htm">http://tlc.nlm.nih.gov/resources/tutorials/internetdistlrn/gophrdef.htm</ulink> </para>
</article>

@ -1,12 +0,0 @@
#################################################
#
# (C) 2011 Timothy Pearson
# kb9vqf (AT) pearsoncomputing.net
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
tde_create_handbook( LANG sr DESTINATION tdeio-gopher )

@ -1,12 +0,0 @@
#################################################
#
# (C) 2011 Timothy Pearson
# kb9vqf (AT) pearsoncomputing.net
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
tde_create_handbook( LANG sr@Latn DESTINATION tdeio-gopher )

@ -1,12 +0,0 @@
#################################################
#
# (C) 2011 Timothy Pearson
# kb9vqf (AT) pearsoncomputing.net
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
tde_create_handbook( LANG sv DESTINATION tdeio-gopher )

@ -1,12 +0,0 @@
#################################################
#
# (C) 2011 Timothy Pearson
# kb9vqf (AT) pearsoncomputing.net
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
tde_create_handbook( LANG uk DESTINATION tdeio-gopher )

@ -1 +0,0 @@
tde_auto_add_subdirectories()

@ -1,14 +0,0 @@
file( GLOB_RECURSE po_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.po )
string( REGEX REPLACE "[ \r\n\t]+" ";" _linguas "$ENV{LINGUAS}" )
foreach( _po ${po_files} )
get_filename_component( _lang ${_po} NAME_WE )
if( "${_linguas}" MATCHES "^;*$" OR ";${_linguas};" MATCHES ";${_lang};" )
if( "${_po}" MATCHES "^([^/]*)/.*" )
string( REGEX REPLACE "^([^/]*)/.*" "\\1" _component "${_po}" )
else( )
set( _component "${PROJECT_NAME}" )
endif( )
tde_create_translation( FILES ${_po} LANG ${_lang} OUTPUT_NAME ${_component} )
endif( )
endforeach( )
Loading…
Cancel
Save