summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2020-03-24 14:46:10 +0100
committerSlávek Banko <[email protected]>2020-03-24 14:46:10 +0100
commit8adeb4111077df36629317e21fd00066bc00f397 (patch)
tree9940502ac6454f9bec85b3ab6f19553eade34406 /doc
parent4860d0b2f18302d2fa313fed61906c36e9f4ee26 (diff)
downloadabakus-8adeb4111077df36629317e21fd00066bc00f397.tar.gz
abakus-8adeb4111077df36629317e21fd00066bc00f397.zip
Add support for LINGUAS for listing translations to install.
Signed-off-by: Slávek Banko <[email protected]>
Diffstat (limited to 'doc')
-rw-r--r--doc/CMakeLists.txt23
1 files changed, 12 insertions, 11 deletions
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index a8b8de4..cd4611d 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -1,12 +1,13 @@
-#################################################
-#
-# (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 _dirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} * )
+string( REGEX REPLACE "[ \r\n\t]+" ";" _linguas "$ENV{LINGUAS}" )
-tde_auto_add_subdirectories()
+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
+ "${_linguas}" MATCHES "^;*$" OR
+ ";${_linguas};" MATCHES ";${_dir};" )
+ add_subdirectory( ${_dir} )
+ endif( )
+ endif()
+endforeach()