Commit Graph

50526 Commits

Author SHA1 Message Date
Emmanuele Bassi
a900bfc6cf build: Ensure that Vulkan shaders are rebuilt if glslc is found
If glslc is found, rebuild the shaders from GLSL to SPIR-V; otherwise,
we're just going to use the built files we have committed in the source
repository.
2017-04-28 23:12:52 +01:00
Emmanuele Bassi
f8b5ee0537 build: Add post-install script
When building GTK+ straight from the repository without any assistance
from packaging tools, we need to trigger system-wide updates, like the
icon theme cache update, or the schema compilation.
2017-04-28 23:12:52 +01:00
Emmanuele Bassi
ccbfa40c69 build: Clean up Wayland protocol code generation
We can build the name of the input and output files for the Wayland
protocols we use from the protocol name, stability, and version. This is
similar to how the autotools build does it, except much more clear and
without shelling out twice to sed just to resolve the Makefile rule.
2017-04-28 23:12:52 +01:00
Emmanuele Bassi
6bddf5489a build: Add Meson options for quartz/win32 backends 2017-04-28 23:12:52 +01:00
Emmanuele Bassi
b4c45a1755 build: Disable introspection generation
Currently gobject-introspection is badly borked with Meson.

This will need to be reverted.
2017-04-28 23:12:52 +01:00
Emmanuele Bassi
f4203b712e build: Rename GSK resource generator script
Maintain the naming convention, since we have similar scripts for GDK
and GTK already.
2017-04-28 23:12:52 +01:00
Emmanuele Bassi
4e86d53923 build: Generate the API references (WIP)
Still a work in progress.
2017-04-28 23:12:52 +01:00
Emmanuele Bassi
b56f521374 build: Add the appropriate inclusion paths for libgtk 2017-04-28 23:12:52 +01:00
Emmanuele Bassi
63a43b00f2 build: Disable deprecation warnings for input methods 2017-04-28 23:12:52 +01:00
Emmanuele Bassi
24bd93451e docs: Rename files to match type and version
The main GDK API reference index is XML, not SGML.

The overrides file is for GDK 4.x, not 3.x.
2017-04-28 23:12:52 +01:00
Emmanuele Bassi
e4e7c85b5f Remove gdkkeysyms-compat.h
The compatibility header was needed after GTK+ 3.0 renamed the key
symbols from `GDK_*` to `GDK_KEY_*` to avoid collisions.
2017-04-28 23:12:52 +01:00
Emmanuele Bassi
e060ae3987 build: Add introspection generation
Currently, no platform-specific introspection is generated; there will
be a follow-up commit.
2017-04-28 23:12:52 +01:00
Emmanuele Bassi
076786c1c7 build: Use the common linker flags in GDK and GSK
Instead of hard-coding `-Bsymbolic`.
2017-04-28 23:12:52 +01:00
Emmanuele Bassi
bf37decf12 gsk: Include the private header
Both gskprivate.c and gskvulkanrenderer.c call `gsk_ensure_resources`
but fail in clude `gskprivate.h`, where the function is declared.
2017-04-28 23:12:52 +01:00
Emmanuele Bassi
4b9da5c9b3 build: Use the appropriate linker flags
We need to check if the linker flags we use are available, depending on
the platform, and we need to ensure that the shared library is
versioned appropriately.
2017-04-28 23:12:52 +01:00
Emmanuele Bassi
f20d23a3aa build: Bump version and C standard
GTK+ 4.0 uses C99.
2017-04-28 23:12:52 +01:00
Emmanuele Bassi
806eb38078 build: Add missing symbol visibility flags
GTK symbols are not visible by default, and only the ones annotated with
_GDK_EXTERN (and wrapper macros) are exported. We need to define
_GDK_EXTERN during the configuration, depending on the platform and
compiler we use.
2017-04-28 23:12:52 +01:00
Emmanuele Bassi
8bef62cd7f build: Add compiler warnings and errors
We don't want to build buggy code.
2017-04-28 23:12:52 +01:00
Emmanuele Bassi
0421a3cc8a build: Depend on graphene-gobject-1.0
We use the GObject types with Graphene, so we need to check that the
library has been built with them.
2017-04-28 23:12:52 +01:00
Emmanuele Bassi
60ec18857f build: Some whitespace cleanups 2017-04-28 23:12:52 +01:00
Emmanuele Bassi
66448b0a66 build: Generate the appropriate GLib versioning checks
The autotools build checks the version of GLib we are depending on in
order to generate the appropriate GLIB_VERSION values for the
min-required/max-allowed defines.
2017-04-28 23:12:52 +01:00
Emmanuele Bassi
a7068d931e build: Add the appropriate paths in the configuration header
Instead of injecting them into the C compiler arguments.
2017-04-28 23:12:52 +01:00
Emmanuele Bassi
ccae075046 build: Use the appropriate quoting
There's no need for string concatenation.
2017-04-28 23:12:52 +01:00
Emmanuele Bassi
64bcc5b462 build: Do not mix private and public GDK headers
The type generation script inside gtk/ will use the `gdk_headers`
variable, and that must not contain private headers.
2017-04-28 23:12:52 +01:00
Tim-Philipp Müller
42b408c77f meson: gdk: fix static library names
Fix double lib prefix in filenames (liblibgdk-xyz.a)
2017-04-28 23:12:52 +01:00
Tim-Philipp Müller
f5e1a9a1cd meson: build input modules
We have to work around some ordering problems here. We still
manage to keep most of the guts in modules/input/meson.build,
so it's not too ugly overall.

