-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmeson.build
71 lines (60 loc) · 2.42 KB
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# -----------------------------------------------------------------------------
#
# This file is part of the µOS++ distribution.
# (https://github.com/micro-os-plus/)
# Copyright (c) 2021 Liviu Ionescu. All rights reserved.
#
# Permission to use, copy, modify, and/or distribute this software
# for any purpose is hereby granted, under the terms of the MIT license.
#
# If a copy of the license was not distributed with this file, it can
# be obtained from https://opensource.org/licenses/MIT/.
#
# -----------------------------------------------------------------------------
# This file is intended to be consumed by applications with:
#
# `subdir('xpacks/@micro-os-plus/utils-lists')`
#
# The result is a dependency that can be referred as:
#
# `dependencies: [micro_os_plus_utils_lists_dependency],`
# Note: the meson configuration is provided only as a proof of concept,
# for production it might need some refinements.
# -----------------------------------------------------------------------------
message('Processing xPack @micro-os-plus/utils-lists...')
# -----------------------------------------------------------------------------
_local_compile_args = [] # Common C/C++ args.
_local_compile_c_args = []
_local_compile_cpp_args = []
_local_include_directories = []
_local_sources = []
_local_compile_definitions = []
_local_dependencies = []
_local_link_args = []
_local_link_with = []
_local_include_directories += [
'include',
]
_local_sources += [
'src/lists.cpp',
]
# https://mesonbuild.com/Reference-manual.html#declare_dependency
micro_os_plus_utils_lists_dependency = declare_dependency(
include_directories: include_directories(_local_include_directories),
compile_args: _local_compile_args,
sources: files(_local_sources),
dependencies: _local_dependencies,
link_args: _local_link_args,
link_with: _local_link_with,
)
# meson dependencies cannot differentiate c/cpp args; pass them separately.
micro_os_plus_utils_lists_dependency_compile_c_args = _local_compile_c_args
micro_os_plus_utils_lists_dependency_compile_cpp_args = _local_compile_cpp_args
foreach name : _local_include_directories
message('+ -I ' + name)
endforeach
foreach name : _local_sources + _local_compile_definitions + _local_compile_args + _local_compile_c_args + _local_compile_cpp_args
message('+ ' + name)
endforeach
message('> micro_os_plus_utils_lists_dependency')
# -----------------------------------------------------------------------------