-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
63 lines (54 loc) · 1.6 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
project('neat',
['cpp', 'c'],
license: 'GPL3',
default_options: ['buildtype=debug',
'cpp_std=c++17',
'warning_level=3'])
cc = meson.get_compiler('cpp')
add_project_arguments(['-Wpedantic',
'-Wunreachable-code',
'-DGLM_CONFIG_XYZW_ONLY'],
language : 'cpp')
includes = include_directories('include')
stdfs = cc.find_library('stdc++fs')
freetype2 = dependency('freetype2')
glesv2 = dependency('glesv2')
glm = dependency('glm')
libpng = dependency('libpng')
deps = [freetype2,
glesv2,
glm,
libpng,
stdfs]
assimp = dependency('assimp', required: get_option('assimp'))
if assimp.found()
add_project_arguments('-DENABLE_ASSIMP', language: 'cpp')
deps += assimp
endif
if get_option('platform') == 'wayland'
add_project_arguments(['-DLINUX','-DWAYLAND'], language : 'cpp')
subdir('wayland')
elif get_option('platform') == 'x11'
add_project_arguments(['-DLINUX', '-DX11'], language : 'cpp')
subdir('x11')
elif get_option('platform') == 'android'
add_project_arguments('-DANDROID', language : 'cpp')
endif
libneat = static_library('neat',
['source/Asset.cc',
'source/Billboard.cc',
'source/Buffer.cc',
'source/Font.cc',
'source/GLResource.cc',
'source/Image.cc',
'source/Log.cc',
'source/Model.cc',
'source/Program.cc',
'source/Text.cc',
'source/Texture.cc'],
include_directories: includes,
dependencies: deps)
neat = declare_dependency(link_with: libneat, include_directories: includes)
if get_option('modelview').enabled()
subdir('tools/modelview')
endif