summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorgregory guy <[email protected]>2020-05-26 16:03:50 +0200
committerSlávek Banko <[email protected]>2020-05-26 16:09:15 +0200
commitc4545b808eeaf65ac9aaae94a78ea4cf4f9ea96f (patch)
treec406decd8007087f650fcc468970428fae334ba3 /doc
parent5cad60063799de1846011f1fd5c6023166df9d28 (diff)
downloadkscope-c4545b808eeaf65ac9aaae94a78ea4cf4f9ea96f.tar.gz
kscope-c4545b808eeaf65ac9aaae94a78ea4cf4f9ea96f.zip
Move translations to a new directory layout.
Add support for LINGUAS for listing translations to install. Signed-off-by: gregory guy <[email protected]> Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit 51db3dd2a0528687837beede00b1522ebb8518fe)
Diffstat (limited to 'doc')
-rw-r--r--doc/CMakeLists.txt14
1 files changed, 13 insertions, 1 deletions
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index d08a511..70d6348 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -1,2 +1,14 @@
+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
+ "${_dir}" STREQUAL "man" OR
+ "${_linguas}" MATCHES "^;*$" OR
+ ";${_linguas};" MATCHES ";${_dir};" )
+ add_subdirectory( ${_dir} )
+ endif( )
+ endif()
+endforeach()