summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2022-09-14 15:03:43 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2022-09-14 15:03:43 +0100
commit32edf9c01a68473f58b540da5371737bbc2ed2a3 (patch)
tree8edec5d8ea7b4193ee01b2992a2b496d0ebf83be
parent4f4ac4ac1a972c2c01b19938b4d30587b7535fc8 (diff)
downloadglib-32edf9c01a68473f58b540da5371737bbc2ed2a3.tar.gz
Build API docs only with shared libraries
Building the references requires libraries with all their symbols available. Passing `-Dgtk_doc=true` and `-Ddefault_library=static` should be considered a configuration error.
-rw-r--r--docs/reference/meson.build6
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/reference/meson.build b/docs/reference/meson.build
index ad1b9e353..dcaa5c276 100644
--- a/docs/reference/meson.build
+++ b/docs/reference/meson.build
@@ -49,6 +49,12 @@ if get_option('gtk_doc')
default_options : ['tests=false'])
endif
+# We cannot built the API reference off of a static library,
+# as symbols might get dropped by the linker
+if get_option('gtk_doc') and get_option('default_library') == 'static'
+ error('The API reference can only be built against a shared library')
+endif
+
subdir('gio')
subdir('glib')
subdir('gobject')