forked from dftd4/cpp-d4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
92 lines (82 loc) · 2.14 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
# This file is part of cpp-d4.
#
# Copyright (C) 2019 Sebastian Ehlert, Marvin Friede
#
# cpp-d4 is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cpp-d4 is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with cpp-d4. If not, see <https://www.gnu.org/licenses/>.
project(
'cpp-d4',
'cpp',
version: '2.0',
license: 'LGPL3-or-later',
meson_version: '>=0.51',
default_options: [
'default_library=both',
],
)
cxx = meson.get_compiler('cpp')
deps = []
foreach lib: ['cblas', 'lapacke']
this_dep = dependency(lib, required: false)
if not this_dep.found()
this_dep = cxx.find_library(lib)
endif
deps += this_dep
endforeach
srcs = files(
'src/dftd_cutoff.cpp',
'src/dftd_damping.cpp',
'src/dftd_dispersion.cpp',
'src/dftd_eeq.cpp',
'src/dftd_model.cpp',
'src/dftd_ncoord.cpp',
'src/damping/dftd_atm.cpp',
'src/damping/dftd_rational.cpp',
)
cpp_d4_inc = include_directories('include')
cpp_d4_lib = library(
meson.project_name(),
sources: srcs,
version: meson.project_version(),
include_directories: cpp_d4_inc,
dependencies: deps,
install: true,
)
install_headers(
'include/dftd_cutoff.h',
'include/dftd_damping.h',
'include/dftd_dispersion.h',
'include/dftd_eeq.h',
'include/dftd_geometry.h',
'include/dftd_matrix.h',
'include/dftd_model.h',
'include/dftd_ncoord.h',
'include/dftd_parameters.h',
'include/damping/dftd_atm.h',
'include/damping/dftd_rational.h',
)
cpp_d4_dep = declare_dependency(
link_with: cpp_d4_lib,
include_directories: cpp_d4_inc,
dependencies: deps,
)
executable(
meson.project_name(),
sources: files(
'app/main.cpp',
'app/readxyz.cpp',
),
dependencies: cpp_d4_dep,
install: true,
)
subdir('test')