-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
53 lines (44 loc) · 1.82 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
project('rfpkog', 'cpp',
version : '0.3.0',
default_options : ['cpp_std=c++17'])
dep_threads = dependency('threads')
dep_opencl = dependency('OpenCL', version : '>=1.2.0')
prog_pandoc = find_program('pandoc', get_option('pandoc'), required : false)
if prog_pandoc.found()
message(prog_pandoc.full_path())
endif
if get_option('legacy_cl_headers')
add_project_arguments('-DLEGACY_CL_HEADERS', language : 'cpp')
endif
kernel_path = get_option('kernel_path')
if kernel_path == ''
kernel_path = get_option('prefix') / get_option('datadir') / 'rfpkog'
endif
add_project_arguments('-DKERNEL_FILENAME="' + kernel_path / 'kernels.cl"', language : 'cpp')
add_project_arguments('-DCL_HPP_MINIMUM_OPENCL_VERSION=120',
'-DCL_HPP_TARGET_OPENCL_VERSION=120',
'-DCL_HPP_CL_1_2_DEFAULT_BUILD',
language : 'cpp')
add_project_arguments('-DRFPKOG_VERSION="' + meson.project_version() + '"', language : 'cpp')
executable('rfpkog',
'src/cl_headers.hpp',
'src/dtype.hpp',
'src/heat_kernel.hpp',
'src/kernel.hpp',
'src/main.cpp',
'src/misc.cpp', 'src/misc.hpp',
'src/options.cpp', 'src/options.hpp',
'src/pd.hpp',
'src/pwgk.hpp',
'src/rfpkog.hpp',
install : true,
dependencies : [dep_threads, dep_opencl])
install_data('src/kernels.cl')
# This will get less ugly when Meson's GH issue #1550 is fixed.
if prog_pandoc.found()
manpage = custom_target('manpage',
input : ['man/rfpkog.1.md'],
output : ['rfpkog.1'],
command : [prog_pandoc, '--standalone', '--to', 'man', '-o', '@OUTPUT@', '@INPUT@'],
install : true, install_dir : get_option('mandir') / 'man1')
endif