From 95a6a36403a289814bb252cd5496e4d67d331b11 Mon Sep 17 00:00:00 2001 From: gregory guy Date: Tue, 2 Mar 2021 13:57:11 +0100 Subject: Drop automake build support. Add basic cmake build instructions. Delete empty file NEWS. Rework of the README and the English help page files. Update some cmake files with latest macros. libXv and libXext are handled by cmake intern modules through X11 variables. Few cosmetics. Signed-off-by: gregory guy --- doc/CMakeLists.txt | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) (limited to 'doc/CMakeLists.txt') diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 70d6348..f6eec15 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -1,14 +1,34 @@ 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 ${_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( ) +foreach( _dir IN LISTS _dirs ) + if( IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${_dir} + AND ( "${_dir}" STREQUAL "en" OR + "${_linguas}" MATCHES "^;*$" OR + ";${_linguas};" MATCHES ";${_dir};" )) + file( GLOB _doc_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/${_dir} ${_dir}/*.docbook ) + if( _doc_files ) + list( FIND _doc_files "index.docbook" _find_index ) + if( -1 EQUAL _find_index ) + set( _noindex "NOINDEX" ) + else() + unset( _noindex ) + endif() + tde_create_handbook( + SOURCE_BASEDIR ${_dir} + ${_noindex} + LANG ${_dir} + DESTINATION ${PROJECT_NAME} + ) + endif() 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() -- cgit v1.2.1