-
Notifications
You must be signed in to change notification settings - Fork 1
/
meson.build
54 lines (41 loc) · 1.28 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
project('libostd', ['cpp'],
version: '0.1.0',
default_options: ['buildtype=plain', 'cpp_std=c++17', 'warning_level=3'],
meson_version: '>=0.46'
)
dir_prefix = get_option('prefix')
dir_include = join_paths(dir_prefix, get_option('includedir'))
dir_data = join_paths(dir_prefix, get_option('datadir'))
dir_lib = join_paths(dir_prefix, get_option('libdir'))
dir_package_include = join_paths(dir_include, 'ostd')
unicode_data = join_paths('data', 'UnicodeData-13.0.txt')
libostd_includes = [include_directories('.')]
cxx = meson.get_compiler('cpp')
extra_cxxflags = []
if get_option('buildtype') != 'plain'
if cxx.has_argument('-Wshadow')
extra_cxxflags += '-Wshadow'
endif
if cxx.has_argument('-Wold-style-cast')
extra_cxxflags += '-Wold-style-cast'
endif
endif
if cxx.has_argument('-fvisibility=hidden')
extra_cxxflags += '-fvisibility=hidden'
endif
subdir('src')
if get_option('build-tests')
subdir('tests')
endif
if get_option('build-examples')
subdir('examples')
endif
pkg = import('pkgconfig')
pkg.generate(
libraries: libostd_lib,
version: meson.project_version(),
name: 'libostd',
filebase: 'libostd',
url: 'https://git.octaforge.org/octaforge/libostd',
description: 'OctaForge C++ utility library'
)