52 lines
1.1 KiB
Meson
52 lines
1.1 KiB
Meson
project(
|
|
'MESHTalos',
|
|
['cpp','c'],
|
|
version : '0.1',
|
|
meson_version : '>= 1.3.0',
|
|
default_options : ['warning_level=3', 'cpp_std=c++20', 'c_std=gnu11'],
|
|
)
|
|
|
|
dependencies = [
|
|
dependency('littlefs')
|
|
]
|
|
|
|
# These arguments are only used to build the shared library
|
|
# not the executables that use the library.
|
|
lib_args = ['-DBUILDING_MESHTALOS']
|
|
|
|
lib = library(
|
|
'meshtalos',
|
|
'meshtalos.cpp',
|
|
'./mongoose.c',
|
|
install : true,
|
|
cpp_shared_args : lib_args,
|
|
gnu_symbol_visibility : 'hidden',
|
|
dependencies : dependencies,
|
|
)
|
|
|
|
test_exe = executable(
|
|
'meshtalos_test',
|
|
'meshtalos_test.cpp',
|
|
dependencies : dependencies,
|
|
link_with : lib,
|
|
)
|
|
test('meshtalos', test_exe)
|
|
|
|
# Make this library usable as a Meson subproject.
|
|
meshtalos_dep = declare_dependency(
|
|
include_directories : include_directories('.'),
|
|
dependencies : dependencies,
|
|
link_with : lib,
|
|
)
|
|
meson.override_dependency('MESHTalos', meshtalos_dep)
|
|
|
|
# Make this library usable from the system's
|
|
# package manager.
|
|
install_headers('meshtalos.hpp', subdir : 'meshtalos')
|
|
|
|
pkg_mod = import('pkgconfig')
|
|
pkg_mod.generate(
|
|
lib,
|
|
description : 'Meson sample project.',
|
|
subdirs : 'meshtalos',
|
|
)
|