summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build9
1 files changed, 9 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 4d3e99d3..a3b0bc82 100644
--- a/meson.build
+++ b/meson.build
@@ -28,8 +28,17 @@ common_arguments = [
c_arguments = common_arguments
cpp_arguments = common_arguments
+# Use libc++ by default if available instead of libstdc++ when compiling with
+# clang.
+if cc.get_id() == 'clang' and cc.find_library('libc++', required: false).found()
+ cpp_arguments += [
+ '-stdlib=libc++',
+ ]
+endif
+
add_project_arguments(c_arguments, language : 'c')
add_project_arguments(cpp_arguments, language : 'cpp')
+add_project_link_arguments(cpp_arguments, language : 'cpp')
libcamera_includes = include_directories('include')