updated wf wscript to check for existence of ctx.options.enable_static_library attribute before trying access it

pull/27/head
bebopagogo 2021-02-01 09:52:50 -05:00
parent 789ca317d6
commit 213adb3938
1 changed files with 5 additions and 4 deletions

View File

@ -223,10 +223,11 @@ def build(ctx):
# Add additional static compilation dependencies based on the system. # Add additional static compilation dependencies based on the system.
# libpcap is used by protolib on GNU/Hurd based systems. # libpcap is used by protolib on GNU/Hurd based systems.
static_libs = '' static_libs = ''
if ctx.options.enable_static_library: if hasattr(ctx.options, 'enable_static_library'):
static_libs += ' -lstdc++ -lprotokit' if ctx.options.enable_static_library:
if system == "gnu": static_libs += ' -lstdc++ -lprotokit'
static_libs += ' -lpcap' if system == "gnu":
static_libs += ' -lpcap'
ctx(source='norm.pc.in', STATIC_LIBS = static_libs) ctx(source='norm.pc.in', STATIC_LIBS = static_libs)
def _make_simple_example(ctx, name, path='examples'): def _make_simple_example(ctx, name, path='examples'):