vcpkg/ports/glib/vcpkg.json
Frederik Carlier ba58a3fdf2
[glib] Support cross-compiling Objective C code using Meson (#33313)
* Support cross-compiling Objective C code using Meson

The glib port uses Objective C code and the Meson build system.
You'll end up cross compiling glib when compiling for x64 osx
on an arm64 osx machine, or vice versa.

For this to work, an Objective C compiler needs to be set
in the Meson cross file.

vcpkg generates this file based on the
`scripts/buildsystems/meson/meson.template.in` template, and expects
the `MESON_OBJC` CMake variable to be set.

That's the job of `z_vcpkg_meson_set_proglist_variables` in
`scripts/cmake/vcpkg_configure_meson.cmake`.  It will only generate data
for an Objective C compiler if:

- The `Languages` argument includes `OBJC`
- CMake has detected a Objective C compiler, and has set `VCPKG_DETECTED_CMAKE_OBJC_COMPILER`

To make this work, this patch:
- Enables the OBJC and OBJCXX language on Apple platforms
- Updates the call to `vcpkg_configure_meson` in the glib port file
  to include the OBJC OBJCXX languages.

Fixes https://github.com/microsoft/vcpkg/issues/26147
Fixes https://github.com/microsoft/vcpkg/issues/20341
Based on https://github.com/microsoft/vcpkg/pull/26259
Based on 27dee354e4

Tested on an arm64 mac to compile glib for x64 macos

* Update version database
2023-08-25 12:25:28 -07:00

35 lines
695 B
JSON

{
"name": "glib",
"version": "2.76.3",
"port-version": 3,
"description": "Portable, general-purpose utility library.",
"homepage": "https://developer.gnome.org/glib/",
"license": "LGPL-2.1-or-later",
"supports": "!uwp & !xbox",
"dependencies": [
"dirent",
"gettext",
"libffi",
"libiconv",
"pcre2",
{
"name": "vcpkg-tool-meson",
"host": true
},
"zlib"
],
"features": {
"libmount": {
"description": "Build with libmount support.",
"supports": "linux",
"dependencies": [
"libmount"
]
},
"selinux": {
"description": "Build with selinux support.",
"supports": "linux"
}
}
}