forked from unipept/FragGeneScanPlusPlus
-
Notifications
You must be signed in to change notification settings - Fork 1
/
meson.build
95 lines (83 loc) · 1.92 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
project('FragGeneScan++', 'c',
version: '0.1',
license: 'GPL3+',
meson_version: '>= 0.38.0',
)
# Dependencies
libmath = meson.get_compiler('c').find_library('m')
threads = dependency('threads')
doxygen = find_program('doxygen', required: false)
if not doxygen.found()
message('Doxygen could not be found, won\'t build documentation.')
endif
astyle = find_program('astyle', required: false)
# Configuration
conf = configuration_data()
pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
conf.set_quoted('PACKAGE_NAME', meson.project_name())
conf.set_quoted('PACKAGE_STRING', '@0@ @1@'.format(meson.project_name(), meson.project_version()))
conf.set_quoted('PACKAGE_VERSION', meson.project_version())
conf.set_quoted('PKGDATADIR', pkgdatadir)
conf.set_quoted('TOP_SRCDIR', meson.source_root())
# Create a config.h file
configure_file(
output: 'config.h',
configuration: conf,
)
# FGS+ executable
fgs_sources = [
'fasta.c',
'hmm_lib.c',
'run_hmm.c',
'util_lib.c',
]
fgs_flags = [
'-O3',
'-march=native',
'-include', 'config.h',
]
fgs_dependencies = [
libmath,
threads,
]
FGSpp = executable('FGS++', fgs_sources,
dependencies: fgs_dependencies,
c_args: fgs_flags,
include_directories: include_directories('.'), # include config.h
install: true,
)
# Install the train dir
install_subdir('train',
install_dir: pkgdatadir,
)
# Documentation
if doxygen.found()
doxyfile = configure_file(
input: 'Doxyfile.in',
output: 'Doxyfile',
configuration: conf,
)
custom_target('docs',
input: doxyfile,
depend_files: fgs_sources,
output: 'doc',
command: [ doxygen, '@INPUT@' ],
)
endif
# Coding conventions
if astyle.found()
custom_target('astyle',
input: fgs_sources,
output: fgs_sources,
command: [
astyle,
'--mode=c',
'--style=google',
'-s4',
'-n',
'-H',
'-k3',
'@INPUT@',
],
)
endif