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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
project('mglpp', ['cpp'], version : '1.0.0', default_options : ['warning_level=2'], subproject_dir : 'depends')
if get_option('buildtype') == 'debug'
add_project_arguments('-g3', language : ['cpp'])
elif get_option('buildtype') == 'release'
add_project_arguments('-DNDEBUG', language : ['cpp'])
endif
src = [
'src/graphics/Text.cpp',
'src/graphics/Image.cpp',
'src/graphics/Font.cpp',
'src/graphics/VertexBuffer.cpp',
'src/graphics/Rectangle.cpp',
'src/graphics/Texture.cpp',
'src/graphics/Sprite.cpp',
'src/graphics/Shader.cpp',
'src/system/MemoryMappedFile.cpp',
'src/system/Clock.cpp',
'src/system/Utf8.cpp',
'src/window/Window.cpp',
'src/mglpp.cpp',
]
project_headers = [
'include/mglpp/graphics/Text.hpp',
'include/mglpp/graphics/PrimitiveType.hpp',
'include/mglpp/graphics/Vertex.hpp',
'include/mglpp/graphics/Drawable.hpp',
'include/mglpp/graphics/Texture.hpp',
'include/mglpp/graphics/Shader.hpp',
'include/mglpp/graphics/Sprite.hpp',
'include/mglpp/graphics/Color.hpp',
'include/mglpp/graphics/VertexBuffer.hpp',
'include/mglpp/graphics/Image.hpp',
'include/mglpp/graphics/Font.hpp',
'include/mglpp/graphics/Rectangle.hpp',
'include/mglpp/system/Utf8.hpp',
'include/mglpp/system/vec.hpp',
'include/mglpp/system/Clock.hpp',
'include/mglpp/system/MemoryMappedFile.hpp',
'include/mglpp/system/FloatRect.hpp',
'include/mglpp/mglpp.hpp',
'include/mglpp/window/Window.hpp',
'include/mglpp/window/Mouse.hpp',
'include/mglpp/window/Event.hpp',
'include/mglpp/window/Keyboard.hpp',
'include/mglpp/window/Clipboard.hpp',
]
mgl_proj = subproject('mgl')
mgl_dep = mgl_proj.get_variable('mgl_dep')
dep = [
mgl_dep,
]
public_headers = include_directories('include')
project_target = static_library(
meson.project_name(),
src,
install : false,
include_directories : public_headers,
dependencies : dep,
)
project_dep = declare_dependency(include_directories : public_headers, link_with : project_target, dependencies : mgl_dep)
set_variable(meson.project_name() + '_dep', project_dep)
#install_headers(project_headers, subdir : meson.project_name(), preserve_path : true)
# pkg_mod = import('pkgconfig')
# pkg_mod.generate(
# name : meson.project_name(),
# filebase : meson.project_name(),
# description : 'Minimal Graphics Library',
# subdirs : meson.project_name(),
# libraries : project_target,
# )
# if not meson.is_subproject()
# subdir('tests')
# test('tests',
# executable('run_tests',
# files(['tests/main.cpp']),
# dependencies : [project_dep, test_dep],
# install : false
# )
# )
# endif
|