Skip to content

Commit 863128b

Browse files
committed
Support Xcode project creation with waf
1 parent 5c3fdbc commit 863128b

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
@@ -29,11 +29,6 @@ def configure(conf):
2929
conf.check_python_version((3,5))
3030
conf.check_python_headers()
3131

32-
# do not use the default extension of .bundle on MacOS
33-
# TODO: still necessary with waf 1.5.x?
34-
if sys.platform == 'darwin':
35-
conf.env['pyext_SUFFIX'] = '.so'
36-
3732
conf.env['CPPPATH_BINDINGS'] = [ '../../src',
3833
'../../src/bindings',
3934
'../../src/metrics',
@@ -48,15 +43,15 @@ def build(bld):
4843
#if major >= 2 and minor >= 6:
4944
# bld.env['PYTHONDIR'] = bld.env['PYTHONDIR'].replace('site-packages', 'dist-packages')
5045

51-
bld(features = 'cxx cshlib pyext',
46+
bld.shlib(features = 'cxx cshlib pyext',
5247
source = 'gaia.swig',
5348
target = '_gaia2',
5449
# -w 451: ignore the warning "Setting a const char * variable may leak memory"
5550
swig_flags = '-c++ -python -w451',
5651
use = ['gaia2'] + bld.env['USELIB'], # + ['BINDINGS'],
5752
includes = bld.env['CPPPATH_BINDINGS'],
5853
install_path = '${PYTHONDIR}/gaia2'
59-
)
54+
)
6055

6156
bld.install_as('${PYTHONDIR}/gaia2/__init__.py', 'gaia2.py')
6257
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 qt4')
27+
opt.load('compiler_cxx compiler_c qt4 xcode6')
2828
opt.recurse('src')
2929

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

212213

213214
def build(bld):

0 commit comments

Comments
 (0)