aboutsummaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-10-29 13:45:46 +0100
committerDavid Robillard <d@drobilla.net>2020-10-30 10:58:27 +0100
commit750eb8027b1f164c276ac7b1b14f04485cf4429d (patch)
tree1906196c3088d3f7c90255c1d653764a16f3c5c2 /wscript
parent21d1e350a3b22ba690553f8371714fd9e896c7c8 (diff)
downloadpugl-750eb8027b1f164c276ac7b1b14f04485cf4429d.tar.gz
pugl-750eb8027b1f164c276ac7b1b14f04485cf4429d.tar.bz2
pugl-750eb8027b1f164c276ac7b1b14f04485cf4429d.zip
Move C++ bindings to a separate directory
This seemed messy and potentially misleading for what is fundamentally a C++ library. It also makes it possible to set separate clang-tidy and clang-format settings for each to avoid "tainting" the C settings, though currently the headers use the same checks.
Diffstat (limited to 'wscript')
-rw-r--r--wscript10
1 files changed, 6 insertions, 4 deletions
diff --git a/wscript b/wscript
index 93ba6ba..93e06a1 100644
--- a/wscript
+++ b/wscript
@@ -491,6 +491,8 @@ def build(bld):
def build_example(prog, source, platform, backend, **kwargs):
lang = 'cxx' if source[0].endswith('.cpp') else 'c'
+ includes = ['.'] + (['bindings/cxx/include'] if lang == 'cxx' else [])
+
use = ['pugl_%s_static' % platform,
'pugl_%s_%s_static' % (platform, backend)]
@@ -501,7 +503,7 @@ def build(bld):
bld(features = 'subst',
source = 'resources/Info.plist.in',
target = '{}.app/Contents/Info.plist'.format(prog),
- includes = ['.'],
+ includes = includes,
install_path = '',
NAME = prog)
@@ -514,7 +516,7 @@ def build(bld):
bld(features = '%s %sprogram' % (lang, lang),
source = source,
target = target,
- includes = ['.'],
+ includes = includes,
use = use,
install_path = '',
**kwargs)
@@ -631,6 +633,7 @@ def build(bld):
target = 'test/test_build_cpp',
install_path = '',
env = strict_env,
+ includes = ['bindings/cxx/include'],
use = ['pugl_%s_static' % platform],
uselib = deps[platform]['uselib'] + ['CAIRO'])
@@ -682,8 +685,7 @@ def lint(ctx):
"-Xiwyu", "--check_also=examples/*.hpp",
"-Xiwyu", "--check_also=examples/*",
"-Xiwyu", "--check_also=pugl/*.h",
- "-Xiwyu", "--check_also=pugl/*.hpp",
- "-Xiwyu", "--check_also=pugl/*.ipp",
+ "-Xiwyu", "--check_also=bindings/cxx/include/pugl/*.*",
"-Xiwyu", "--check_also=src/*.c",
"-Xiwyu", "--check_also=src/*.h",
"-Xiwyu", "--check_also=src/*.m"]