5 Commits

Author SHA1 Message Date
L. E. Segovia
0d7ea661cf cmake: Fix using pkgconf for Windows cross builds
pkgconf has its own default logic on Windows for setting up a prefix,
which does not match the default behaviour of pkg-config (blindly
respecting modules' ${prefix} variable).

See
dcf529b83d

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8768>
2025-04-05 01:15:06 +00:00
L. E. Segovia
8453993afc cmake: Fix PKG_CONFIG_PATH formatting for Windows cross-builds
The PKG_CONFIG_PATH use of semicolons must match the host system, not
the build system. This fixes calling pkg-config for Windows to Android
cross builds.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8768>
2025-04-05 01:15:06 +00:00
L. E. Segovia
c963597525 cmake: Memoize include checks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8478>
2025-02-26 12:22:23 +00:00
L. E. Segovia
51c6aa9e2f cmake: Add Android libvulkan to the ignored system libraries
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7861>
2024-11-20 16:45:44 +00:00
L. E. Segovia
410e77be6c cmake: Add Find Module to support Android and iOS consumers
This commit adds a Find Module implementing the necessary logic to link
against GStreamer, while implementing some extra bits to enhance the
compatibility.

The first addition is the `mobile` target, which implements the
monolithic `gstreamer_android` library, and which here gains
compatibility with Apple's operating systems.

The second addition is the handling of the basic GStreamer libraries as
`--whole-archive` when statically linked, which was ported from the
ndk-build project in Cerbero. This is not easy to do, as CMake suffers
from several issues that impede its proper usage of pkg-config:

- It cannot differentiate between system/compiler specific libraries
  e.g. `-lm`, `-ldl`, but especially `-framework Cocoa`.
- It does not support `--whole-archive` natively until 3.27
- It attempts to reorder flags blindly by separating them with spaces,
  thus requiring the use of `-Wl,` wrapping or (in the case of Apple
  frameworks) manual framework lookup

The third addition is the port of the Fontconfig and ca-certificates
bundling logic.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6881>
2024-11-01 10:44:43 +00:00