From 8e90c28fb2501009f259a084bb2e30388ab8e85e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sat, 4 Apr 2020 19:59:50 +0200 Subject: Move translations to a new directory layout. Add support for LINGUAS for listing translations to install. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- doc/CMakeLists.txt | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'doc/CMakeLists.txt') 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() -- cgit v1.2.1