diff options
author | Slávek Banko <[email protected]> | 2020-04-05 00:31:51 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2020-04-05 00:32:10 +0200 |
commit | f8431c0184aef1755d6284e3d1517a66f11a0d81 (patch) | |
tree | c0742591af742f17bc3fda9ba979632a32dcdbcf /doc/CMakeLists.txt | |
parent | 7ae414de0a2d86d3f65712ede2839d523f8b6665 (diff) | |
download | katapult-f8431c0184aef1755d6284e3d1517a66f11a0d81.tar.gz katapult-f8431c0184aef1755d6284e3d1517a66f11a0d81.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]>
(cherry picked from commit 0edb7c1216264768bcb55bdeb826a76503123f48)
Diffstat (limited to 'doc/CMakeLists.txt')
-rw-r--r-- | doc/CMakeLists.txt | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 6d0aa9f..70d6348 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -1 +1,14 @@ -tde_auto_add_subdirectories( ) +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() |