Commit Graph

337 Commits

Author SHA1 Message Date
Chun-wei Fan
2e34d62111 meson.build: Use CMake to find libjpeg on MSVC-like builds
One may be using IJG libjpeg or libjpeg-turbo to build GTK, and their
build files may or may not generate pkg-config files for us.  To make
things easier, we can make use of CMake's built-in support for finding
IJG libjpeg or libjpeg-turbo.
2022-02-21 17:53:50 +08:00
Chun-wei Fan
6eda5deeff meson.build: Use CMake to find libtiff on MSVC-like
The CMake build files for libtiff may or may not generate pkg-config
files for us, so we can use Meson's CMake support to help us find
libtiff, as CMake has built-in support for finding libtiff.
2022-02-21 17:53:40 +08:00
Chun-wei Fan
83b98738b6 meson.build: Consolidate items with MSVC-like compilers
Add a variable in meson.build that covers Visual Studio-like compilers,
so that we can use it to help us find depedencies using CMake rather
than via pkg-config, where applicable.

Change the existing use case for finding libpng accordingly.
2022-02-21 17:53:31 +08:00
Matthias Clasen
5088103d31 4.6.1 2022-02-11 20:09:15 -05:00
Timm Bäder
7194196100 build: Make GCC ignore fallthrough comments
From the GCC manpage:

> Wimplicit-fallthrough=5 doesn't recognize any comments as
> fallthrough comments, only attributes disable
> the warning.

So, check for the =5 version after checking for the simple version. This
way we get -Wfallhrough with clang and -Wfallthrough -Wfallthrough=5
with GCC, which works.
2022-01-27 16:05:33 +01:00
José Expósito
0f351508bc build: Bump wayland-protocols to v1.23
Part-of: <!3454>
2022-01-26 22:47:51 +01:00
Jonas Ådahl
66ebc660b4 wayland/surface: Use wl_surface_offset() instead of x,y of attach()
This makes the hotspot of DND surfaces work when using the Vulkan and
OpenGL renderers.

This bumps the CI image used to the newly built image. This is needed to
install a new enough libwayland-client.so needed for wl_surface.offset.

This is done by adding wayland as a meson subproject, building it
on-demand if the version in the system is not new enough. As
libwayland-client.so is pulled in implicitly when linking to gtk4, the
compile step needs LD_LIBRARY_PATH set to make ld find the right library
to link to.
2022-01-14 09:27:07 +01:00
Chun-wei Fan
629dcd3dcf meson.build: Don't apply iso-codes cflag on Windows
They are no longer applicable for Windows builds.
2022-01-12 17:29:30 +08:00
Bilal Elmoussaoui
ed3d9aaaed meson: only update-icon-cache when the demos are built
Without building the demos, nothing gets installed into $prefix/share/icons/hicolor. Which makes running 
`gtk4-update-icon-cache` on the machine causes an error. This is easily reproducible on a Windows machine with MSVC where 
there is nothing pre-installed on hicolor icon theme and that makes building gtk without the demos fails with "No such file or directory".
2022-01-09 07:27:59 +00:00
Luca Bacci
1c633cbea2
Add hid.lib to pkg-config file listing 2022-01-02 18:45:17 +01:00
Matthias Clasen
70cb61fb71 4.6.0 2021-12-30 10:31:52 -05:00
Emmanuele Bassi
a70988ecd5 build: Remove deprecated get_pkgconfig_variable()
Replace it with `get_variable(pkgconfig:...)`.
2021-12-24 15:55:26 +00:00
Matthias Clasen
28f0e2eb2a 4.5.1 2021-12-16 21:43:20 -05:00
Matthias Clasen
97c09c827b Fix the targets variable in pc files
This is meant as a space-separated list of
string, so escaping the spaces is uncalled
for.

Fixes: #4486
2021-12-10 11:36:07 -05:00
Matthias Clasen
0370672886 Require meson 0.59
This is needed to fix a regression in our pc file
generation.
2021-12-10 11:34:23 -05:00
Matthias Clasen
4058b80d56 Bump pango req
Require pango 1.50.
2021-12-02 21:24:24 -05:00
Benjamin Otte
c003260d63 build: Actually use the extra warnings
I forgot to remove the '-Werror=' part from all the extra warnings, so
the warning/error flags we generated were '-Werror=-Werror=warning-flag'
or 'W-Werror=warning-flag' - but because our compiler flag checking
infrastructure works so nicely, it just ignored these obviously wrong
flags.

