1
project ('LibSSTS', 'c',
2
default_options : ['c_std=gnu18'],
7
conf = configuration_data ()
9
version_array = meson.project_version ().split ('.')
11
conf.set ('SSTS_V_MAJOR', version_array[0].to_int ())
12
conf.set ('SSTS_V_MINOR', version_array[1].to_int ())
13
conf.set ('SSTS_V_PATCH', version_array[2].to_int ())
15
conf.set ('DEBUG', 'ON')
16
conf.set ('S_USE_GC', 'ON')
17
conf.set ('SSTS_BUILDING', 'ON')
19
ssts_project_root = meson.source_root()
22
cc = meson.get_compiler ('c')
24
pthread_dep = dependency ('threads',required : false)
25
mthreads_dep = cc.find_library ('mthreads', required : false)
26
# Need to figure out how to get if Boehm GC is included or not...
27
boehm_dep = cc.find_library ('gc', required : false)
28
# This will always exist, but we need to specify it anyways, Not needed on
29
# Windows, it seems, as it is part of the standard library.
30
mathlib_dep = cc.find_library ('m', required : false)
32
if mthreads_dep.found ()
33
conf.set ('HAVE_MTHREAD', 'ON')
34
conf.set ('HAVE_PTHREAD', 'OFF')
35
add_global_arguments('-mthread', language : 'c')
36
elif pthread_dep.found ()
37
conf.set ('HAVE_MTHREAD', 'OFF')
38
conf.set ('HAVE_PTHREAD', 'ON')
39
add_global_arguments('-pthread', language : 'c')
41
conf.set ('HAVE_MTHREAD', 'OFF')
42
conf.set ('HAVE_PTHREAD', 'OFF')