From e9254699a7b57b72cc1d705571fb55e0474838b3 Mon Sep 17 00:00:00 2001 From: James Park Date: Tue, 13 Apr 2021 00:43:13 -0700 Subject: [PATCH] meson: Add wrap for libelf on Windows Uses release from Lag Free Games GitHub, which applies Windows build fixes to FreeBSD libelf. The amd_common library uses libelf. Reviewed-by: Jesse Natalie Acked-by: Samuel Pitoiset Part-of: --- meson.build | 6 +++++- subprojects/libelf.wrap | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 subprojects/libelf.wrap 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