From ca3a88f7b8e91f97d96d06dd8a6d6a1893c73b3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Fri, 2 Oct 2020 16:10:18 +0200 Subject: [PATCH] Update common cmake rules for documentation. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- doc/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 2fbde7f..f6eec15 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -1,9 +1,10 @@ file( GLOB _dirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} * ) +list( REMOVE_ITEM _dirs html man ) + string( REGEX REPLACE "[ \r\n\t]+" ";" _linguas "$ENV{LINGUAS}" ) foreach( _dir IN LISTS _dirs ) if( IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${_dir} - AND NOT "${_dir}" STREQUAL "man" AND ( "${_dir}" STREQUAL "en" OR "${_linguas}" MATCHES "^;*$" OR ";${_linguas};" MATCHES ";${_dir};" )) @@ -25,6 +26,9 @@ foreach( _dir IN LISTS _dirs ) endif() endforeach() +if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/html/CMakeLists.txt ) + add_subdirectory( html ) +endif() if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/man/CMakeLists.txt ) add_subdirectory( man ) endif()