forked from fortran-lang/fftpack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
57 lines (49 loc) · 1.17 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
project(
'fftpack',
'fortran',
version: '4.0.0',
meson_version: '>=0.57',
default_options: [
'buildtype=debugoptimized',
'default_library=both',
'c_std=c11',
],
)
install = not (meson.is_subproject() and get_option('default_library') == 'static')
# Collect source of the project
srcs = []
subdir('src')
# General configuration information
inc_dirs = []
lib_deps = []
subdir('configure')
# Library target
fftpack_lib = library(
meson.project_name(),
sources: srcs,
version: meson.project_version(),
dependencies: lib_deps,
include_directories: inc_dirs,
install: install,
)
# Export dependency for other projects and test suite
fftpack_dep = declare_dependency(
link_with: fftpack_lib,
dependencies: lib_deps,
variables: {'includedir': meson.current_source_dir() / 'include'},
)
# add the testsuite
subdir('test')
if install
module_id = meson.project_name() / fc_id + '-' + fc.version()
meson.add_install_script(
find_program(files('configure'/'install-mod.py')),
get_option('includedir') / module_id,
)
pkg = import('pkgconfig')
pkg.generate(
fftpack_lib,
description: 'fftpack',
subdirs: ['', module_id],
)
endif