Commit 1262d0c6 authored by Emmanuele Bassi's avatar Emmanuele Bassi
Browse files

Avoid absolute paths when building the API reference

We should always use relative paths, or include_directories objects, to
allow using GTK as a subproject.
parent 547e5bf1
......@@ -33,14 +33,16 @@ private_headers = [
'gdktextureprivate.h',
'gdkvulkancontextprivate.h',
'keyname-table.h',
'x11/gdkprivate-x11.h',
'gdkprivate-x11.h',
'x11/gdkeventsource.h',
'wayland/keyboard-shortcuts-inhibit-unstable-v1-client-protocol.h',
'wayland/pointer-gestures-unstable-v1-client-protocol.h',
'wayland/server-decoration-client-protocol.h',
'wayland/tablet-unstable-v2-client-protocol.h',
'wayland/xdg-foreign-unstable-v1-client-protocol.h',
'wayland/xdg-shell-unstable-v6-client-protocol.h',
'gtk-primary-selection-client-protocol.h',
'gtk-shell-client-protocol.h',
'keyboard-shortcuts-inhibit-unstable-v1-client-protocol.h',
'pointer-gestures-unstable-v1-client-protocol.h',
'server-decoration-client-protocol.h',
'tablet-unstable-v2-client-protocol.h',
'xdg-foreign-unstable-v1-client-protocol.h',
'xdg-shell-unstable-v6-client-protocol.h',
'win32',
'quartz',
'broadway',
......@@ -91,13 +93,12 @@ gnome.gtkdoc('gdk4',
mode: 'none',
main_xml: 'gdk4-docs.xml',
src_dir: [
join_paths(meson.source_root(), 'gdk'),
join_paths(meson.source_root(), 'gdk', 'x11'),
join_paths(meson.source_root(), 'gdk', 'wayland'),
join_paths(meson.build_root(), 'gdk'),
gdkinc,
gdkx11_inc,
gdkwayland_inc,
],
dependencies: libgtk_dep,
gobject_typesfile: join_paths(meson.source_root(), 'docs/reference/gdk/gdk4.types'),
gobject_typesfile: join_paths(meson.current_source_dir(), 'gdk4.types'),
scan_args: [
'--ignore-decorators=_GDK_EXTERN|G_GNUC_WARN_UNUSED_RESULT',
'--ignore-headers=' + ' '.join(private_headers),
......
......@@ -40,11 +40,10 @@ gnome.gtkdoc('gsk4',
mode: 'none',
main_xml: 'gsk4-docs.xml',
src_dir: [
join_paths(meson.source_root(), 'gsk'),
join_paths(meson.build_root(), 'gsk'),
gskinc,
],
dependencies: libgtk_dep,
gobject_typesfile: join_paths(meson.source_root(), 'docs/reference/gsk/gsk4.types'),
gobject_typesfile: join_paths(meson.current_source_dir(), 'gsk4.types'),
scan_args: [
'--ignore-decorators=_GDK_EXTERN',
'--ignore-headers=' + ' '.join(private_headers),
......
......@@ -207,17 +207,18 @@ else
types_conf.set('DISABLE_ON_QUARTZ', '')
endif
configure_file(input: 'gtk4.types.in', output: 'gtk4.types', configuration: types_conf)
gnome.gtkdoc('gtk4',
mode: 'none',
main_xml: 'gtk4-docs.xml',
src_dir: [
join_paths(meson.source_root(), 'gtk'),
join_paths(meson.build_root(), 'gtk'),
gtkinc,
],
dependencies: libgtk_dep,
gobject_typesfile: 'gtk4.types',
gobject_typesfile: configure_file(
input: 'gtk4.types.in',
output: 'gtk4.types',
configuration: types_conf,
),
scan_args: [
'--ignore-decorators=_GDK_EXTERN|G_GNUC_WARN_UNUSED_RESULT',
'--ignore-headers=' + ' '.join(private_headers),
......
......@@ -154,8 +154,9 @@ gdkversionmacros = configure_file(
install_dir: join_paths(gtk_includedir, 'gtk-4.0/gdk'))
gdkinc = include_directories('.')
gdkx11_inc = include_directories('x11')
gdkwayland_inc = include_directories('wayland')
xinc = include_directories('x11')
wlinc = include_directories('.')
gdk_gen_headers = [gdkenum_h, gdkmarshal_h, gdkconfig, gdkversionmacros]
......@@ -220,7 +221,7 @@ endif
libgdk = static_library('gdk',
sources: [gdk_sources, gdk_backends_gen_headers, gdkconfig],
dependencies: gdk_deps,
include_directories: [confinc, xinc, wlinc],
include_directories: [confinc, gdkx11_inc, wlinc],
c_args: [
'-DGDK_COMPILATION',
'-DG_LOG_DOMAIN="Gdk"',
......@@ -233,5 +234,5 @@ libgdk = static_library('gdk',
# "public" libgtk_dep used by internal executables.
libgdk_dep = declare_dependency(
sources: ['gdk.h', gdkconfig, gdkenum_h],
include_directories: [confinc, xinc, wlinc],
include_directories: [confinc, gdkx11_inc, wlinc],
dependencies: gdk_deps)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment