diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2020-10-02 16:02:41 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2020-10-02 16:02:41 +0200 |
commit | 259a640088089028370d4914c923d29010ea87ea (patch) | |
tree | dae96adda5ab66b1d88969e9de44d442367f58a1 /doc | |
parent | e2ded86ad5853c0501144903a5a50d8788ca0a91 (diff) | |
download | kshowmail-259a640088089028370d4914c923d29010ea87ea.tar.gz kshowmail-259a640088089028370d4914c923d29010ea87ea.zip |
Use common cmake rules for documentation.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/CMakeLists.txt | 43 | ||||
-rw-r--r-- | doc/de/CMakeLists.txt | 1 | ||||
-rw-r--r-- | doc/en/CMakeLists.txt | 1 | ||||
-rw-r--r-- | doc/es/CMakeLists.txt | 1 | ||||
-rw-r--r-- | doc/fr/CMakeLists.txt | 1 | ||||
-rw-r--r-- | doc/hu/CMakeLists.txt | 1 | ||||
-rw-r--r-- | doc/it/CMakeLists.txt | 1 | ||||
-rw-r--r-- | doc/ru/CMakeLists.txt | 1 | ||||
-rw-r--r-- | doc/sv/CMakeLists.txt | 1 |
9 files changed, 34 insertions, 17 deletions
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index ca7faeb..f6eec15 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -1,9 +1,34 @@ -add_subdirectory( en ) -add_subdirectory( de ) -add_subdirectory( es ) -add_subdirectory( sv ) -add_subdirectory( fr ) -add_subdirectory( hu ) -add_subdirectory( it ) -add_subdirectory( ru ) -add_subdirectory( man ) +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/doc/de/CMakeLists.txt b/doc/de/CMakeLists.txt deleted file mode 100644 index eca4bd4..0000000 --- a/doc/de/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -tde_create_handbook( DESTINATION ${PROJECT_NAME} LANG de ) diff --git a/doc/en/CMakeLists.txt b/doc/en/CMakeLists.txt deleted file mode 100644 index ba3ef3e..0000000 --- a/doc/en/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -tde_create_handbook( DESTINATION ${PROJECT_NAME} ) diff --git a/doc/es/CMakeLists.txt b/doc/es/CMakeLists.txt deleted file mode 100644 index 7995d65..0000000 --- a/doc/es/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -tde_create_handbook( DESTINATION ${PROJECT_NAME} LANG es ) diff --git a/doc/fr/CMakeLists.txt b/doc/fr/CMakeLists.txt deleted file mode 100644 index 495f168..0000000 --- a/doc/fr/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -tde_create_handbook( DESTINATION ${PROJECT_NAME} LANG fr ) diff --git a/doc/hu/CMakeLists.txt b/doc/hu/CMakeLists.txt deleted file mode 100644 index 9847ebe..0000000 --- a/doc/hu/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -tde_create_handbook( DESTINATION ${PROJECT_NAME} LANG hu ) diff --git a/doc/it/CMakeLists.txt b/doc/it/CMakeLists.txt deleted file mode 100644 index e213f2f..0000000 --- a/doc/it/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -tde_create_handbook( DESTINATION ${PROJECT_NAME} LANG it ) diff --git a/doc/ru/CMakeLists.txt b/doc/ru/CMakeLists.txt deleted file mode 100644 index 33e9cb6..0000000 --- a/doc/ru/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -tde_create_handbook( DESTINATION ${PROJECT_NAME} LANG ru ) diff --git a/doc/sv/CMakeLists.txt b/doc/sv/CMakeLists.txt deleted file mode 100644 index bc04ab0..0000000 --- a/doc/sv/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -tde_create_handbook( DESTINATION ${PROJECT_NAME} LANG sv ) |