forked from snailsnap/mollex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
71 lines (59 loc) · 1.47 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
project('mollex',
'cpp',
default_options : ['cpp_std=c++14'])
success = true
cc_args = [] #['-Wno-deprecated', '-pthread']
cc = meson.get_compiler('cpp')
# sources
#c = run_command('ls_sources.sh')
#sources = c.stdout().strip().split('\n')
sources = ['src/mollex.cxx',
'src/detect.cxx',
'src/molluscoid.cxx',
'src/globals.cxx',
]
# dependencies
deps = []
inc_dirs = []
libs = []
# Qt5
qt5 = import('qt5')
qt5_dep = dependency('qt5', modules: ['Core'], required : true)
deps += qt5_dep
# OpenCV
cv_dep = dependency('opencv', version : ['>= 3.2.0'], required : false)
if cv_dep.found()
deps += cv_dep
else
message('Could not found OpenCV. Use custom paths instead: ')
message('Includes: ' + get_option('opencv_includes'))
message('Lib: ' + get_option('opencv_lib'))
deps += declare_dependency(
include_directories:
include_directories( get_option('opencv_includes') ),
link_args: get_option('opencv_lib')
)
endif
# openmp
#if cc.has_header('omp.h')
# cc_args += '-fopenmp'
# deps += cc.find_library('gomp', required: true)
#endif
# Debug options
message(get_option('buildtype'))
if get_option('buildtype').startswith('debug')
add_project_arguments('-DDEBUG', language : 'cpp')
endif
if host_machine.system() == 'windows'
add_project_arguments('-D_USE_MATH_DEFINES', language : 'cpp')
endif
if success
executable('mollex', sources,
dependencies: deps,
include_directories:
include_directories(
inc_dirs
),
cpp_args: cc_args,
install: true )
endif