Skip to content

Commit 2dd4db7

Browse files
committed
Support Xcode project creation with waf
1 parent b59043b commit 2dd4db7

File tree

4 files changed

+20
-15
lines changed

4 files changed

+20
-15
lines changed

src/bindings/wscript

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@ def configure(conf):
2424
conf.check_python_version((3, 7))
2525
conf.check_python_headers()
2626

27-
# do not use the default extension of .bundle on MacOS
28-
# TODO: still necessary with waf 1.5.x?
29-
if sys.platform == 'darwin':
30-
conf.env['pyext_SUFFIX'] = '.so'
31-
3227
conf.env['CPPPATH_BINDINGS'] = [ '../../src',
3328
'../../src/bindings',
3429
'../../src/metrics',
@@ -38,15 +33,15 @@ def configure(conf):
3833

3934

4035
def build(bld):
41-
bld(features = 'cxx cshlib pyext',
36+
bld.shlib(features = 'cxx cshlib pyext',
4237
source = 'gaia.swig',
4338
target = '_gaia2',
4439
# -w 451: ignore the warning "Setting a const char * variable may leak memory"
4540
swig_flags = '-c++ -python -w451',
4641
use = ['gaia2'] + bld.env['USELIB'], # + ['BINDINGS'],
4742
includes = bld.env['CPPPATH_BINDINGS'],
4843
install_path = '${PYTHONDIR}/gaia2'
49-
)
44+
)
5045

5146
bld.install_as('${PYTHONDIR}/gaia2/__init__.py', 'gaia2.py')
5247
bld.install_files('${PYTHONDIR}/gaia2', bld.path.ant_glob('pygaia/*.py'))

update-waf.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
VERSION=2.0.24
4+
TMP_DIR=./waf-repo
5+
6+
git clone --depth=1 --branch=waf-${VERSION} -c advice.detachedHead=false https://gitlab.com/ita1024/waf.git ${TMP_DIR}
7+
${TMP_DIR}/waf-light --tools=swig,c_emscripten,xcode6 --make-waf -t ${TMP_DIR}
8+
cp ${TMP_DIR}/waf .
9+
rm -rf ${TMP_DIR}

waf

Lines changed: 7 additions & 7 deletions
Large diffs are not rendered by default.

wscript

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ out = 'build'
2424

2525

2626
def options(opt):
27-
opt.load('compiler_cxx compiler_c qt5')
27+
opt.load('compiler_cxx compiler_c qt5 xcode6')
2828
opt.recurse('src')
2929

3030
# whether or not to have all the asserts working
@@ -207,6 +207,7 @@ def configure(conf):
207207
pcfile = '\n'.join([ l.strip() for l in pcfile.split('\n') ])
208208
conf.env.pcfile = pcfile
209209
#open('build/gaia2.pc', 'w').write(pcfile) # we'll do it later on the build stage
210+
conf.load('xcode6')
210211

211212

212213
def build(bld):

0 commit comments

Comments
 (0)