summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2019-02-10 16:22:59 +0100
committerSlávek Banko <[email protected]>2019-02-10 16:23:37 +0100
commit2aebb287fa8672fd2a8b461c0eee6f020776c5c3 (patch)
treefa36e0e332895476ccead28104c568ec91ec700b
parente404567f7756495e486bda95b43dc68e3b1b5486 (diff)
downloaddolphin-2aebb287fa8672fd2a8b461c0eee6f020776c5c3.tar.gz
dolphin-2aebb287fa8672fd2a8b461c0eee6f020776c5c3.zip
cmake: Add rules to build documentation and translations.
This partially resolves issue #2. Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit 707a1272fc03fdc92279d73e702cb1bd51f89aa2)
-rw-r--r--CMakeLists.txt9
-rw-r--r--doc/CMakeLists.txt1
-rw-r--r--doc/en/CMakeLists.txt1
-rw-r--r--po/CMakeLists.txt6
4 files changed, 17 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 384b3e9..6b2bf44 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -45,6 +45,13 @@ tde_setup_paths( )
# option( WITH_LIBVISUAL "Enable libvisual support" OFF )
+##### user requested modules
+
+option( BUILD_ALL "Build all" ON )
+option( BUILD_DOC "Build documentation" ${BUILD_ALL} )
+option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} )
+
+
##### configure checks ##########################
include( ConfigureChecks.cmake )
@@ -64,6 +71,8 @@ set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined"
##### source directories ########################
add_subdirectory( src )
+tde_conditional_add_subdirectory( BUILD_DOC doc )
+tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po )
##### write configure files #####################
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
new file mode 100644
index 0000000..6d0aa9f
--- /dev/null
+++ b/doc/CMakeLists.txt
@@ -0,0 +1 @@
+tde_auto_add_subdirectories( )
diff --git a/doc/en/CMakeLists.txt b/doc/en/CMakeLists.txt
new file mode 100644
index 0000000..d947fd9
--- /dev/null
+++ b/doc/en/CMakeLists.txt
@@ -0,0 +1 @@
+tde_create_handbook( DESTINATION d3lphin )
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
new file mode 100644
index 0000000..821909f
--- /dev/null
+++ b/po/CMakeLists.txt
@@ -0,0 +1,6 @@
+# build translations if some are already available
+
+file( GLOB _srcs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.po )
+if( _srcs )
+ tde_create_translation( LANG auto OUTPUT_NAME d3lphin )
+endif( )