Commit dfc07fc0 authored by Arun Raghavan's avatar Arun Raghavan Committed by GStreamer Marge Bot
Browse files

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: <!682>
parent 095c89bc
Pipeline #281628 failed with stages
in 61 minutes and 41 seconds
......@@ -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)
def _get_option_value(opt_type, value):
if opt_type == 'feature':
......@@ -894,8 +900,10 @@ class Meson (Build, ModifyEnvBase) :
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 = {}
binaries = {'cmake': ['false']}
# Get qmake and moc paths
if self.config.qt5_qmake_path:
binaries['qmake'] = [self.config.qt5_qmake_path]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment