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
|
project ('LibSSTS', 'c',
default_options : ['c_std=gnu18'],
version : '0.0.1',
license : 'MIT')
conf = configuration_data ()
version_array = meson.project_version ().split ('.')
conf.set ('SSTS_V_MAJOR', version_array[0].to_int ())
conf.set ('SSTS_V_MINOR', version_array[1].to_int ())
conf.set ('SSTS_V_PATCH', version_array[2].to_int ())
conf.set ('DEBUG', 'ON')
conf.set ('S_USE_GC', 'ON')
conf.set ('SSTS_BUILDING', 'ON')
ssts_project_root = meson.source_root()
cc = meson.get_compiler ('c')
pthread_dep = dependency ('threads',required : false)
mthreads_dep = cc.find_library ('mthreads', required : false)
# Need to figure out how to get if Boehm GC is included or not...
boehm_dep = cc.find_library ('gc', required : false)
# This will always exist, but we need to specify it anyways, Not needed on
# Windows, it seems, as it is part of the standard library.
mathlib_dep = cc.find_library ('m', required : false)
if mthreads_dep.found ()
conf.set ('HAVE_MTHREAD', 'ON')
conf.set ('HAVE_PTHREAD', 'OFF')
add_global_arguments('-mthread', language : 'c')
elif pthread_dep.found ()
conf.set ('HAVE_MTHREAD', 'OFF')
conf.set ('HAVE_PTHREAD', 'ON')
add_global_arguments('-pthread', language : 'c')
else
conf.set ('HAVE_MTHREAD', 'OFF')
conf.set ('HAVE_PTHREAD', 'OFF')
endif
subdir ('libssts')
subdir ('tests')
|