[gxml] Disable docs and introspection: easy subproject



commit 182e8688019b9c8e050f2a014c8f995a840f2a68
Author: Daniel Espinosa <esodan gmail com>
Date:   Fri Mar 22 17:33:54 2019 -0600

    Disable docs and introspection: easy subproject
    
    This makes gxml better for inclusion as subproject

 .gitlab-ci.yml    | 4 ++--
 gxml/meson.build  | 4 +++-
 meson.build       | 2 ++
 meson_options.txt | 4 +++-
 4 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 336779e..8c3dad1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -23,7 +23,7 @@ before_script:
 build-gxml:
   stage: build
   script:
-  - meson _build
+  - meson _build -Ddisable-introspection=false -Ddisable-valadocs=false
   - cd _build
   - ninja
   - meson test
@@ -61,7 +61,7 @@ package-tar-meson:
 pages:
   stage: deploy
   script:
-  - meson _build
+  - meson _build -Ddisable-valadocs=false
   - cd _build
   - ninja
   - mv docs/GXml-* ../public
diff --git a/gxml/meson.build b/gxml/meson.build
index 01633d8..c5a3fef 100644
--- a/gxml/meson.build
+++ b/gxml/meson.build
@@ -169,9 +169,10 @@ libgxml = library(VERSIONED_PROJECT_NAME,
                true,
                join_paths (get_option('includedir'), 'gxml-@0@'.format (API_VERSION), 'gxml'),
                vapidir,
-               true
+               not get_option('disable-introspection')
        ])
 
+if not get_option('disable-introspection')
 g_ir_compiler = find_program('g-ir-compiler', required: false)
 if g_ir_compiler.found()
 custom_target('typelib',
@@ -186,6 +187,7 @@ custom_target('typelib',
        install: true,
        install_dir: join_paths(get_option('libdir'), 'girepository-1.0'))
 endif
+endif
 
 
 libgxml_dep = declare_dependency(include_directories : inc_rooth,
diff --git a/meson.build b/meson.build
index 9224887..69ca78d 100644
--- a/meson.build
+++ b/meson.build
@@ -20,6 +20,8 @@ inc_rooth_dep = declare_dependency (include_directories : inc_rooth)
 subdir('po')
 subdir('vapi')
 subdir('gxml')
+if not get_option('disable-valadocs')
 subdir('docs')
+endif
 subdir('test')
 subdir('examples')
diff --git a/meson_options.txt b/meson_options.txt
index ac3306b..b55f11f 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1 +1,3 @@
-option('enable-tnode-tests', type : 'boolean', value : false, description : 'Enable TNode classes unit 
tests')
\ No newline at end of file
+option('enable-tnode-tests', type : 'boolean', value : false, description : 'Enable TNode classes unit 
tests')
+option('disable-introspection', type : 'boolean', value : true, description : 'Disable GObject 
Introspection')
+option('disable-valadocs', type : 'boolean', value : true, description : 'Disable Vala Documentation')


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