aboutsummaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-07-28 02:15:20 +0200
committerDavid Robillard <d@drobilla.net>2019-07-29 22:40:17 +0200
commitb5b0b7c06f0caaf5dd3abd6213b51aa3d77f1c00 (patch)
tree589f74aa664fff2c9b30e5e460f9ad4bd80d885c /wscript
parent3f98de4e20c372e87cba1031465e4ee470abbd46 (diff)
Add option to install entire implementation as headers
Diffstat (limited to 'wscript')
-rw-r--r--wscript18
1 files changed, 12 insertions, 6 deletions
diff --git a/wscript b/wscript
index 2a92177..5b4a654 100644
--- a/wscript
+++ b/wscript
@@ -29,15 +29,17 @@ def options(ctx):
ctx.add_flags(
opts,
- {'no-gl': 'do not build OpenGL support',
- 'no-cairo': 'do not build Cairo support',
- 'no-static': 'do not build static library',
- 'no-shared': 'do not build shared library',
- 'log': 'print GL information to console',
- 'grab-focus': 'work around keyboard issues by grabbing focus'})
+ {'all-headers': 'install complete header implementation',
+ 'no-gl': 'do not build OpenGL support',
+ 'no-cairo': 'do not build Cairo support',
+ 'no-static': 'do not build static library',
+ 'no-shared': 'do not build shared library',
+ 'log': 'print GL information to console',
+ 'grab-focus': 'work around keyboard issues by grabbing focus'})
def configure(conf):
+ conf.env.ALL_HEADERS = Options.options.all_headers
conf.env.TARGET_PLATFORM = Options.options.target or sys.platform
conf.load('compiler_c', cache=True)
conf.load('autowaf', cache=True)
@@ -97,6 +99,10 @@ def build(bld):
includedir = '${INCLUDEDIR}/pugl-%s/pugl' % PUGL_MAJOR_VERSION
bld.install_files(includedir, bld.path.ant_glob('pugl/*.h'))
bld.install_files(includedir, bld.path.ant_glob('pugl/*.hpp'))
+ if bld.env.ALL_HEADERS:
+ detaildir = os.path.join(includedir, 'detail')
+ bld.install_files(detaildir, bld.path.ant_glob('pugl/detail/*.h'))
+ bld.install_files(detaildir, bld.path.ant_glob('pugl/detail/*.c'))
# Pkgconfig file
autowaf.build_pc(bld, 'PUGL', PUGL_VERSION, PUGL_MAJOR_VERSION, [],