mirror of
https://git.yoctoproject.org/poky
synced 2026-03-25 19:02:23 +01:00
Newer versions of meson throw a warning if newer features are used without explicit declaration of the required meson version. (From OE-Core rev: 92d1c2343f9c7afe4ad627b3059f2e9556084d5d) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
40 lines
851 B
Meson
40 lines
851 B
Meson
#
|
|
# Copyright OpenEmbedded Contributors
|
|
#
|
|
# SPDX-License-Identifier: MIT
|
|
#
|
|
|
|
project('meson-example', 'cpp',
|
|
version: '1.0.0',
|
|
default_options: ['cpp_std=c++17'],
|
|
meson_version: '>=1.1.0'
|
|
)
|
|
|
|
jsoncdep = dependency('json-c')
|
|
|
|
if get_option('FAILING_TEST').enabled()
|
|
add_project_arguments('-DFAIL_COMPARISON_STR=foo', language: 'cpp')
|
|
endif
|
|
|
|
mesonexlib = shared_library('mesonexlib',
|
|
'cpp-example-lib.cpp', 'cpp-example-lib.hpp',
|
|
version: meson.project_version(),
|
|
soversion: meson.project_version().split('.')[0],
|
|
dependencies : jsoncdep,
|
|
install : true
|
|
)
|
|
|
|
executable('mesonex',
|
|
'cpp-example.cpp',
|
|
link_with : mesonexlib,
|
|
install : true
|
|
)
|
|
|
|
test_mesonex = executable('test-mesonex',
|
|
'test-cpp-example.cpp',
|
|
link_with : mesonexlib,
|
|
install : true
|
|
)
|
|
|
|
test('meson example test', test_mesonex)
|