build: Depend on gtk main for GdkGLTextureBuilder

- Add a meson subproject for building main gtk
- Adapt the docs CI job to install the necessary build deps
- Disable werror in the CI for now, until we port aways from deprecated
APIs
- Switch from using add_global_argument as it would affect subprojects

# Conflicts:
#	.gitignore
This commit is contained in:
Christian Hergert 2023-05-17 13:08:31 -07:00
parent 598e127650
commit 379f2e862a
4 changed files with 18 additions and 5 deletions

3
.gitignore vendored
View File

@ -1,3 +1,6 @@
.flatpak
.flatpak-builder
.vscode
subprojects/gtk
subprojects/libsass
subprojects/sassc

View File

@ -21,9 +21,9 @@ reference:
stage: docs
needs: []
variables:
MESON_FLAGS: "-Dwerror=true --buildtype=release"
MESON_FLAGS: "--buildtype=release -Dgtk:gtk_doc=false -Dgtk:introspection=disabled -Dgtk:build-examples=false -Dgtk:build-tests=false -Dgtk:demos=false -Dgtk:media-gstreamer=disabled -Dlibepoxy:tests=false"
before_script:
- sudo dnf install -y gtk4-devel meson gcc gi-docgen gobject-introspection-devel vala
- sudo dnf install -y git gtk4-devel meson gcc gcc-c++ gi-docgen gobject-introspection-devel vala
script:
- mkdir -p pfx/
- meson ${MESON_FLAGS} --prefix=${PWD}/pfx -Ddocs=true _build

View File

@ -23,7 +23,7 @@ add_project_arguments(['-I' + meson.project_build_root()], language: 'c')
# Check dependencies
glib_req_version = '2.75.0'
gtk_req_version = '4.8'
gtk_req_version = '4.11'
glib_req = '>= @0@'.format(glib_req_version)
gtk_req = '>= @0@'.format(gtk_req_version)
@ -43,7 +43,7 @@ endif
libepoxy_dep = dependency('epoxy')
libgio_dep = dependency('gio-2.0', version: glib_req)
libgiounix_dep = dependency('gio-unix-2.0', version: glib_req)
libgtk_dep = dependency('gtk4', version: gtk_req)
libgtk_dep = dependency('gtk4', version: gtk_req, fallback: ['gtk'])
# Ensure we restrict ABI usage to what we claim
project_c_args += [
@ -141,7 +141,7 @@ test_link_args = [
'-Wl,-z,now',
]
if not get_option('buildtype').startswith('debug') and not meson.is_subproject()
add_global_arguments(['-DG_DISABLE_CAST_CHECKS'], language: 'c')
add_project_arguments(['-DG_DISABLE_CAST_CHECKS'], language: 'c')
release_args += [ '-DG_DISABLE_ASSERT' ]
test_link_args += [
'-Wl,-Bsymbolic',

10
subprojects/gtk.wrap Normal file
View File

@ -0,0 +1,10 @@
[wrap-git]
directory=gtk
url=https://gitlab.gnome.org/GNOME/gtk.git
push-url=ssh://git@gitlab.gnome.org:GNOME/gtk.git
revision=main
depth=1
[provide]
gtk4=libgtk_dep
dependency_names=gtk4