[rygel/wip/meson: 34/44] meson: Add option to enable/disable apidocs



commit 1eed0b0bdf47c15b5a72b515f9331e4b5fd4fa2f
Author: Jens Georg <mail jensge org>
Date:   Fri Oct 12 13:38:08 2018 +0200

    meson: Add option to enable/disable apidocs

 doc/reference/librygel-core/meson.build         | 10 ++++++----
 doc/reference/librygel-db/meson.build           |  9 ++++++---
 doc/reference/librygel-renderer-gst/meson.build | 10 +++++++---
 doc/reference/librygel-renderer/meson.build     |  8 ++++++--
 doc/reference/librygel-server/meson.build       |  8 ++++++--
 meson_options.txt                               |  1 +
 6 files changed, 32 insertions(+), 14 deletions(-)
---
diff --git a/doc/reference/librygel-core/meson.build b/doc/reference/librygel-core/meson.build
index 48569671..24dc02f8 100644
--- a/doc/reference/librygel-core/meson.build
+++ b/doc/reference/librygel-core/meson.build
@@ -1,3 +1,4 @@
+if valadoc.found()
 core_doc_common_args = [
         '--package-name', 'librygel-core',
         '--package-version', '2.6',
@@ -17,7 +18,7 @@ custom_target('valadoc-core',
     input: core_sources,
     output: 'valadoc',
     depends : core_lib,
-    build_by_default : true,
+    build_by_default : get_option('api-docs'),
     command :
     [
         valadoc,
@@ -27,11 +28,12 @@ custom_target('valadoc-core',
     ]
 )
 
+if gtkdoc.found()
 custom_target('gtkdoc-core',
     input: core_sources,
     output: 'gtkdoc',
     depends : core_lib,
-    build_by_default : true,
+    build_by_default : get_option('api-docs'),
     command :
     [
         valadoc,
@@ -45,5 +47,5 @@ custom_target('gtkdoc-core',
         core_sources
     ]
 )
-
-
+endif
+endif
diff --git a/doc/reference/librygel-db/meson.build b/doc/reference/librygel-db/meson.build
index bc8e928b..6cc091a6 100644
--- a/doc/reference/librygel-db/meson.build
+++ b/doc/reference/librygel-db/meson.build
@@ -1,3 +1,4 @@
+if valadoc.found()
 db_doc_common_args = [
         '--package-name', 'librygel-db',
         '--package-version', '2.6',
@@ -23,7 +24,7 @@ custom_target('valadoc-db',
     input: db_sources,
     output: 'valadoc',
     depends: db_lib,
-    build_by_default : true,
+    build_by_default : get_option('api-docs'),
     command :
     [
         valadoc,
@@ -33,11 +34,12 @@ custom_target('valadoc-db',
     ]
 )
 
+if gtkdoc.found()
 custom_target('gtkdoc-db',
     input: db_sources,
     output: 'gtkdoc',
     depends : db_lib,
-    build_by_default : true,
+    build_by_default : get_option('api-docs'),
     command :
     [
         valadoc,
@@ -52,4 +54,5 @@ custom_target('gtkdoc-db',
         db_sources
     ]
 )
-
+endif
+endif
diff --git a/doc/reference/librygel-renderer-gst/meson.build b/doc/reference/librygel-renderer-gst/meson.build
index a7a3de84..7d7d99ea 100644
--- a/doc/reference/librygel-renderer-gst/meson.build
+++ b/doc/reference/librygel-renderer-gst/meson.build
@@ -1,3 +1,4 @@
+if valadoc.found()
 renderer_gst_doc_common_args = [
         '--package-name', 'librygel-renderer-gst',
         '--package-version', '2.6',
@@ -26,7 +27,7 @@ custom_target('valadoc-renderer-gst',
     input: renderer_gst_sources,
     output: 'valadoc',
     depends : renderer_gst_lib,
-    build_by_default : true,
+    build_by_default : get_option('api-docs'),
     command :
     [
         valadoc,
@@ -36,11 +37,12 @@ custom_target('valadoc-renderer-gst',
     ]
 )
 
+if gtkdoc.found()
 custom_target('gtkdoc-renderer-gst',
     input: renderer_gst_sources,
     output: 'gtkdoc',
     depends : renderer_gst_lib,
-    build_by_default : true,
+    build_by_default : get_option('api-docs'),
     command :
     [
         valadoc,
@@ -56,4 +58,6 @@ custom_target('gtkdoc-renderer-gst',
         '-X', join_paths(meson.build_root(), 'src/librygel-renderer-gst/librygel-renderer-gst-2.6.so'),
         renderer_gst_sources
     ]
-)
\ No newline at end of file
+)
+endif
+endif
diff --git a/doc/reference/librygel-renderer/meson.build b/doc/reference/librygel-renderer/meson.build
index f09e8d53..fab0fdb0 100644
--- a/doc/reference/librygel-renderer/meson.build
+++ b/doc/reference/librygel-renderer/meson.build
@@ -1,3 +1,4 @@
+if valadoc.found()
 renderer_doc_common_args = [
         '--package-name', 'librygel-renderer',
         '--package-version', '2.6',
@@ -22,7 +23,7 @@ custom_target('valadoc-renderer',
     input: renderer_sources,
     output: 'valadoc',
     depends: renderer_lib,
-    build_by_default : true,
+    build_by_default : get_option('api-docs'),
     command :
     [
         valadoc,
@@ -32,11 +33,12 @@ custom_target('valadoc-renderer',
     ]
 )
 
+if gtkdoc.found()
 custom_target('gtkdoc-renderer',
     input: renderer_sources,
     output: 'gtkdoc',
     depends : renderer_lib,
-    build_by_default : true,
+    build_by_default : get_option('api-docs'),
     command :
     [
         valadoc,
@@ -51,3 +53,5 @@ custom_target('gtkdoc-renderer',
         renderer_sources
     ]
 )
+endif
+endif
diff --git a/doc/reference/librygel-server/meson.build b/doc/reference/librygel-server/meson.build
index 08ef35a6..ad2a4cd5 100644
--- a/doc/reference/librygel-server/meson.build
+++ b/doc/reference/librygel-server/meson.build
@@ -1,3 +1,4 @@
+if valadoc.found()
 server_doc_common_args = [
         '--package-name', 'librygel-server',
         '--package-version', '2.6',
@@ -23,7 +24,7 @@ custom_target('valadoc-server',
     input: server_sources,
     output: 'valadoc',
     depends : server_lib,
-    build_by_default : true,
+    build_by_default : get_option('api-docs'),
     command :
     [
         valadoc,
@@ -33,11 +34,12 @@ custom_target('valadoc-server',
     ]
 )
 
+if gtkdoc.found()
 custom_target('gtkdoc-server',
     input: server_sources,
     output: 'gtkdoc',
     depends : server_lib,
-    build_by_default : true,
+    build_by_default : get_option('api-docs'),
     command :
     [
         valadoc,
@@ -52,3 +54,5 @@ custom_target('gtkdoc-server',
         server_sources
     ]
 )
+endif
+endif
diff --git a/meson_options.txt b/meson_options.txt
index 2f534811..b9e0f837 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1 +1,2 @@
 option('uninstalled', type: 'boolean', value: 'false', description: 'Run Rygel from build directory only')
+option('api-docs', type: 'boolean', value: 'false', description: 'Build the API documentation')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]