diff --git a/meson.build b/meson.build index 7c1cc07fd59..59713ea3201 100644 --- a/meson.build +++ b/meson.build @@ -1686,7 +1686,11 @@ with_opencl_native = _opencl != 'disabled' and get_option('opencl-native') if (with_amd_vk or with_gallium_radeonsi or (with_gallium_opencl and with_opencl_native) or (with_gallium_r600 and with_llvm)) - dep_elf = dependency('libelf', required : false) + if with_platform_windows + dep_elf = dependency('libelf', required : false, fallback : ['libelf', 'libelf_dep']) + else + dep_elf = dependency('libelf', required : false) + endif if not dep_elf.found() dep_elf = cc.find_library('elf') endif diff --git a/subprojects/libelf.wrap b/subprojects/libelf.wrap new file mode 100644 index 00000000000..ea69baba9be --- /dev/null +++ b/subprojects/libelf.wrap @@ -0,0 +1,6 @@ +[wrap-git] +directory = libelf-lfg-win32-1.0.0-freebsd-12.1.0 + +url = https://github.com/LagFreeGames/libelf-lfg-win32.git +revision = 1.0.0 +depth = 1