diff options
author | Slávek Banko <[email protected]> | 2020-05-06 13:55:55 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2020-05-06 13:59:42 +0200 |
commit | 68c3e4dcfa673a316a4688361cafeb0588ae90d7 (patch) | |
tree | f8457cab88a01d8d661a8488ae92218d01290268 /doc | |
parent | eb210ed90ad97dcaaead3d730e4e53052951eee7 (diff) | |
download | tdmtheme-68c3e4dcfa673a316a4688361cafeb0588ae90d7.tar.gz tdmtheme-68c3e4dcfa673a316a4688361cafeb0588ae90d7.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 70377a7aef85aa6d77917861941e0344a4f778ba)
Diffstat (limited to 'doc')
-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 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() |