diff options
author | Slávek Banko <[email protected]> | 2020-04-04 19:59:50 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2020-04-04 19:59:50 +0200 |
commit | 8e90c28fb2501009f259a084bb2e30388ab8e85e (patch) | |
tree | f813bdc1e28abf47f525b635390b7abb3fcca90d /doc/CMakeLists.txt | |
parent | fc6fd4701c95d426dc450e9544248dd36ad64343 (diff) | |
download | filelight-8e90c28fb2501009f259a084bb2e30388ab8e85e.tar.gz filelight-8e90c28fb2501009f259a084bb2e30388ab8e85e.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/CMakeLists.txt')
-rw-r--r-- | doc/CMakeLists.txt | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 03be086..70d6348 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -1,3 +1,14 @@ -# This file is genereted by trinity-automake-cmake-convert script by Fat-Zer +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() |