-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
63 lines (52 loc) · 1.59 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
# meson.build
project('ttfrm', 'cpp',
version : '0.1.0',
license : 'MIT',
default_options : [
'cpp_std=c++11',
'buildtype=debugoptimized',
'warning_level=3',
'werror=true'
])
######################
# Declare Dependency #
######################
eigen_dep = dependency('eigen3', fallback : ['eigen3', 'eigen_dep'])
ttfrm_dep = declare_dependency(
version : meson.project_version(),
include_directories : include_directories('.'),
dependencies : [eigen_dep])
#########################
# Tests, Utilities, etc #
#########################
# Tests
gtest_dep = dependency('gtest', main : false, fallback : ['gtest', 'gtest_dep'])
tfrm_test = executable(
'tfrm_test', 'tests/tfrm_test.cpp', dependencies : [ttfrm_dep, gtest_dep])
test('tfrm_test', tfrm_test)
tfrm_tree_test = executable(
'tfrm_tree_test', 'tests/tfrm_tree_test.cpp', dependencies : [ttfrm_dep, gtest_dep])
test('tfrm_tree_test', tfrm_tree_test)
# Benchmark utility
tfrm_bench = executable('tfrm_bench', 'tests/tfrm_bench.cpp', dependencies : [ttfrm_dep])
# Spirograph-like demo
if get_option('graphics')
sdl2_dep = dependency('sdl2', fallback : ['sdl2', 'sdl2_dep'])
spirograph_demo = executable(
'spirograph_demo', 'tests/spirograph_demo.cpp', dependencies : [ttfrm_dep, sdl2_dep])
endif
###########
# Install #
###########
headers = [
'ttfrm/tfrm.hpp',
'ttfrm/tfrm_tree.hpp'
]
install_headers(headers, subdir : 'ttfrm')
pkg_mod = import('pkgconfig')
pkg_mod.generate(
name : 'ttfrm',
filebase : 'ttfrm',
description : '3D Rigid Transforms in C++',
subdirs : 'ttfrm',
version : meson.project_version())