summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2020-04-06 15:27:23 +0200
committerSlávek Banko <[email protected]>2020-04-06 15:27:23 +0200
commitd0b56db6fdd6912498d787f782c8a9e110736c74 (patch)
treee34cd8beb9ad86c9b4f33242d0ab8ec6ead7f137 /doc
parent23321da41ba4ee7f2b48321114cc3dbf7c3ea78b (diff)
downloadkcmautostart-d0b56db6fdd6912498d787f782c8a9e110736c74.tar.gz
kcmautostart-d0b56db6fdd6912498d787f782c8a9e110736c74.zip
Move translations to a new directory layout.
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.txt15
1 files changed, 14 insertions, 1 deletions
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index c938175..70d6348 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -1 +1,14 @@
-add_subdirectory( en )
+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()