[FFmpeg-devel] [PATCH] avutil/vulkan_glslang: windows build improvements
Lynne
dev at lynne.ee
Tue Jan 7 13:13:33 EET 2025
On 07/01/2025 14:46, Koushik Dutta wrote:
> Searches pkg-config for glslang libraries.
> Use libavutil thread.h wrapper rather than directly including pthread.h.
>
> Signed-off-by: Koushik Dutta <koushd at gmail.com>
> ---
> configure | 1 +
> libavutil/vulkan_glslang.c | 2 +-
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index b09e9d0436..9d7381de9c 100755
> --- a/configure
> +++ b/configure
> @@ -6931,6 +6931,7 @@ enabled libharfbuzz && require_pkg_config libharfbuzz harfbuzz hb.h hb_buf
> enabled libglslang && { check_lib spirv_compiler glslang/Include/glslang_c_interface.h glslang_initialize_process \
> -lglslang -lMachineIndependent -lGenericCodeGen \
> -lSPVRemapper -lSPIRV -lSPIRV-Tools-opt -lSPIRV-Tools -lpthread -lstdc++ -lm ||
> + check_pkg_config spirv_compiler glslang "glslang/Include/glslang_c_interface.h glslang/build_info.h" glslang_initialize_process ||
This shouldn't work because glslang is a c++ lib, check_pkg_config uses
the c compiler and linker, and no pkg config file for glslang I've ever
seen has worked well.
We used to have a pkg-config check with some hacks, but it kept breaking
on debian.
> require spirv_compiler glslang/Include/glslang_c_interface.h glslang_initialize_process \
> -lglslang -lMachineIndependent -lOSDependent -lHLSL -lOGLCompiler -lGenericCodeGen \
> -lSPVRemapper -lSPIRV -lSPIRV-Tools-opt -lSPIRV-Tools -lpthread -lstdc++ -lm ; }
> diff --git a/libavutil/vulkan_glslang.c b/libavutil/vulkan_glslang.c
> index d116b35ec5..9a985a930f 100644
> --- a/libavutil/vulkan_glslang.c
> +++ b/libavutil/vulkan_glslang.c
> @@ -16,7 +16,7 @@
> * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
> */
>
> -#include <pthread.h>
> +#include "thread.h"
This is fine.
>
> #include <glslang/build_info.h>
> #include <glslang/Include/glslang_c_interface.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0xA2FEA5F03F034464.asc
Type: application/pgp-keys
Size: 624 bytes
Desc: OpenPGP public key
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250107/7df88da4/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 236 bytes
Desc: OpenPGP digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250107/7df88da4/attachment.sig>
More information about the ffmpeg-devel
mailing list