-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
65 lines (55 loc) · 2.43 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
project('oak_rtti', ['cpp'],
default_options : ['cpp_eh=none', 'cpp_rtti=false', 'cpp_std=c++17', 'warning_level=3', 'werror=true'])
cxx_native = meson.get_compiler('cpp', native: true)
oak_util = subproject('oak_util')
oak_util_dep = oak_util.get_variable('oak_util_dep')
llvm_include_dir = join_paths(get_option('llvm_install_path'), 'include')
llvm_lib_dir = join_paths(get_option('llvm_install_path'), 'lib')
clang_includes = [ include_directories(llvm_include_dir, is_system: true) ]
if build_machine.system() == 'windows'
sys_deps = [
cxx_native.find_library('Version'),
]
else
sys_deps = [
dependency('threads', native: true),
cxx_native.find_library('z', required: false),
cxx_native.find_library('ncurses', required: false),
]
endif
llvm_deps = sys_deps + [
cxx_native.find_library('LLVMBinaryFormat', dirs: llvm_lib_dir),
cxx_native.find_library('LLVMBitstreamReader', dirs: llvm_lib_dir),
cxx_native.find_library('LLVMCore', dirs: llvm_lib_dir),
cxx_native.find_library('LLVMDemangle', dirs: llvm_lib_dir),
cxx_native.find_library('LLVMFrontendOpenMP', dirs: llvm_lib_dir),
cxx_native.find_library('LLVMMC', dirs: llvm_lib_dir),
cxx_native.find_library('LLVMMCParser', dirs: llvm_lib_dir),
cxx_native.find_library('LLVMOption', dirs: llvm_lib_dir),
cxx_native.find_library('LLVMProfileData', dirs: llvm_lib_dir),
cxx_native.find_library('LLVMRemarks', dirs: llvm_lib_dir),
cxx_native.find_library('LLVMSupport', dirs: llvm_lib_dir),
]
clang_deps = [
cxx_native.find_library('clangAnalysis', dirs: llvm_lib_dir),
cxx_native.find_library('clangAST', dirs: llvm_lib_dir),
cxx_native.find_library('clangASTMatchers', dirs: llvm_lib_dir),
cxx_native.find_library('clangBasic', dirs: llvm_lib_dir),
cxx_native.find_library('clangDriver', dirs: llvm_lib_dir),
cxx_native.find_library('clangEdit', dirs: llvm_lib_dir),
cxx_native.find_library('clangFrontend', dirs: llvm_lib_dir),
cxx_native.find_library('clangLex', dirs: llvm_lib_dir),
cxx_native.find_library('clangParse', dirs: llvm_lib_dir),
cxx_native.find_library('clangSema', dirs: llvm_lib_dir),
cxx_native.find_library('clangSerialization', dirs: llvm_lib_dir),
cxx_native.find_library('clangTooling', dirs: llvm_lib_dir),
] + llvm_deps
core_includes = [ include_directories('include') ]
subdir('tools')
subdir('runtime')
if get_option('build_example')
subdir('example')
endif
reflection_sources = files([
'include/oak_reflect/any.h',
])