aboutsummaryrefslogtreecommitdiffstats
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
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.
-rw-r--r--bindings/cxx/include/.clang-tidy5
-rw-r--r--bindings/cxx/include/pugl/pugl.hpp (renamed from include/pugl/pugl.hpp)0
-rw-r--r--bindings/cxx/include/pugl/pugl.ipp (renamed from include/pugl/pugl.ipp)0
-rw-r--r--bindings/cxx/include/pugl/pugl_cairo.hpp (renamed from include/pugl/pugl_cairo.hpp)0
-rw-r--r--bindings/cxx/include/pugl/pugl_gl.hpp (renamed from include/pugl/pugl_gl.hpp)0
-rw-r--r--bindings/cxx/include/pugl/pugl_stub.hpp (renamed from include/pugl/pugl_stub.hpp)0
-rw-r--r--bindings/cxx/include/pugl/pugl_vulkan.hpp (renamed from include/pugl/pugl_vulkan.hpp)0
-rw-r--r--doc/reference.doxygen.in1
-rw-r--r--wscript10
9 files changed, 12 insertions, 4 deletions
diff --git a/bindings/cxx/include/.clang-tidy b/bindings/cxx/include/.clang-tidy
new file mode 100644
index 0000000..6453ca0
--- /dev/null
+++ b/bindings/cxx/include/.clang-tidy
@@ -0,0 +1,5 @@
+Checks: >
+ *,
+ -*-uppercase-literal-suffix,
+FormatStyle: file
+HeaderFilterRegex: 'pugl/.*'
diff --git a/include/pugl/pugl.hpp b/bindings/cxx/include/pugl/pugl.hpp
index 65793b2..65793b2 100644
--- a/include/pugl/pugl.hpp
+++ b/bindings/cxx/include/pugl/pugl.hpp
diff --git a/include/pugl/pugl.ipp b/bindings/cxx/include/pugl/pugl.ipp
index aa6e6f1..aa6e6f1 100644
--- a/include/pugl/pugl.ipp
+++ b/bindings/cxx/include/pugl/pugl.ipp
diff --git a/include/pugl/pugl_cairo.hpp b/bindings/cxx/include/pugl/pugl_cairo.hpp
index 213c977..213c977 100644
--- a/include/pugl/pugl_cairo.hpp
+++ b/bindings/cxx/include/pugl/pugl_cairo.hpp
diff --git a/include/pugl/pugl_gl.hpp b/bindings/cxx/include/pugl/pugl_gl.hpp
index b7c581e..b7c581e 100644
--- a/include/pugl/pugl_gl.hpp
+++ b/bindings/cxx/include/pugl/pugl_gl.hpp
diff --git a/include/pugl/pugl_stub.hpp b/bindings/cxx/include/pugl/pugl_stub.hpp
index 362682b..362682b 100644
--- a/include/pugl/pugl_stub.hpp
+++ b/bindings/cxx/include/pugl/pugl_stub.hpp
diff --git a/include/pugl/pugl_vulkan.hpp b/bindings/cxx/include/pugl/pugl_vulkan.hpp
index 9241aba..9241aba 100644
--- a/include/pugl/pugl_vulkan.hpp
+++ b/bindings/cxx/include/pugl/pugl_vulkan.hpp
diff --git a/doc/reference.doxygen.in b/doc/reference.doxygen.in
index 8aa511e..5fecdbe 100644
--- a/doc/reference.doxygen.in
+++ b/doc/reference.doxygen.in
@@ -782,6 +782,7 @@ WARN_LOGFILE =
# Note: If this tag is empty the current directory is searched.
INPUT = @PUGL_SRCDIR@/include/pugl/ \
+ @PUGL_SRCDIR@/bindings/cxx/include/pugl/ \
@PUGL_SRCDIR@/doc/mainpage.md
# This tag can be used to specify the character encoding of the source files
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"]