diff --git a/meson.build b/meson.build index 0bf02182864..a1728c4ac8e 100644 --- a/meson.build +++ b/meson.build @@ -616,7 +616,7 @@ dep_dxheaders = null_dep if with_gallium_d3d12 or with_microsoft_clc dep_dxheaders = dependency('DirectX-Headers', fallback : ['DirectX-Headers', 'dep_dxheaders'], required : with_gallium_d3d12 - ) + ) endif if with_vulkan_overlay_layer or with_aco_tests @@ -1757,6 +1757,13 @@ else dep_llvmspirvlib = null_dep endif +# Be explicit about only using this lib on Windows, to avoid picking +# up random libs with the generic name 'libversion' +dep_version = null_dep +if with_opencl_spirv and host_machine.system() == 'windows' + dep_version = cpp.find_library('version') +endif + with_opencl_native = _opencl != 'disabled' and get_option('opencl-native') if (with_amd_vk or with_gallium_radeonsi or diff --git a/src/gallium/targets/opencl/meson.build b/src/gallium/targets/opencl/meson.build index b77826b6e1e..ec65fcbe18e 100644 --- a/src/gallium/targets/opencl/meson.build +++ b/src/gallium/targets/opencl/meson.build @@ -85,14 +85,6 @@ if not (dep_clang.found() and dep_clang_usable) endif endif -# Be explicit about only using this lib on Windows, to avoid picking -# up random libs with the generic name 'libversion' -if host_machine.system() == 'windows' - dep_version = cpp.find_library('version') -else - dep_version = null_dep -endif - ocldef = files(opencl_libname + '.def')[0] libopencl = shared_library( diff --git a/src/microsoft/clc/meson.build b/src/microsoft/clc/meson.build index 05b48b6a813..fb53f5445bd 100644 --- a/src/microsoft/clc/meson.build +++ b/src/microsoft/clc/meson.build @@ -55,7 +55,7 @@ libclc_compiler = shared_library( opencl_c_base_h, vs_module_defs : 'clon12compiler.def', include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_compiler, inc_gallium, inc_spirv], - dependencies: [idep_nir_headers, dep_clang, dep_llvm, cc.find_library('version'), + dependencies: [idep_nir_headers, dep_clang, dep_llvm, dep_version, dep_llvmspirvlib, idep_mesautil, idep_libdxil_compiler, idep_nir, dep_spirv_tools] )