Fixes commit 362e91c40b
2021-11-15 14:59:18 +01:00
Benjamin Otte
362e91c40b build: Don't use any -Werror in release builds
Do kep them for debug and debugoptimized builds though.

Keeping -Werror flags in release builds causes issues with forward
compatibility, when new compiler releases or different toolchains
suddenly cause those warnings to be emitted during compilation.

While we certainly want those issues to be investigated and fixed, they
should not prevent anyone from building GTK until they are.

Resolves #4388
2021-11-10 20:04:07 +01:00
Matthias Clasen
cca8ae04b6 Bump the pango requirement to 1.49.3
Required for new PangoVariant enumeration values.
2021-11-08 14:17:42 -05:00
Carlos Garnacho
206d7635f7 Merge branch 'x11-xi2.4-gestures' into 'master'
Touchpad gestures for X11 (XInput 2.4, X Server 21.1)

See merge request GNOME/gtk!3610
2021-10-28 16:44:52 +00:00
Benjamin Otte
3c9c7a0e72 build: Make sure ifuncs exist when using fp16
Fixes msys compiles on Windows (and everywhere else hopefully).

Fixes #4285
2021-10-22 17:50:42 +02:00
Benjamin Otte
ae8de7168a build: Add a HAVE_EGL define to config.h 2021-10-06 03:43:47 +02:00
Timm Bäder
b7ad3bcf96 build: Print toolchain in summary
Would be nice to print CFLAGS and LDFLAGS as well, but that's not as
easy.
2021-10-02 09:08:14 +02:00
Chun-wei Fan
dbd0ce30d9 meson: Improve search for libpng
On Visual Studio-style builds, it is likely that we do not have pkg-config
files for libpng, so improve the search for libpng by using CMake's built-in
mechanisms for looking for libpng.  This, however, means that we need to use
'png' rather than 'libpng' for the package name to search for.
2021-09-30 16:21:45 +08:00
Povilas Kanapickas
68bd94fa25 gdk/x11: Implement XI2.4 touchpad gesture support 2021-09-27 23:19:33 +03:00
Matthias Clasen
729ba8111a Add code to load jpegs
This lets us avoid gdk-pixbuf for loading
textures from the common image formats.

As a consequence, we are now linking against libjpeg.
2021-09-17 00:25:22 +02:00
Matthias Clasen
a03594df52 Add code to load and save tiff files
Add support for the tiff format, which is flexible
enough to handle all our memory texture formats
without loss.

As a consequence, we are now linking against libtiff.
2021-09-17 00:25:22 +02:00
Matthias Clasen
f51f7f85eb Add code to load and save pngs
Using libpng instead of the lowest-common-denominator
gdk-pixbuf loader. This will allow us to load >8bit data,
and apply gamma and color correction in the future.
For now, this still just provides RGBA8 data.

As a consequence, we are now linking against libpng.
2021-09-17 00:25:22 +02:00
muradm
c9aec9b5a2 Do not require wayland-protocols as dependency in the .pc file
Basically, I was building some packages on Guix. I figured out that
wayland-protocols was listed among propagated-inputs for gtk+ package
(gtk-3-24). propagated-inputs holds a list of runtime dependencies,
that should be available to any other package that depends on gtk+.
While discussing we clarified that wayland-protocols is not runtime
dependency. So I moved it to native-inputs of gtk+ package, which
means that, this dependency will be available only to gtk+ package and
only at build time. Once moved, building of other applications that
depening on gtk+ started to fail.

Investigation showed that, all .pc (pkg-config) files prepared by gtk+
package, was including:

Requires.private: ... wayland-protocols ...

Since it becomes requirement, other applications was failing with
missing dependency wayland-protocols of dependency gtk+, for instance:

-- Checking for module 'gtk+-3.0'
--   Package 'wayland-protocols', required by 'gdk-3.0', not found

