[FFmpeg-devel] [PATCH] Makefile: only compile SPIR-V support if Vulkan is enabled

Lynne dev at lynne.ee
Thu Jan 16 10:18:28 EET 2025


---
 libavcodec/Makefile  | 2 ++
 libavfilter/Makefile | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index a3ef11a258..40971d2afd 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -1265,8 +1265,10 @@ OBJS-$(HAVE_THREADS)                   += pthread.o pthread_slice.o pthread_fram
 OBJS-$(CONFIG_FRAME_THREAD_ENCODER)    += frame_thread_encoder.o
 
 # vulkan libs
+ifdef CONFIG_VULKAN
 OBJS-$(CONFIG_LIBGLSLANG)              += vulkan_glslang.o
 OBJS-$(CONFIG_LIBSHADERC)              += vulkan_shaderc.o
+endif
 
 # Windows resource file
 SHLIBOBJS-$(HAVE_GNU_WINDRES)           += avcodecres.o
diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index 4d9681768b..f4c34d2de3 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -649,8 +649,10 @@ OBJS-$(CONFIG_AMOVIE_FILTER)                 += src_movie.o
 OBJS-$(CONFIG_MOVIE_FILTER)                  += src_movie.o
 
 # vulkan libs
+ifdef CONFIG_VULKAN
 OBJS-$(CONFIG_LIBGLSLANG)                    += vulkan_glslang.o
 OBJS-$(CONFIG_LIBSHADERC)                    += vulkan_shaderc.o
+endif
 
 # Objects duplicated from other libraries for shared builds
 SHLIBOBJS                                    += log2_tab.o
-- 
2.47.1


More information about the ffmpeg-devel mailing list