summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2021-07-26 13:18:27 +0200
committerSlávek Banko <[email protected]>2021-07-26 13:18:41 +0200
commit7c85ade10bc2fb7d0644f67c35fc845bfd69952a (patch)
tree316b57e02b6541d329cad971ad8006e9865591ef
parenta3dbe1192c1a99f4fa8be5c160937458099d30e8 (diff)
downloadklcddimmer-7c85ade10bc2fb7d0644f67c35fc845bfd69952a.tar.gz
klcddimmer-7c85ade10bc2fb7d0644f67c35fc845bfd69952a.zip
Use common rules for build and install documentation and translations.
Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit 8c28c84ffaa6a8b1891b5703f5292f3990d990ca)
-rw-r--r--CMakeLists.txt8
-rw-r--r--doc/en/CMakeLists.txt1
-rw-r--r--doc/html/CMakeLists.txt (renamed from doc/CMakeLists.txt)2
-rw-r--r--doc/html/configure.png (renamed from doc/configure.png)bin20234 -> 20234 bytes
-rw-r--r--doc/html/hi48-app-klcddimmer.png (renamed from doc/hi48-app-klcddimmer.png)bin2620 -> 2620 bytes
-rw-r--r--doc/html/klcddimmer-screenshot.png (renamed from doc/klcddimmer-screenshot.png)bin20979 -> 20979 bytes
-rw-r--r--doc/html/klcddimmer.html (renamed from doc/klcddimmer.html)0
-rw-r--r--translations/CMakeLists.txt1
-rw-r--r--translations/messages/CMakeLists.txt14
9 files changed, 6 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 97da882..d2ac475 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -69,8 +69,12 @@ set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined"
##### directories
add_subdirectory( src )
-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/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/CMakeLists.txt b/doc/html/CMakeLists.txt
index 5a5fbaf..cbd26e0 100644
--- a/doc/CMakeLists.txt
+++ b/doc/html/CMakeLists.txt
@@ -8,5 +8,3 @@ INSTALL(
DESTINATION ${HTML_INSTALL_DIR}/en/${PROJECT_NAME}
)
-
-add_subdirectory( en )
diff --git a/doc/configure.png b/doc/html/configure.png
index c4406e1..c4406e1 100644
--- a/doc/configure.png
+++ b/doc/html/configure.png
Binary files differ
diff --git a/doc/hi48-app-klcddimmer.png b/doc/html/hi48-app-klcddimmer.png
index 41fe9e6..41fe9e6 100644
--- a/doc/hi48-app-klcddimmer.png
+++ b/doc/html/hi48-app-klcddimmer.png
Binary files differ
diff --git a/doc/klcddimmer-screenshot.png b/doc/html/klcddimmer-screenshot.png
index 9c83012..9c83012 100644
--- a/doc/klcddimmer-screenshot.png
+++ b/doc/html/klcddimmer-screenshot.png
Binary files differ
diff --git a/doc/klcddimmer.html b/doc/html/klcddimmer.html
index e7525e6..e7525e6 100644
--- a/doc/klcddimmer.html
+++ b/doc/html/klcddimmer.html
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( )