diff options
author | Arun Raghavan <arun@asymptotic.io> | 2021-02-26 05:30:50 -0500 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2021-03-09 16:47:49 +0000 |
commit | dfc07fc03637cb404d9ee164d20da5b143855733 (patch) | |
tree | 0d2d954acdf98b95c0a55a9fdf129fac476f5ac4 | |
parent | 095c89bc2dbb699377e8d52d11e1c9838d853162 (diff) |
build: Allow recipes to enable cmake support for meson
This was disabled as an optimisation on Windows but might be needed by
some recipes, so let's allow them to opt-in.
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/682>
-rw-r--r-- | cerbero/build/build.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/cerbero/build/build.py b/cerbero/build/build.py index ec9ed017..9434026b 100644 --- a/cerbero/build/build.py +++ b/cerbero/build/build.py @@ -732,6 +732,8 @@ class Meson (Build, ModifyEnvBase) : # Build files require a build machine compiler when cross-compiling meson_needs_build_machine_compiler = False meson_builddir = "_builddir" + # We do not use cmake dependency files by default, speed up the build by disabling it + need_cmake = False def __init__(self): self.meson_options = self.meson_options or {} @@ -757,6 +759,10 @@ class Meson (Build, ModifyEnvBase) : if not self.make_clean: self.make_clean = self.make + ['clean'] + # Allow CMake dependencies to be found if requested + if self.need_cmake: + self.append_env('CMAKE_PREFIX_PATH', self.config.prefix, sep=os.pathsep) + @staticmethod def _get_option_value(opt_type, value): if opt_type == 'feature': @@ -894,8 +900,10 @@ class Meson (Build, ModifyEnvBase) : else: props[key] += value - # We do not use cmake dependency files, speed up the build by disabling it - binaries = {'cmake': ['false']} + if self.need_cmake: + binaries = {} + else: + binaries = {'cmake': ['false']} # Get qmake and moc paths if self.config.qt5_qmake_path: binaries['qmake'] = [self.config.qt5_qmake_path] |