Update common cmake rules for documentation.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/6/head
Slávek Banko 4 years ago
parent 098454da64
commit ca3a88f7b8
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -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()

Loading…
Cancel
Save