-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmeson.build
78 lines (62 loc) · 2.35 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
project('elementary_plotlib', 'c', 'cpp', version: '1.0-beta3', default_options : ['c_std=c99' ,'cpp_std=c++17'])
host_system = host_machine.system()
host_is_window = (host_system == 'windows') or (host_system == 'cygwin')
libelem_cflags = []
if host_system == 'windows'
libelem_cflags += '-DWIN32'
elif host_system == 'cygwin'
libelem_cflags += '-DCYGWIN'
endif
debug_build = get_option('buildtype') != 'release'
cc = meson.get_compiler('cpp')
if debug_build
libelem_cflags += '-DELEM_PLOT_DEBUG'
libelem_cflags += '-DELEM_PLOT_DEBUG_LEVEL=' + get_option('debuglevel').to_string()
endif
libelem_include = include_directories('include')
install_headers('include/elem/elem_cpp.h', subdir: 'elem')
install_headers('include/elem/elem_c.h', subdir: 'elem')
install_headers('include/elem/elem.h', subdir: 'elem')
install_headers('include/elem/elem_utils.h', subdir: 'elem')
install_headers('include/elem/elem_constants.h', subdir: 'elem')
install_headers('include/elem/elem_generator.h', subdir: 'elem')
install_headers('include/elem/elem_c_forward.h', subdir: 'elem')
subdir('src')
subdir('window')
subdir('sdl')
pkg = import('pkgconfig')
pkg.generate(libelem_win,
filebase : 'libelem',
name : 'libelem',
libraries : libelem,
description : 'The Elementary Plot library',
url : 'github.com/franko/elementary-plotlib',
)
fox_dep = dependency('fox', required: false)
enable_fox = (get_option('fox') and fox_dep.found())
if enable_fox
subdir('fox')
install_headers('include/elem/elem_fox.h', subdir: 'elem')
install_headers('include/elem/elem_fox_cpp.h', subdir: 'elem')
install_headers('include/FXElemWindow.h')
install_headers('include/FXElemBaseWindow.h')
endif
sol_dep = dependency('sol2', required: false)
luajit_dep = dependency('luajit', required: false)
puc_rio_lua_dep = dependency('lua', required: false)
if luajit_dep.found() or not puc_rio_lua_dep.found()
lua_dep = luajit_dep
else
lua_dep = puc_rio_lua_dep
endif
enable_lua = (get_option('lua') and sol_dep.found() and lua_dep.found())
if enable_lua
libelem_cflags += '-DELEM_PLOT_USE_LUA'
subdir('lua')
install_headers('include/elem/elem_lua.h', subdir: 'elem')
install_headers('include/elem/elem_lua_c.h', subdir: 'elem')
install_headers('include/elem/elem_lua_cpp.h', subdir: 'elem')
endif
if get_option('tests')
subdir('tests')
endif