/simpletypesystem/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/simpletypesystem/trunk
151.1.1 by Gustav Hartvigsson
* fixed... sort of... the Meson Build system... Still buggy.
1
project ('LibSSTS', 'c',
151.1.2 by Gustav Hartvigsson
* Removed wchar.
2
         default_options : ['c_std=gnu18'],
151.1.1 by Gustav Hartvigsson
* fixed... sort of... the Meson Build system... Still buggy.
3
         version : '0.0.1',
4
         license : 'MIT')
5
151.1.2 by Gustav Hartvigsson
* Removed wchar.
6
151.1.1 by Gustav Hartvigsson
* fixed... sort of... the Meson Build system... Still buggy.
7
conf = configuration_data ()
8
9
version_array = meson.project_version ().split ('.')
10
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 ())
14
15
conf.set ('DEBUG', 'ON')
16
conf.set ('S_USE_GC', 'ON')
17
conf.set ('SSTS_BUILDING', 'ON')
18
19
ssts_project_root = meson.source_root()
20
21
22
cc = meson.get_compiler ('c')
23
151.1.2 by Gustav Hartvigsson
* Removed wchar.
24
pthread_dep = dependency ('threads',required : false)
151.1.1 by Gustav Hartvigsson
* fixed... sort of... the Meson Build system... Still buggy.
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)
31
32
if mthreads_dep.found ()
33
  conf.set ('HAVE_MTHREAD', 'ON')
34
  conf.set ('HAVE_PTHREAD', 'OFF')
151.1.2 by Gustav Hartvigsson
* Removed wchar.
35
  add_global_arguments('-mthread', language : 'c')
151.1.1 by Gustav Hartvigsson
* fixed... sort of... the Meson Build system... Still buggy.
36
elif pthread_dep.found ()
37
  conf.set ('HAVE_MTHREAD', 'OFF')
38
  conf.set ('HAVE_PTHREAD', 'ON')
151.1.2 by Gustav Hartvigsson
* Removed wchar.
39
  add_global_arguments('-pthread', language : 'c')
151.1.1 by Gustav Hartvigsson
* fixed... sort of... the Meson Build system... Still buggy.
40
else
41
  conf.set ('HAVE_MTHREAD', 'OFF')
42
  conf.set ('HAVE_PTHREAD', 'OFF')
43
endif
44
45
subdir ('libssts')
157 by Gustav Hartvigsson
Hopefully finisted the meson convertion
46
subdir ('tests')
151.1.1 by Gustav Hartvigsson
* fixed... sort of... the Meson Build system... Still buggy.
47