summaryrefslogtreecommitdiff
path: root/gir/meson.build
Commit message (Collapse)AuthorAgeFilesLines
* Don't override finding executables when using pre-built tools.John Ericson2020-04-271-18/+8
| | | | | | | | | | | | | | | Actually, we shouldn't really need this. We are building `native: false` binaries so when we look up a `native: true` binary the override should not apply. I've fixed this upstream in meson in https://github.com/NixOS/nixpkgs/pull/86080, though some backwards compatibility migration might be in order. In the meantime, we can make `gi_cross_use_host_gi` prevent the overrides from happening, which will achieve the desired behavior. Finally, this allows us to use `find_program` in `scanner_command`, unconditionally, letting the presence of the override dictate whether a freshly-built or pre-built `g-ir-scanner` is used.
* meson: rename cross options to not start with cross_Christoph Reiter2020-01-171-10/+10
| | | | | | | Newer meson warns that option names can't start with "cross_", so we have to prefix them: "Option uses prefix "cross_", which is reserved for Meson. This will become an error in the future."
* Visual Studio builds: Use -utf-8 where availableChun-wei Fan2020-01-151-5/+5
| | | | | | | | | | | | This avoids compilation erroring out on C4819 (Unicode handling issue in the Visual Studio compiler), notably when running on Chinese, Japanese and Korean (CJK) locales. This also applies -utf-8 into the cflags passed into the various g-ir-scanner command lines that are used to generate the *.gir files, where -utf-8 is available, so that we don't get flooded with C4819 warnings during the build, and therefore avoid potential mishaps, as C4819 is a real warning that warngs us the code may be incorrectly built.
* meson: address review commentsAlexander Kanavin2019-12-131-25/+20
| | | | | | | | | See here: https://gitlab.gnome.org/GNOME/gobject-introspection/merge_requests/64 Particularly, options are renamed to make it more readable and clear. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
* meson_options.txt: add host-gi, gi-cross-wrapper, gi-ldd-wrapper, ↵Alexander Kanavin2019-12-131-17/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | introspection-data and pkgconfig-sysroot-path options With the first option, gobject-introspection tools (g-ir-doc-tool and g-ir-scanner) that are already installed in the host system will be used for building the source tree. With the second option, g-ir-scanner will be instructed to use an executable wrapper to run binaries it's producing, and g-ir-compiler will be run through the same wrapper (host system's g-ir-compiler cannot be used because it's producing architecture-specific output). With the third option, giscanner will be instructed to use a special ldd command instead of system's ldd (which does not work when the binary to inspect is compiled for a different architecture). With the fourth option, it is possible to disable building of introspection data (.gir and .typelib files), which may be difficult or impossible in cross-compilation environments, because of lack of emulation (or native hardware) for the target architecture on which the target binaries can be run. With the fifth option, paths returned by pkg-config are prefixed with the sysroot path (which is the destination path for cross-compiled items on the system where cross-compilation happens). These options are useful when cross-compiling for a different target architecture. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
* Get the type of dependency from the right object.Brook Milligan2019-07-271-0/+1
| | | | Closes: https://gitlab.gnome.org/GNOME/gobject-introspection/issues/300.
* meson: set a default cairo dll name for the MSVC buildChristoph Reiter2019-06-131-1/+5
| | | | | | | | The cairo MSVC build produces a cairo-gobject.dll unlike the libcairo-gobject-2.dll with autotools. While one can pass the right DLL name through the cairo_libname option, having a better default can't hurt.
* Add Vulkan girMatthew Waters2019-06-031-0/+1
|
* meson: fix default cairo DLL name on WindowsChristoph Reiter2019-04-201-1/+1
| | | | host_machine.system() returns "windows" on Windows
* meson: always pass --qiet to g-ir-scannerChristoph Reiter2019-04-071-0/+1
| | | | Less noisy build
* gir: skip glib-enumtypes.h for GObject-2.0. See #267Christoph Reiter2019-03-041-1/+1
| | | | | | | | | The newly added GTypes in glib!481 result in g-i generating an enum type in GLib-2.0 and a GType based one in GObject-2.0. This makes problems for the dlang bindings (see #267) so skip them for now. Ideally we should include it in GLib-2.0 like we do with glib-types.h.
* meson: use underscore as a separator in build optionsChristoph Reiter2019-01-071-3/+3
| | | | This is what https://wiki.gnome.org/Initiatives/GnomeGoals/MesonPorting suggests.
* meson: port more typelib testsChristoph Reiter2019-01-011-1/+3
|
* girepository: Add version macros and functions. Fixes #200Christoph Reiter2018-12-161-0/+2
| | | | | | | | | | | This adds the following macros and functions: GI_MAJOR_VERSION, GI_MICRO_VERSION, GI_MINOR_VERSION, GI_CHECK_VERSION, gi_get_major_version,gi_get_micro_version, gi_get_minor_version. Since we share a prefix with glib we have to namespace these by using the gi_ prefix. g_gi would also work but we already export symbols with gi_ like gi_cclosure_marshal_generic(), gi_type_tag_get_ffi_type() and gi_type_info_extract_ffi_return_value(), so let's not add another naming scheme.
* meson: Port repository testsTomasz Miąsko2018-12-101-1/+2
|
* Creating gir for GIRepository requires girepository library.Tomasz Miąsko2018-12-091-1/+1
| | | | This should address flaky builds on vs2017-x64-meson.
* Skip gobject/gvaluecollector.h when constructing GObject GIRTomasz Miąsko2018-11-241-1/+1
| | | | | | API from gobject/gvaluecollector.h is not intended for introspected use. Skip it when scanning headers. This effectively hides the definition of GTypeCValue and VALUE_COLLECT_FORMAT_MAX_LENGTH constant.
* meson: add option 'gir-dir-prefix'Kai Kang2018-10-081-1/+0
| | | | | | | Add option 'gir-dir-prefix' for meson to make the installation path of .gir files could be configured which has been done for autoconf. Signed-off-by: Kai Kang <kai.kang@windriver.com>
* meson: Add a "python" option to make the python to build against configurableChristoph Reiter2018-07-111-8/+8
| | | | | | | | This allows us to build with Python 2 and run tests with it. This requires the new "python" meson module which was added in 0.46.0 so bump the required meson version (glib needs a newer one anyway). Also fixes a small test error under Python 2.
* meson: Don't use gobject-introspection-1.0 pkg-config during scanTomasz Miąsko2018-05-151-5/+3
| | | | | Always use gobject-introspection-1.0 we have just built, when running g-ir-scanner for girepository.
* meson: add intl_libdir to glib_libpaths and glib_commandMathieu Duponchelle2018-04-201-1/+2
| | | | To make it build using libintl as a subproject on Linux.
* meson: add ffi_libdir to glib_libpaths and glib_commandHavard Graff2018-03-101-1/+6
| | | | To make it build using libffi as a subproject on Linux.
* meson: Sort globbed files before printingNirbheek Chauhan2018-03-101-1/+4
| | | | | | | | | | | This ensures stability in the output, because the underlying implementation uses readdir() and the output will depend on the filesystem. This also works around a bug where g-ir-scanner's source scanner was #include-ing gmarshal.h before any other header which resulted in all marshaling symbols to be skipped from the introspection because of syntax errors.
* meson: Prefer source annotations for gir generationNirbheek Chauhan2018-03-101-4/+24
| | | | | | Otherwise we will see the fallback annotations provided in glib-2.0.c etc and use them instead of the up-to-date annotations in glib's source code.
* meson: Have a single place to set the subproject directoryNirbheek Chauhan2018-03-101-8/+13
| | | | | This is a hack for use by people who use a different subproject directory than the default.
* meson: Fix build without pkg-config or any system libsNirbheek Chauhan2018-03-101-12/+40
| | | | | | When building from scratch on Windows using subprojects, we have neither pkg-config nor any system libraries so we need to link to gio/glib/etc manually.
* meson: typelib build depends on GObject-2.0.GirDanny 'Guru' Forghieri2018-03-101-0/+1
| | | | Signed-off-by: Nirbheek Chauhan <nirbheek@centricular.com>
* meson: Fix include dir for gir and typelib genDanny 'Guru' Forghieri2018-03-101-1/+6
| | | | | | | Both the source and the build dir are needed because some files are read from the source and others are read after they are built. Signed-off-by: Nirbheek Chauhan <nirbheek@centricular.com>
* meson: Explicitly use python3 for running g-ir-scannerNirbheek Chauhan2018-03-101-0/+1
| | | | | | Otherwise it won't run on Windows because it doesn't have a .py suffix and it isn't an executable. Meson should probably detect this case and automatically insert python3.
* g-ir-scanner: Don't require SRCDIR and BUILDDIR env varsNirbheek Chauhan2018-03-101-3/+5
| | | | | | | | | | | | | When building with Meson, we cannot set environment variables while running custom targets and our builddir layout is different from Autotools anyway. Now g-ir-scanner and friends can autodetect when they're being run uninstalled by Meson and will find _giscanner.so and the giscanner python files in the build directory. This is very similar to what gdbus-codegen uses in glib/gio. Same for girepository/gdump.c.
* meson: Rewrite glib gir generationNirbheek Chauhan2018-03-101-122/+212
| | | | | | | | | | | | | | The previous build files had a bunch of problems: 1. It assumed that glib would only be sourced via pkg-config 2. It was using the system gobject-introspection-1.0.pc file while building GIRepository-1.0.gir 3. It wasn't ignoring the *-autocleanup.h headers properly Now you can build glib as a subproject and generate girs against the in-tree sources. This also yields more accurate girs because they document platform-specific features that are actually enabled in the glib build we are linking against.
* Allow setting custom cairo-gobject libnamePatrick Griffis2018-03-101-3/+3
|
* Fix dependency on giscanner's python modulePatrick Griffis2018-03-101-4/+5
|
* Initial work on meson portPatrick Griffis2018-03-101-0/+272