(The autotools build solves this with a 'make -C ../../input/modules'
inside gtk/Makefile, but that's not something we can or want to do.)
2017-04-28 23:12:52 +01:00
Tim-Philipp Müller
2354ddd609 meson: check for xinerama 2017-04-28 23:12:52 +01:00
Tim-Philipp Müller
c0c2d55274 meson: fix XIAllowTouchEvents check
Need to link against dep/lib to check for function in it. Also
misc fixes to surrounding xi-related checks.
2017-04-28 23:12:52 +01:00
Tim-Philipp Müller
47106c1513 meson: remove duplicate libm variable
Only need one of libm and mlib
2017-04-28 23:12:52 +01:00
Tim-Philipp Müller
53456587db meson: check for more missing config.h defines
Lots of them are unused and can be removed. For others we
add a check.
2017-04-28 23:12:52 +01:00
Tim-Philipp Müller
29d9fa60b5 meson: simplify function checks
Because we can. We don't need to specify the right header anymore
to check for functions.
2017-04-28 23:12:52 +01:00
Tim-Philipp Müller
77bc413219 meson: simplify header checks
Remove workaround for gcc bug (Meson does that now), and
construct the right config.h defines for the headers on
the fly instead of listing them in the build file, which
is more error prone.
2017-04-28 23:12:52 +01:00
Matthias Clasen
34f68e1bf3 Set glib min/max versions 2017-04-28 23:12:52 +01:00
Tim-Philipp Müller
0884881ea5 meson: fix GETTEXT_PACKAGE 2017-04-28 23:12:52 +01:00
Matthias Clasen
db0cbbe9b5 Don't require glslc for vulkan
The compiled shaders are checked into git.
2017-04-28 23:12:52 +01:00
Tim-Philipp Müller
73ebfb82b6 meson: move colord checks into cups printbackend
Which is the only user of it. Also add option to enable/disable.
2017-04-28 23:12:52 +01:00
Tim-Philipp Müller
a2cef835df meson: gtk: set GTK_PRINT_BACKENDS define properly 2017-04-28 23:12:52 +01:00
Tim-Philipp Müller
30c0be4a61 meson: modules: add printbackends
The cups checks might not work properly everywhere yet,
since they don't use cups-config and parse the output yet.
2017-04-28 23:12:52 +01:00
Tim-Philipp Müller
af10f783f2 meson: gtk: don't overwrite top-level cdata variable with local stuff
We need to set the global configuration data written into
config.h from the modules/printbackends meson file.
2017-04-28 23:12:52 +01:00
Tim-Philipp Müller
5c4e55af21 meson: add po and po-properties 2017-04-28 23:12:52 +01:00
Tim-Philipp Müller
1194ab5363 meson: testsuites: tools: add meson build 2017-04-28 23:12:52 +01:00
Tim-Philipp Müller
7d07f5fb14 meson: testsuite: reftests: add build defs, but needs more work
Not sure how these are supposed to work yet, we can specify
arguments for running the tests uninstalled as well with test(),
if that helps in any way.
2017-04-28 23:12:52 +01:00
Tim-Philipp Müller
5d023f233b meson: testsuite: gdk: use array for test definitions 2017-04-28 23:12:52 +01:00
Tim-Philipp Müller
198dbc9878 meson: testsuite: gtk: sync with Makefile and add some missing bits
Also use an array. A few tests fail, needs investigation.
2017-04-28 23:12:52 +01:00
Tim-Philipp Müller
19c5bda322 meson: make sure gsk/gdk generated headers exist for libgtk_dep users
Add back dependencies on libgdk_dep and libsk_dep which are declared
dependencies. We removed this before because these declarations had
link_with: lines that dragged in the static libgdk.a and libgsk.a libs
which are linked into libgtk-4.so anyway and thus shouldn't be used
when linking internal exes/tools against libgtk-4. Remove the static
libs from the declared dependencies and have libgtk link those in
explicitly, so that the declared deps now just provide all the built
dependencies and include dirs and such for declared libgtk_dep users
such as the internal exes/tools, which want all the generated gsk/gdk/gtk
headers to exist before attempting to compile anything against the
gtk+ headers.
2017-04-28 23:12:52 +01:00
Tim-Philipp Müller
925941289d meson: generate .pc files 2017-04-28 23:12:52 +01:00
Tim-Philipp Müller
1123c34c46 meson: gtk: update build file and sync to Makefile 2017-04-28 23:12:52 +01:00
Tim-Philipp Müller
0c96d18250 meson: gtk: use gnome.mkenums() and gnome.genmarshal() 2017-04-28 23:12:52 +01:00
Tim-Philipp Müller
c445af11b7 meson: gdk, gsk: fix install path of generated files 2017-04-28 23:12:52 +01:00
Tim-Philipp Müller
1aa75a1b00 meson: gtk: remove internal static libs from declared gtk dependency
gdk and gsk are no longer separate libs but part of gtk now, so any
Gtk+ user should just link to gtk, there's no need to additionally
link against all those static helper libs that go into the gtk lib.

This means we need to specifically add confinc to include_directories
in more places to make sure the right config.h (i.e. ours) gets
included and not a subproject's like graphene's config.h.

Not dragging in static libs also fixes the issue of all executables
having to be relinked for any and all changes. With this change
it's super-fast now and can be skipped for most changes that don't
touch the external ABI.
2017-04-28 23:12:52 +01:00