While actually wayland-protocols is not even a build time dependency
of application that depends on gtk+. Advertisement of such
requirement, is a bit misleading, because one does not need it at
runtime, especially applications based on gtk.
2021-09-16 20:31:30 +03:00
Matthias Clasen
76f481eb7b Stop using config.h.meson
It isn't necessary and makes us miss defines when
we forget to update it.
2021-09-10 21:08:07 -04:00
Matthias Clasen
bd4d24f8ed Bump pango req to 1.49.1
We are using pango api that was introduced in 1.49.1
without ifdefs, so we should require it.
2021-09-05 10:58:50 -04:00
Matthias Clasen
bea4aa31ea Bump Pango dep
Require Pango 1.49, so we can support new attributes
without too much ifdeffery.
2021-08-22 15:23:42 -04:00
Matthias Clasen
94e68b0e36 Bump version to 4.5
4.4 has been branched off.
2021-08-22 13:06:29 -04:00
Matthias Clasen
f1f197e3b9 4.4.0 2021-08-20 15:10:25 -04:00
Simon Ser
ad0c1d4dbe gdk/wayland: add support for wl_seat version 7
Version 7 requires wl_keyboard keymaps to be mapped with
MAP_PRIVATE, so that the compositor can share the same keymap
file between multiple clients.
2021-08-11 16:37:03 +02:00
Matthias Clasen
0bf46b4845 Bump the harfbuzz dep
We need 2.1.0, which has the hb_ot_color apis that we
are going to use in the next commit.
2021-07-31 16:34:38 -04:00
Matthias Clasen
39005461c5 4.3.2 2021-07-24 22:04:49 -04:00
Benjamin Otte
f2b41e708d build: Build demos before tools
That's a sneaky trick so my edit/compile/test cycle goes faster:
I usually use demos for testing so the tools don't have to be linked for
me to start testing.
2021-07-22 16:06:05 +02:00
Benjamin Otte
0ae2acfb1a x11: Remove XComposite
It's only used during DND to allow use of the root window's cow window
as a DND target, because apparently gnome-shell used to think that was a
great idea to DND to the overview.

Somebody complain to gnome-shell devs about it not being a good idea if
they want it fixed.
Potentially using Wayland is a better idea though.

This reverts 85ae875dcb

Related: https://bugzilla.gnome.org/show_bug.cgi?id=601731
2021-07-20 14:00:25 -04:00
Benjamin Otte
e544c891ca build: Make all X11 extensions mandatory
It's not 2011 anymore, and we shouldn't randomly build one of 10.000
different combinations of X11 backends (I counted the possibilities) but
exactly the one we expect people to use.
2021-07-20 14:00:25 -04:00
Benjamin Otte
af0c95c11a build: Remove sassc option
Instead, ensure that sassc is made madatory on git builds (because
it is, we don't ship CSS files anymore) and not even looked for in
release builds (because do ship CSS files there).
2021-07-20 14:00:25 -04:00
Maximiliano Sandoval R
94c2072be8
meson: Use a valid SPDX identifier
See https://mesonbuild.com/Reference-manual.html#license
2021-07-16 11:14:46 +02:00
Marco Trevisan (Treviño)
d5f2b69d0c build: Get typelib dir dynamically using gobject-introspection dependency
We hardcoded the typelib directory for only an arch (and a distro),
while we can just get it from gobject-introspection pkg config if tests
are enabled.
2021-07-08 04:59:10 +02:00
Xavier Claessens
0fd790eb8d Meson: Only g-ir-scanner warnings fatal when buit with -Dwerror=true
Also fix deprecation warning that requires using fatal_warnings kwarg
from Meson 0.55.0.

Fixes: #4072.
2021-06-25 11:38:11 -04:00
Matthias Clasen
143770f16d 4.3.1 2021-06-09 18:23:47 -04:00
Dan Cîrnaț
13b94dab10 Conditional check for gdesktopappinfo header
GDesktopAppInfo is not available on macOS and needs to be disabled
2021-05-06 10:38:41 +02:00
Matthias Clasen
6a24e0c7c3 Add an introspection api test
Every beginning is small... just check one constant for now.
2021-05-05 19:18:32 -04:00
Matthias Clasen
c8eeb46aa5 Merge branch 'update-ci-to-f34' into 'master'
WIP ci: Update the image to Fedora 34

See merge request GNOME/gtk!3516
2021-05-05 23:17:07 +00:00
Matthias Clasen
930ff499ee Confine -mf16c to a single source file
We can't use this flag for any code that may get run
outside the __builtin_cpu_supports() check, and meson
doesn't allow per-file cflags. So we have to split this
code off into its own static library.
2021-05-05 18:58:23 -04:00
Xavier Claessens
f4dc24c3da Meson: gdk-pixbuf jpeg/png options changed to feature 2021-05-05 16:40:57 -04:00