Skip to content

Commit

Permalink
Do not skip shared libs on windows if using original regex.h
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <[email protected]>
  • Loading branch information
falkTX committed Jun 17, 2020
1 parent 1c039d9 commit 5f1b2be
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions common/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +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)
uselib.append('REGEX')
uselib.append('WS2_32')
uselib.append('PSAPI')
Expand Down Expand Up @@ -202,8 +203,9 @@ def build(bld):
clientlib.env.append_value('LINKFLAGS', '-lnsl -lsocket')

if bld.env['IS_WINDOWS']:
# remove switch to shared binaries, as we most likely want static builds on Windows
clientlib.env['SHLIB_MARKER'] = ''
# remove switch to shared binaries if possible, as we most likely want static builds on Windows
if skipshared:
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
# in missing symbols during runtime
Expand All @@ -226,7 +228,8 @@ 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'
serverlib.env['SHLIB_MARKER'] = ''
if skipshared:
serverlib.env['SHLIB_MARKER'] = ''
serverlib.env.append_value('LINKFLAGS', ['-static-libstdc++', '--disable-auto-import'])
serverlib.install_path = '${LIBDIR}'
serverlib.source = [] + common_libsources
Expand Down Expand Up @@ -327,7 +330,8 @@ 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'
netlib.env['SHLIB_MARKER'] = ''
if skipshared:
netlib.env['SHLIB_MARKER'] = ''
netlib.use += ['WS2_32', 'WINMM']
elif not bld.env['IS_MACOSX']:
netlib.use += ['RT']
Expand Down

0 comments on commit 5f1b2be

Please sign in to comment.