diff options
Diffstat (limited to 'contrib/DirectX-Headers/meson.build')
-rw-r--r-- | contrib/DirectX-Headers/meson.build | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/contrib/DirectX-Headers/meson.build b/contrib/DirectX-Headers/meson.build new file mode 100644 index 0000000..3174221 --- /dev/null +++ b/contrib/DirectX-Headers/meson.build | |||
@@ -0,0 +1,35 @@ | |||
1 | # Copyright (c) Microsoft Corporation. | ||
2 | # Licensed under the MIT License. | ||
3 | |||
4 | project('DirectX-Headers', 'cpp', version : '1.4.9', | ||
5 | default_options : ['cpp_std=c++14']) | ||
6 | |||
7 | inc_dirs = [include_directories('include', is_system : true)] | ||
8 | install_inc_subdirs = [''] | ||
9 | |||
10 | if host_machine.system() != 'windows' | ||
11 | inc_dirs += include_directories('include/wsl/stubs', is_system : true) | ||
12 | install_inc_subdirs += ['', 'wsl/stubs', 'directx'] | ||
13 | endif | ||
14 | |||
15 | guids_lib = static_library('DirectX-Guids', 'src/dxguids.cpp', include_directories : inc_dirs, install : true) | ||
16 | |||
17 | dep_dxheaders = declare_dependency( | ||
18 | link_with : guids_lib, | ||
19 | include_directories : inc_dirs) | ||
20 | |||
21 | if meson.version().version_compare('>=0.54.0') | ||
22 | meson.override_dependency('DirectX-Headers', dep_dxheaders) | ||
23 | endif | ||
24 | |||
25 | if not meson.is_subproject() and get_option('build-test') | ||
26 | subdir('test') | ||
27 | endif | ||
28 | |||
29 | pkg = import('pkgconfig') | ||
30 | pkg.generate(name : 'DirectX-Headers', | ||
31 | description : 'Headers for using D3D12', | ||
32 | libraries : [guids_lib], | ||
33 | version : meson.project_version(), | ||
34 | subdirs : install_inc_subdirs) | ||
35 | install_subdir('include', install_dir : '') | ||