summaryrefslogtreecommitdiffstats
path: root/doc/CMakeLists.txt
diff options
context:
space:
mode:
authorgregory guy <gregory-tde@laposte.net>2020-11-19 15:34:21 +0100
committerMichele Calgaro <michele.calgaro@yahoo.it>2020-11-22 11:59:10 +0800
commit43dcc7c7e53fb20eee883ecb8837f9c7cd43899d (patch)
tree874bd1313d9444c0aa661db4d2f3952a2a1d946e /doc/CMakeLists.txt
parent55522e2e3f762f435a97cf3bfc4d83df27be1002 (diff)
downloadbasket-43dcc7c7e53fb20eee883ecb8837f9c7cd43899d.tar.gz
basket-43dcc7c7e53fb20eee883ecb8837f9c7cd43899d.zip
Drop automake build support.
Add basic cmake build instructions. Delete empty files ChangeLog, NEWS and TODO. Rework of the README file. Update some cmake files with latest macros. Signed-off-by: gregory guy <gregory-tde@laposte.net> (cherry picked from commit 039945bdcc926c6460cfb2c4372f370744b16d22)
Diffstat (limited to 'doc/CMakeLists.txt')
-rw-r--r--doc/CMakeLists.txt38
1 files changed, 29 insertions, 9 deletions
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()