From b5b0b7c06f0caaf5dd3abd6213b51aa3d77f1c00 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 28 Jul 2019 02:15:20 +0200 Subject: Add option to install entire implementation as headers --- wscript | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'wscript') 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, [], -- cgit v1.2.1