aboutsummaryrefslogtreecommitdiffstats
path: root/test/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'test/meson.build')
-rw-r--r--test/meson.build41
1 files changed, 41 insertions, 0 deletions
diff --git a/test/meson.build b/test/meson.build
index de4bd71..bd838f3 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -65,3 +65,44 @@ if vulkan_dep.found()
dependencies: [pugl_dep, vulkan_backend_dep]))
endforeach
endif
+
+unified_args = []
+unified_deps = [core_deps]
+if cairo_dep.found()
+ unified_args += ['-DWITH_CAIRO']
+ unified_deps += [cairo_dep]
+endif
+
+if opengl_dep.found()
+ unified_args += ['-DWITH_OPENGL']
+ unified_deps += [opengl_dep]
+endif
+
+if vulkan_dep.found()
+ unified_args += ['-DWITH_VULKAN']
+ unified_deps += [vulkan_deps]
+endif
+
+if host_machine.system() == 'darwin'
+ add_languages(['objcpp'])
+
+ objcpp = meson.get_compiler('objcpp')
+ unified_args += objcpp.get_supported_arguments(
+ c_warnings + cpp_warnings + objc_warnings)
+
+ executable('inline_objcpp', 'test_inline_objcpp.mm',
+ include_directories: include_directories(includes),
+ dependencies: unified_deps,
+ objcpp_args: unified_args)
+elif is_variable('cpp')
+ if cpp.get_id() == 'msvc'
+ unified_args += [
+ '/wd4464' # relative include path contains '..'
+ ]
+ endif
+
+ executable('inline_cpp', 'test_inline_cpp.cpp',
+ include_directories: include_directories(includes),
+ dependencies: unified_deps,
+ cpp_args: unified_args)
+endif