aboutsummaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build10
1 files changed, 10 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 352c1734..db138663 100644
--- a/meson.build
+++ b/meson.build
@@ -6,6 +6,7 @@ project('serd', ['c'],
'b_ndebug=if-release',
'buildtype=release',
'c_std=c99',
+ 'cpp_std=c++14',
'default_library=shared',
'warning_level=2',
])
@@ -21,6 +22,10 @@ versioned_name = 'serd' + version_suffix
pkg = import('pkgconfig')
cc = meson.get_compiler('c')
+if add_languages('cpp', required: get_option('bindings_cpp'))
+ cpp = meson.get_compiler('cpp')
+endif
+
# Set ultra strict warnings for developers, if requested
c_warnings = []
c_suppressions = []
@@ -251,6 +256,11 @@ endif
# Install header to a versioned include directory
install_headers(c_headers, subdir: versioned_name / 'serd')
+# C++ bindings
+if is_variable('cpp')
+ subdir('bindings/cpp')
+endif
+
if not get_option('docs').disabled()
subdir('doc')
endif