diff options
author | falkTX <falktx@falktx.com> | 2020-09-13 04:17:26 +0100 |
---|---|---|
committer | falkTX <falktx@falktx.com> | 2020-09-13 04:17:26 +0100 |
commit | 5a9a7c50cc1d593443a07d3ce66d0d88863afc1c (patch) | |
tree | 074db1d022be14119bffa7ee40ed8340957c6639 | |
parent | d3a324264759c69e4891cd1e6bbc2715fd6d8c8e (diff) | |
download | jack2-5a9a7c50cc1d593443a07d3ce66d0d88863afc1c.tar.gz |
Add --static configure flag, used for official windows builds
Signed-off-by: falkTX <falktx@falktx.com>
-rw-r--r-- | common/wscript | 8 | ||||
-rw-r--r-- | wscript | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/common/wscript b/common/wscript index cb794e28..6520b044 100644 --- a/common/wscript +++ b/common/wscript @@ -132,7 +132,7 @@ def build(bld): ] includes = ['../windows' ] + includes libsuffix = "64" if (bld.env['DEST_CPU'] == "x86_64" and not bld.variant) else "" - skipshared = bool('HAVE_TRE_REGEX_H' in bld.env) + staticbuild = bool('BUILD_STATIC' in bld.env and bld.env['BUILD_STATIC']) uselib.append('REGEX') uselib.append('WS2_32') uselib.append('PSAPI') @@ -204,7 +204,7 @@ def build(bld): if bld.env['IS_WINDOWS']: # remove switch to shared binaries if possible, as we most likely want static builds on Windows - if skipshared: + if staticbuild: clientlib.env['SHLIB_MARKER'] = '' # statically link libjack to libstdc++, some client apps like ardour come # with a different version of libstdc++.dll that takes precedence and results @@ -228,7 +228,7 @@ def build(bld): serverlib.env['cxxshlib_PATTERN'] = 'lib%s.dll' serverlib.env['cxxstlib_PATTERN'] = 'lib%s.a' serverlib.env['implib_PATTERN'] = 'lib%s.dll.a' - if skipshared: + if staticbuild: serverlib.env['SHLIB_MARKER'] = '' serverlib.env.append_value('LINKFLAGS', ['-static-libstdc++', '--disable-auto-import']) serverlib.install_path = '${LIBDIR}' @@ -330,7 +330,7 @@ def build(bld): netlib.env['cxxshlib_PATTERN'] = 'lib%s.dll' netlib.env['cxxstlib_PATTERN'] = 'lib%s.a' netlib.env['implib_PATTERN'] = 'lib%s.dll.a' - if skipshared: + if staticbuild: netlib.env['SHLIB_MARKER'] = '' netlib.use += ['WS2_32', 'WINMM'] elif not bld.env['IS_MACOSX']: @@ -68,6 +68,7 @@ def options(opt): opt.add_option('--platform', type='string', default=sys.platform, help='Target platform for cross-compiling, e.g. cygwin or win32') opt.add_option('--mixed', action='store_true', default=False, help='Build with 32/64 bits mixed mode') opt.add_option('--debug', action='store_true', default=False, dest='debug', help='Build debuggable binaries') + opt.add_option('--static', action='store_true', default=False, dest='static', help='Build static binaries (Windows only)') # options affecting general jack functionality opt.add_option('--classic', action='store_true', default=False, help='Force enable standard JACK (jackd) even if D-Bus JACK (jackdbus) is enabled too') @@ -316,6 +317,7 @@ def configure(conf): conf.env['BUILD_WITH_32_64'] = Options.options.mixed conf.env['BUILD_CLASSIC'] = Options.options.classic conf.env['BUILD_DEBUG'] = Options.options.debug + conf.env['BUILD_STATIC'] = Options.options.static if conf.env['BUILD_JACKDBUS']: conf.env['BUILD_JACKD'] = conf.env['BUILD_CLASSIC'] |