[FFmpeg-devel] [PATCH] avutil/vulkan_glslang: windows build improvements

Koushik Dutta koushd at gmail.com
Tue Jan 7 07:46:29 EET 2025


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 ||
                         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"
 
 #include <glslang/build_info.h>
 #include <glslang/Include/glslang_c_interface.h>
-- 
2.39.5 (Apple Git-154)



More information about the ffmpeg-devel mailing list