[gnome-calculator] GCalc: build avoiding any UI library or the app



commit bf5f24fe1299f78c8f31d97206e152366e69e439
Author: Daniel Espinosa <esodan gmail com>
Date:   Wed Apr 13 19:20:10 2022 -0500

    GCalc: build avoiding any UI library or the app

 doc/meson.build   |  6 ++++++
 meson.build       | 11 ++++++++++-
 meson_options.txt |  2 ++
 3 files changed, 18 insertions(+), 1 deletion(-)
---
diff --git a/doc/meson.build b/doc/meson.build
index 3523f891..cf7215b4 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -3,6 +3,7 @@ if valadoc.found()
        gtkdoc_outdir = CAMEL_CASE_NAME+'-'+API_VERSION
        docsdir = join_paths (get_option ('datadir'), 'devhelp','books')
 
+if get_option('gcalc')
        custom_target ('libgcalc_valadocs',
                        input : gcalc_sources,
                        output : CAMEL_CASE_NAME+'-'+API_VERSION,
@@ -27,6 +28,9 @@ if valadoc.found()
                        install_dir : docsdir,
                        depends: libgcalc
                        )
+endif
+
+if not get_option('disable-ui') and get_option('gci')
        gtkdoc_outdir = GCI_CAMEL_CASE_NAME+'-'+GCI_API_VERSION
        docsdir = join_paths (get_option ('datadir'), 'devhelp','books')
 
@@ -54,3 +58,5 @@ if valadoc.found()
                        depends: libgcalc
                        )
 endif
+
+endif
diff --git a/meson.build b/meson.build
index 4d5cf01e..d68f994d 100644
--- a/meson.build
+++ b/meson.build
@@ -81,25 +81,34 @@ configure_file(output: 'config.h', configuration: conf)
 config_h_dir = include_directories('.')
 
 # Extra scripts
+if not get_option('disable-ui')
 gnome.post_install(
   glib_compile_schemas: true,
   gtk_update_icon_cache: true,
 )
+endif
 
 # Subdirs
 subdir('vapi')
+if get_option ('gcalc')
 subdir('gcalc')
+endif
 if not get_option ('disable-ui')
 gtk = dependency('gtk4', version: '>= 4.4.1')
 libadwaita = dependency('libadwaita-1', version: '>= 1.0.0')
+
+if get_option('gci')
 subdir('gci')
+endif
+
 gtksourceview = dependency('gtksourceview-5', version: '>= 5.3.0')
 subdir('data')
 subdir('lib')
 subdir('src')
 subdir('search-provider')
 subdir('help')
-subdir('doc')
 subdir('po')
 endif
+
+subdir('doc')
 subdir('tests')
diff --git a/meson_options.txt b/meson_options.txt
index 2fb0b591..f9316d57 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -4,3 +4,5 @@ option('disable-introspection', type : 'boolean', value : false, description : '
 option('ui-tests', type : 'boolean', value : false, description : 'Execute UI tests: requires 
X/Wayland/Broadway/Windows server')
 option('libpath', type: 'string', value : '', description : 'Used to add search path for libraries like mpc')
 option('development', type: 'boolean', value: false, description: 'If this is a development build')
+option('gcalc', type: 'boolean', value: true, description: 'Build GCalc library')
+option('gci', type: 'boolean', value: true, description: 'Build GCalc UI library')


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