From: Paul Brossier Date: Thu, 2 Jul 2020 12:49:15 +0000 (+0200) Subject: [waf] add --nodeps option to build with no dependency X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=0cd37209cc5a5673eb7f19b6bb1d0cc6294c4caa;p=aubio.git [waf] add --nodeps option to build with no dependency --- diff --git a/wscript b/wscript index dc15783d..b9687c1e 100644 --- a/wscript +++ b/wscript @@ -48,6 +48,9 @@ def options(ctx): ctx.add_option('--debug', action = 'store_const', dest = 'build_type', const = 'debug', help = 'build in debug mode (see --build-type)') + ctx.add_option('--nodeps', action = 'store_const', + dest = 'nodeps', const = 'debug', + help = 'build with no external dependencies') add_option_enable_disable(ctx, 'fftw3f', default = False, help_str = 'compile with fftw3f instead of ooura (recommended)', help_disable_str = 'do not compile with fftw3f') @@ -126,6 +129,27 @@ def configure(ctx): if ctx.options.target_platform: target_platform = ctx.options.target_platform + if ctx.options.nodeps: + external_deps = [ + 'sndfile', + 'samplerate', + 'jack', + 'avcodec', + 'blas', + 'fftw3', + 'fftw3f', + ] + for d in external_deps: + if not hasattr(ctx.options, 'enable_' + d): + raise ctx.errors.ConfigurationError ('--enable-%s missing from options' % d) + if getattr(ctx.options, 'enable_' + d) == True: + msg = 'Option --nodeps can not be used along with --enable-%s' % d + raise ctx.errors.ConfigurationError (msg) + elif getattr(ctx.options, 'enable_' + d) is None: + msg = 'Option --nodeps used but automatic detection with --enable-%s' % d + ctx.msg('Warning', msg) + setattr(ctx.options, 'enable_' + d, False) + from waflib import Options if target_platform=='emscripten':