This repository has been archived by the owner on Mar 16, 2022. It is now read-only.
forked from thegenemyers/DALIGNER
-
Notifications
You must be signed in to change notification settings - Fork 17
/
meson.build
113 lines (97 loc) · 2.56 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
project(
'daligner',
'c',
version : '0.0.1',
default_options : [
'buildtype=release',
'warning_level=3',
'c_std=gnu11',
'b_ndebug=false'],
license : 'BSD-3',
meson_version : '>= 0.46.0')
############
# CXXFLAGS #
############
daligner_flags = []
cc = meson.get_compiler('c')
foreach cflag: [
'-Wno-unused-result',
'-Wno-pointer-arith',
'-fno-strict-aliasing']
if cc.has_argument(cflag)
daligner_flags += cflag
endif
endforeach
################
# dependencies #
################
# libm
daligner_m_dep = cc.find_library('m', required : false)
# threads
daligner_thread_dep = dependency('threads', required : true)
# dazzdb
daligner_dazzdb_dep = dependency('dazzdb', fallback : ['dazzdb', 'dazzdb_dep'])
daligner_deps = [daligner_m_dep, daligner_thread_dep, daligner_dazzdb_dep]
############
# binaries #
############
# install library if
# - either running as a proper project
# - or using shared libraries
daligner_lib_install = (not meson.is_subproject()) or (get_option('default_library') == 'shared')
daligner_lib = library(
'daligner',
files([
'align.c']),
# use boost SONAME practice:
# cause ld startup issues before
# you even have the chance of running
# into ABI issues.
soversion : meson.project_version(),
version : meson.project_version(),
install : daligner_lib_install,
dependencies : daligner_deps,
c_args : daligner_flags)
daligner_exes = [
['daligner', files(['DB.c', 'lsd.sort.c', 'filter.c'])],
['HPC.daligner', []],
['LAsort', ['DB.c']],
['LAmerge', ['DB.c']],
['LAsplit', ['DB.c']],
['LAcat', ['DB.c']],
['LAshow', ['DB.c']],
['LAdump', ['DB.c']],
['LAcheck', ['DB.c']],
['daligner_p', files(['DB.c', 'lsd.sort.c', 'filter_p.c'])],
['LA4Falcon', files(['DBX.c'])],
['LA4Ice', ['DB.c']],
['DB2Falcon', ['DB.c']]]
foreach i : daligner_exes
executable(
i[0],
files([i[0] + '.c']) + i[1],
dependencies : daligner_deps,
install : (not meson.is_subproject()),
c_args : daligner_flags,
link_with : daligner_lib)
endforeach
###################
# dependency info #
###################
if not meson.is_subproject()
import('pkgconfig').generate(
libraries : daligner_lib,
version : meson.project_version(),
name : 'daligner',
filebase : 'daligner',
subdirs : 'daligner',
description : 'Daligner library')
install_headers(
files([
'align.h']),
subdir : 'daligner')
endif
daligner_dep = declare_dependency(
include_directories : include_directories('.'),
link_with : daligner_lib,
version : meson.project_version())