-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmeson.build
29 lines (20 loc) · 889 Bytes
/
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
project('nvapi', ['c'])
if get_option('enable_d3d11')
add_project_arguments('-DMESON_BUILD_D3D11', language : 'c')
endif
cpu_family = target_machine.cpu_family()
include_path = include_directories('./include')
lib_d3d11 = declare_dependency(link_args: [ '-ld3d11' ])
lib_nvml = declare_dependency(link_args: [ '-lnvidia-ml' ])
lib_dl = declare_dependency(link_args: [ '-ldl' ])
winebuild = find_program('winebuild')
winegcc = find_program('winegcc')
widl = find_program('widl')
target_arch = cpu_family == 'x86_64' ? '-m64' : '-m32'
def_generator = generator(winebuild,
output : [ '@BASENAME@.def' ],
arguments : [ '-w', ' --def', '--export', '@INPUT@', '-o', '@OUTPUT@' ])
idl_generator = generator(widl,
output : [ '@BASENAME@.h' ],
arguments : [ target_arch, '-o', '@OUTPUT@', '-D__WINESRC__', '@EXTRA_ARGS@', '@INPUT@' ])
subdir('dlls')