From 2dfd41a0c59ba0221f6bf24aa707181c591d9258 Mon Sep 17 00:00:00 2001 From: bebopagogo Date: Fri, 27 Dec 2024 16:32:05 -0500 Subject: [PATCH] fix to waf build of normCast example --- wscript | 40 +++++++--------------------------------- 1 file changed, 7 insertions(+), 33 deletions(-) diff --git a/wscript b/wscript index ff29f95..d8e9ef1 100755 --- a/wscript +++ b/wscript @@ -15,7 +15,6 @@ build), use the -o (--out) flag when configuring. For example: To build examples, use the --target directive. For example: ./waf build --target=normClient,normServer - ''' import platform @@ -181,7 +180,6 @@ def build(ctx): # Disabled by default posted = True, ) - if system in ('linux', 'darwin', 'freebsd', 'gnu', 'gnu/kfreebsd'): normapp.source.append('src/unix/unixPostProcess.cpp') @@ -190,37 +188,6 @@ def build(ctx): normapp.defines.append('_CONSOLE') normapp.stlib = (["Shell32"]); - normCast = ctx.program( - target = 'normCast', - includes = ['include', 'protolib/include'], - use = use, - defines = [], - source = source + ['examples/normCast.cpp', 'src/common/normPostProcess.cpp'], - # Disabled by default - posted = True, - # Don't install examples - install_path = False, - ) - - if system in ('linux', 'darwin', 'freebsd', 'gnu', 'gnu/kfreebsd'): - normCast.source.append('src/unix/unixPostProcess.cpp') - - normCastApp = ctx.program( - target = 'normCastApp', - includes = ['include', 'protolib/include'], - use = use, - defines = [], - source = source + ['examples/normCastApp.cpp', 'src/common/normPostProcess.cpp'], - # Disabled by default - posted = True, - # Don't install examples - install_path = False, - ) - - if system in ('linux', 'darwin', 'freebsd', 'gnu', 'gnu/kfreebsd'): - normCastApp.source.append('src/unix/unixPostProcess.cpp') - - for example in ( #'normDataExample', 'normDataRecv', @@ -278,6 +245,12 @@ def _make_simple_example(ctx, name, path='examples'): source += ['{0}/{1}.cpp'.format(path, name)] if 'normClient' == name or 'normServer' == name: source.append('%s/normSocket.cpp' % path) + if 'normCast' == name: + source.append('src/common/normPostProcess.cpp') + if system in ('linux', 'darwin', 'freebsd', 'gnu', 'gnu/kfreebsd'): + source.append('src/unix/unixPostProcess.cpp') + elif system == 'windows': + source.append('src/win32/win32PostProcess.cpp') example = ctx.program( target = name, includes = ['include', 'protolib/include'], @@ -292,4 +265,5 @@ def _make_simple_example(ctx, name, path='examples'): if 'windows' == system: example.defines.append('_CONSOLE') + example.stlib = (["Shell32"])