Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Xcode project creation with waf #119

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions src/bindings/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ def configure(conf):
conf.check_python_version((3, 7))
conf.check_python_headers()

# do not use the default extension of .bundle on MacOS
# TODO: still necessary with waf 1.5.x?
if sys.platform == 'darwin':
conf.env['pyext_SUFFIX'] = '.so'

conf.env['CPPPATH_BINDINGS'] = [ '../../src',
'../../src/bindings',
'../../src/metrics',
Expand All @@ -38,15 +33,15 @@ def configure(conf):


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

bld.install_as('${PYTHONDIR}/gaia2/__init__.py', 'gaia2.py')
bld.install_files('${PYTHONDIR}/gaia2', bld.path.ant_glob('pygaia/*.py'))
Expand Down
9 changes: 9 additions & 0 deletions update-waf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

VERSION=2.0.24
TMP_DIR=./waf-repo

git clone --depth=1 --branch=waf-${VERSION} -c advice.detachedHead=false https://gitlab.com/ita1024/waf.git ${TMP_DIR}
${TMP_DIR}/waf-light --tools=swig,c_emscripten,xcode6 --make-waf -t ${TMP_DIR}
cp ${TMP_DIR}/waf .
rm -rf ${TMP_DIR}
14 changes: 7 additions & 7 deletions waf

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion wscript
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ out = 'build'


def options(opt):
opt.load('compiler_cxx compiler_c qt5')
opt.load('compiler_cxx compiler_c qt5 xcode6')
opt.recurse('src')

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


def build(bld):
Expand Down