diff options
author | Slávek Banko <[email protected]> | 2021-01-15 13:12:21 +0100 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2021-01-15 13:12:21 +0100 |
commit | 8c180d8033d4bbb04f11123703f18ca1aabe0647 (patch) | |
tree | a7ad8e31106c8d16d5f1a10073272545f08b7f4c | |
parent | 7e4f9683593d36b6a5fc70f62fd670d82349eb31 (diff) | |
download | tdenetworkmanager-8c180d8033d4bbb04f11123703f18ca1aabe0647.tar.gz tdenetworkmanager-8c180d8033d4bbb04f11123703f18ca1aabe0647.zip |
Use common cmake rules for documentation.
Move the documentation to the usual layout.
Signed-off-by: Slávek Banko <[email protected]>
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | doc/CMakeLists.txt | 34 | ||||
-rw-r--r-- | doc/en/index.docbook (renamed from tdenetworkmanager/doc/index.docbook) | 0 | ||||
-rw-r--r-- | doc/man/CMakeLists.txt (renamed from tdenetworkmanager/doc/man/CMakeLists.txt) | 0 | ||||
-rw-r--r-- | doc/man/tdenetworkmanager.1 (renamed from tdenetworkmanager/doc/man/tdenetworkmanager.1) | 0 | ||||
-rw-r--r-- | tdenetworkmanager/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tdenetworkmanager/doc/CMakeLists.txt | 11 | ||||
-rw-r--r-- | tdenetworkmanager/doc/Makefile.am | 3 |
8 files changed, 35 insertions, 15 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7818cdb..6b8933d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,6 +81,7 @@ set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" ##### source directories ######################## add_subdirectory( ${PROJECT_NAME} ) +tde_conditional_add_subdirectory( BUILD_DOC doc ) tde_conditional_add_subdirectory( BUILD_TRANSLATIONS translations ) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt new file mode 100644 index 0000000..f6eec15 --- /dev/null +++ b/doc/CMakeLists.txt @@ -0,0 +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 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() diff --git a/tdenetworkmanager/doc/index.docbook b/doc/en/index.docbook index 68e7bfd..68e7bfd 100644 --- a/tdenetworkmanager/doc/index.docbook +++ b/doc/en/index.docbook diff --git a/tdenetworkmanager/doc/man/CMakeLists.txt b/doc/man/CMakeLists.txt index 8512250..8512250 100644 --- a/tdenetworkmanager/doc/man/CMakeLists.txt +++ b/doc/man/CMakeLists.txt diff --git a/tdenetworkmanager/doc/man/tdenetworkmanager.1 b/doc/man/tdenetworkmanager.1 index 0f1abef..0f1abef 100644 --- a/tdenetworkmanager/doc/man/tdenetworkmanager.1 +++ b/doc/man/tdenetworkmanager.1 diff --git a/tdenetworkmanager/CMakeLists.txt b/tdenetworkmanager/CMakeLists.txt index 7e5b76e..1539524 100644 --- a/tdenetworkmanager/CMakeLists.txt +++ b/tdenetworkmanager/CMakeLists.txt @@ -13,7 +13,6 @@ add_subdirectory( pics ) add_subdirectory( src ) add_subdirectory( vpn-plugins ) -tde_conditional_add_subdirectory( BUILD_DOC doc ) install( diff --git a/tdenetworkmanager/doc/CMakeLists.txt b/tdenetworkmanager/doc/CMakeLists.txt deleted file mode 100644 index 76a3432..0000000 --- a/tdenetworkmanager/doc/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -################################################# -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -add_subdirectory( man ) - -tde_create_handbook( DESTINATION ${PROJECT_NAME} ) diff --git a/tdenetworkmanager/doc/Makefile.am b/tdenetworkmanager/doc/Makefile.am deleted file mode 100644 index 4169155..0000000 --- a/tdenetworkmanager/doc/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -KDE_LANG = en -KDE_DOCS = AUTO - |