summaryrefslogtreecommitdiffstats
path: root/meta-selftest/recipes-test/cpp/files/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meta-selftest/recipes-test/cpp/files/meson.build')
-rw-r--r--meta-selftest/recipes-test/cpp/files/meson.build38
1 files changed, 38 insertions, 0 deletions
diff --git a/meta-selftest/recipes-test/cpp/files/meson.build b/meta-selftest/recipes-test/cpp/files/meson.build
new file mode 100644
index 0000000000..0e2b55f3a2
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/files/meson.build
@@ -0,0 +1,38 @@
1#
2# Copyright OpenEmbedded Contributors
3#
4# SPDX-License-Identifier: MIT
5#
6
7project('meson-example', 'cpp',
8 version: '1.0.0',
9 default_options: ['cpp_std=c++17']
10 )
11
12jsoncdep = dependency('json-c')
13
14if get_option('FAILING_TEST').enabled()
15 add_project_arguments('-DFAIL_COMPARISON_STR=foo', language: 'cpp')
16endif
17
18mesonexlib = shared_library('mesonexlib',
19 'cpp-example-lib.cpp', 'cpp-example-lib.hpp',
20 version: meson.project_version(),
21 soversion: meson.project_version().split('.')[0],
22 dependencies : jsoncdep,
23 install : true
24 )
25
26executable('mesonex',
27 'cpp-example.cpp',
28 link_with : mesonexlib,
29 install : true
30 )
31
32test_mesonex = executable('test-mesonex',
33 'test-cpp-example.cpp',
34 link_with : mesonexlib,
35 install : true
36)
37
38test('meson example test', test_mesonex)