xref: /aosp_15_r20/external/mesa3d/src/microsoft/clc/meson.build (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1# Copyright © Microsoft Corporation
2# SPDX-License-Identifier: MIT
3
4files_libclc_compiler = files(
5  'clc_compiler.c',
6  'clc_nir.c',
7)
8
9libclc_compiler = shared_library(
10  'clon12compiler',
11  [files_libclc_compiler, sha1_h],
12  vs_module_defs : 'clon12compiler.def',
13  include_directories : [inc_include, inc_src, inc_spirv],
14  dependencies: [idep_mesaclc, idep_nir_headers, dep_version, idep_mesautil,
15                 idep_libdxil_compiler, idep_nir, idep_vtn],
16  install : true,
17  name_prefix : ''  # otherwise mingw will create libclon12compiler.dll
18)
19
20if dep_dxheaders.found() and host_machine.system() == 'windows' and with_tests
21  clc_compiler_test = executable('clc_compiler_test',
22    ['clc_compiler_test.cpp', 'compute_test.cpp'],
23    link_with : [libclc_compiler],
24    dependencies : [idep_gtest, idep_mesautil, idep_libdxil_compiler, dep_dxheaders,
25                    dep_spirv_tools, idep_compiler],
26    include_directories : [inc_include, inc_src, inc_spirv],
27  )
28
29  if build_machine.system() == 'windows'
30    test('clc_compiler_test', clc_compiler_test, timeout: 180, protocol : 'gtest')
31  endif
32
33endif
34