summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2021-07-22 11:21:34 +0200
committerSlávek Banko <slavek.banko@axis.cz>2021-07-22 11:21:58 +0200
commitd028e4db87dc94990000f2a69a3199705dc783f8 (patch)
treeb42b2189a2f430864646586ee410a942afecd237
parentbd74f270ad7a740e96ed2d9b1e88bf388c208d00 (diff)
downloadkbiff-d028e4db87dc94990000f2a69a3199705dc783f8.tar.gz
kbiff-d028e4db87dc94990000f2a69a3199705dc783f8.zip
Use common rules for build and install documentation and translations.
Simplify the structure of the documentation directories. Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 3b4b5a1fad7ffa13a3c41162eadb51b01915014d)
-rw-r--r--CMakeLists.txt7
-rw-r--r--doc/CMakeLists.txt14
-rw-r--r--doc/de/CMakeLists.txt1
-rw-r--r--doc/de/index.docbook (renamed from doc/de/kbiff/index.docbook)0
-rw-r--r--doc/de/kbiff/CMakeLists.txt1
-rw-r--r--doc/en/CMakeLists.txt1
-rw-r--r--doc/en/index.docbook (renamed from doc/en/kbiff/index.docbook)0
-rw-r--r--doc/en/kbiff.png (renamed from doc/en/kbiff/kbiff.png)bin319 -> 319 bytes
-rw-r--r--doc/en/kbiff/CMakeLists.txt1
-rw-r--r--doc/es/CMakeLists.txt1
-rw-r--r--doc/es/index.docbook (renamed from doc/es/kbiff/index.docbook)0
-rw-r--r--doc/es/kbiff/CMakeLists.txt1
-rw-r--r--doc/fr/CMakeLists.txt1
-rw-r--r--doc/fr/index.docbook (renamed from doc/fr/kbiff/index.docbook)0
-rw-r--r--doc/fr/kbiff/CMakeLists.txt1
-rw-r--r--doc/man/CMakeLists.txt5
-rw-r--r--translations/CMakeLists.txt1
-rw-r--r--translations/messages/CMakeLists.txt14
18 files changed, 5 insertions, 44 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 105ad88..24d2b86 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -76,10 +76,13 @@ set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined"
##### directories
add_subdirectory( ${PROJECT_NAME} )
-tde_conditional_add_subdirectory( BUILD_DOC doc )
-tde_conditional_add_subdirectory( BUILD_TRANSLATIONS translations )
+##### other data ################################
+
+tde_conditional_add_project_docs( BUILD_DOC )
+tde_conditional_add_project_translations( BUILD_TRANSLATIONS )
+
##### write configure files
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
deleted file mode 100644
index 70d6348..0000000
--- a/doc/CMakeLists.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-file( GLOB _dirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} * )
-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( )
- endif()
-endforeach()
diff --git a/doc/de/CMakeLists.txt b/doc/de/CMakeLists.txt
deleted file mode 100644
index 51feb67..0000000
--- a/doc/de/CMakeLists.txt
+++ /dev/null
@@ -1 +0,0 @@
-add_subdirectory( ${PROJECT_NAME} )
diff --git a/doc/de/kbiff/index.docbook b/doc/de/index.docbook
index 881f88e..881f88e 100644
--- a/doc/de/kbiff/index.docbook
+++ b/doc/de/index.docbook
diff --git a/doc/de/kbiff/CMakeLists.txt b/doc/de/kbiff/CMakeLists.txt
deleted file mode 100644
index eca4bd4..0000000
--- a/doc/de/kbiff/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 51feb67..0000000
--- a/doc/en/CMakeLists.txt
+++ /dev/null
@@ -1 +0,0 @@
-add_subdirectory( ${PROJECT_NAME} )
diff --git a/doc/en/kbiff/index.docbook b/doc/en/index.docbook
index c6ac889..c6ac889 100644
--- a/doc/en/kbiff/index.docbook
+++ b/doc/en/index.docbook
diff --git a/doc/en/kbiff/kbiff.png b/doc/en/kbiff.png
index d4cbe40..d4cbe40 100644
--- a/doc/en/kbiff/kbiff.png
+++ b/doc/en/kbiff.png
Binary files differ
diff --git a/doc/en/kbiff/CMakeLists.txt b/doc/en/kbiff/CMakeLists.txt
deleted file mode 100644
index ba3ef3e..0000000
--- a/doc/en/kbiff/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 51feb67..0000000
--- a/doc/es/CMakeLists.txt
+++ /dev/null
@@ -1 +0,0 @@
-add_subdirectory( ${PROJECT_NAME} )
diff --git a/doc/es/kbiff/index.docbook b/doc/es/index.docbook
index b6fca38..b6fca38 100644
--- a/doc/es/kbiff/index.docbook
+++ b/doc/es/index.docbook
diff --git a/doc/es/kbiff/CMakeLists.txt b/doc/es/kbiff/CMakeLists.txt
deleted file mode 100644
index 7995d65..0000000
--- a/doc/es/kbiff/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 51feb67..0000000
--- a/doc/fr/CMakeLists.txt
+++ /dev/null
@@ -1 +0,0 @@
-add_subdirectory( ${PROJECT_NAME} )
diff --git a/doc/fr/kbiff/index.docbook b/doc/fr/index.docbook
index f00c3e2..f00c3e2 100644
--- a/doc/fr/kbiff/index.docbook
+++ b/doc/fr/index.docbook
diff --git a/doc/fr/kbiff/CMakeLists.txt b/doc/fr/kbiff/CMakeLists.txt
deleted file mode 100644
index 495f168..0000000
--- a/doc/fr/kbiff/CMakeLists.txt
+++ /dev/null
@@ -1 +0,0 @@
-tde_create_handbook( DESTINATION ${PROJECT_NAME} LANG fr )
diff --git a/doc/man/CMakeLists.txt b/doc/man/CMakeLists.txt
deleted file mode 100644
index 8512250..0000000
--- a/doc/man/CMakeLists.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-INSTALL(
- FILES ${PROJECT_NAME}.1
- DESTINATION ${MAN_INSTALL_DIR}/man1
- COMPONENT doc
-)
diff --git a/translations/CMakeLists.txt b/translations/CMakeLists.txt
deleted file mode 100644
index 42b186a..0000000
--- a/translations/CMakeLists.txt
+++ /dev/null
@@ -1 +0,0 @@
-tde_auto_add_subdirectories()
diff --git a/translations/messages/CMakeLists.txt b/translations/messages/CMakeLists.txt
deleted file mode 100644
index 75c89f8..0000000
--- a/translations/messages/CMakeLists.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-file( GLOB_RECURSE po_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.po )
-string( REGEX REPLACE "[ \r\n\t]+" ";" _linguas "$ENV{LINGUAS}" )
-
-foreach( _po ${po_files} )
- get_filename_component( _lang ${_po} NAME_WE )
- if( "${_linguas}" MATCHES "^;*$" OR ";${_linguas};" MATCHES ";${_lang};" )
- if( "${_po}" MATCHES "^([^/]*)/.*" )
- string( REGEX REPLACE "^([^/]*)/.*" "\\1" _component "${_po}" )
- else( )
- set( _component "${PROJECT_NAME}" )
- endif( )
- tde_create_translation( FILES ${_po} LANG ${_lang} OUTPUT_NAME ${_component} )
- endif( )
-endforeach( )