From 9755721093439febe785b40b2c9975a45e8dfbbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Thu, 22 Jul 2021 18:16:19 +0200 Subject: [PATCH] Use common rules for build and install documentation and translations. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- CMakeLists.txt | 8 ++++++-- doc/CMakeLists.txt | 2 -- doc/{kaffeine => en}/discwindow.png | Bin doc/{kaffeine => en}/dvbbroadcast.png | Bin doc/{kaffeine => en}/dvbclient.png | Bin doc/{kaffeine => en}/dvbconfig.png | Bin doc/{kaffeine => en}/dvbepg.png | Bin doc/{kaffeine => en}/dvblive.jpg | Bin doc/{kaffeine => en}/dvbscan.png | Bin doc/{kaffeine => en}/dvbtimers.png | Bin doc/{kaffeine => en}/dvbwin.png | Bin doc/{kaffeine => en}/gstpart.png | Bin doc/{kaffeine => en}/index.docbook | 0 doc/{kaffeine => en}/kaffeinepart.png | Bin doc/{kaffeine => en}/playlistwin.png | Bin doc/{kaffeine => en}/startwindow.png | Bin doc/kaffeine/CMakeLists.txt | 8 -------- doc/man/CMakeLists.txt | 5 ----- translations/CMakeLists.txt | 1 - translations/messages/CMakeLists.txt | 14 -------------- 20 files changed, 6 insertions(+), 32 deletions(-) delete mode 100644 doc/CMakeLists.txt rename doc/{kaffeine => en}/discwindow.png (100%) rename doc/{kaffeine => en}/dvbbroadcast.png (100%) rename doc/{kaffeine => en}/dvbclient.png (100%) rename doc/{kaffeine => en}/dvbconfig.png (100%) rename doc/{kaffeine => en}/dvbepg.png (100%) rename doc/{kaffeine => en}/dvblive.jpg (100%) rename doc/{kaffeine => en}/dvbscan.png (100%) rename doc/{kaffeine => en}/dvbtimers.png (100%) rename doc/{kaffeine => en}/dvbwin.png (100%) rename doc/{kaffeine => en}/gstpart.png (100%) rename doc/{kaffeine => en}/index.docbook (100%) rename doc/{kaffeine => en}/kaffeinepart.png (100%) rename doc/{kaffeine => en}/playlistwin.png (100%) rename doc/{kaffeine => en}/startwindow.png (100%) delete mode 100644 doc/kaffeine/CMakeLists.txt delete mode 100644 doc/man/CMakeLists.txt delete mode 100644 translations/CMakeLists.txt delete mode 100644 translations/messages/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index b3edff1..efbf6ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,8 +78,12 @@ 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 633b623..0000000 --- a/doc/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ - -tde_auto_add_subdirectories( ) diff --git a/doc/kaffeine/discwindow.png b/doc/en/discwindow.png similarity index 100% rename from doc/kaffeine/discwindow.png rename to doc/en/discwindow.png diff --git a/doc/kaffeine/dvbbroadcast.png b/doc/en/dvbbroadcast.png similarity index 100% rename from doc/kaffeine/dvbbroadcast.png rename to doc/en/dvbbroadcast.png diff --git a/doc/kaffeine/dvbclient.png b/doc/en/dvbclient.png similarity index 100% rename from doc/kaffeine/dvbclient.png rename to doc/en/dvbclient.png diff --git a/doc/kaffeine/dvbconfig.png b/doc/en/dvbconfig.png similarity index 100% rename from doc/kaffeine/dvbconfig.png rename to doc/en/dvbconfig.png diff --git a/doc/kaffeine/dvbepg.png b/doc/en/dvbepg.png similarity index 100% rename from doc/kaffeine/dvbepg.png rename to doc/en/dvbepg.png diff --git a/doc/kaffeine/dvblive.jpg b/doc/en/dvblive.jpg similarity index 100% rename from doc/kaffeine/dvblive.jpg rename to doc/en/dvblive.jpg diff --git a/doc/kaffeine/dvbscan.png b/doc/en/dvbscan.png similarity index 100% rename from doc/kaffeine/dvbscan.png rename to doc/en/dvbscan.png diff --git a/doc/kaffeine/dvbtimers.png b/doc/en/dvbtimers.png similarity index 100% rename from doc/kaffeine/dvbtimers.png rename to doc/en/dvbtimers.png diff --git a/doc/kaffeine/dvbwin.png b/doc/en/dvbwin.png similarity index 100% rename from doc/kaffeine/dvbwin.png rename to doc/en/dvbwin.png diff --git a/doc/kaffeine/gstpart.png b/doc/en/gstpart.png similarity index 100% rename from doc/kaffeine/gstpart.png rename to doc/en/gstpart.png diff --git a/doc/kaffeine/index.docbook b/doc/en/index.docbook similarity index 100% rename from doc/kaffeine/index.docbook rename to doc/en/index.docbook diff --git a/doc/kaffeine/kaffeinepart.png b/doc/en/kaffeinepart.png similarity index 100% rename from doc/kaffeine/kaffeinepart.png rename to doc/en/kaffeinepart.png diff --git a/doc/kaffeine/playlistwin.png b/doc/en/playlistwin.png similarity index 100% rename from doc/kaffeine/playlistwin.png rename to doc/en/playlistwin.png diff --git a/doc/kaffeine/startwindow.png b/doc/en/startwindow.png similarity index 100% rename from doc/kaffeine/startwindow.png rename to doc/en/startwindow.png diff --git a/doc/kaffeine/CMakeLists.txt b/doc/kaffeine/CMakeLists.txt deleted file mode 100644 index 65ddbc7..0000000 --- a/doc/kaffeine/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -##### help page - - -file( GLOB _srcs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.docbook *.css *.png *.jpg ) -tde_create_handbook( - FILES ${_srcs} - DESTINATION ${PROJECT_NAME} -) 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( )