[vlc-devel] [PATCH 2/3] vukan: refactor Makefile.am for Vulkan plugins
Steve Lhomme
robux4 at ycbcr.xyz
Tue Apr 7 08:35:38 CEST 2020
Probably OK. I personally prefer it that way.
On 2020-04-06 19:01, Alexandre Janniaux wrote:
> Much like video_output/xcb, gather all Vulkan-related plugins
> compilation targets in the vulkan subfolder, but still use the
> vout_LTLIBRARIES variable to enable targets.
> ---
> modules/video_output/Makefile.am | 42 +------------------
> modules/video_output/vulkan/Makefile.am | 54 +++++++++++++++++++++++++
> modules/video_output/xcb/Makefile.am | 11 -----
> 3 files changed, 56 insertions(+), 51 deletions(-)
> create mode 100644 modules/video_output/vulkan/Makefile.am
>
> diff --git a/modules/video_output/Makefile.am b/modules/video_output/Makefile.am
> index a61d15f20f..c82e9a0ed7 100644
> --- a/modules/video_output/Makefile.am
> +++ b/modules/video_output/Makefile.am
> @@ -119,49 +119,11 @@ vout_LTLIBRARIES += libglinterop_vdpau_plugin.la
> endif
> endif # HAVE_GL
>
> -### Vulkan ###
> -
> -VULKAN_COMMONSOURCES = video_output/vulkan/instance.c \
> - video_output/vulkan/instance.h \
> - video_output/vulkan/platform.h \
> - video_output/placebo_utils.c \
> - video_output/placebo_utils.h
> -
> -# Trigger the c++ linker because of glslang dependency of libplacebo
> -VULKAN_COMMONSOURCES += dummy.cpp
> -
> -VULKAN_COMMONCFLAGS = $(VULKAN_CFLAGS) $(LIBPLACEBO_CFLAGS)
> -VULKAN_COMMONLIBS = $(VULKAN_LIBS) $(LIBPLACEBO_LIBS)
> -
> -libvk_plugin_la_SOURCES = $(VULKAN_COMMONSOURCES) video_output/vulkan/display.c
> -libvk_plugin_la_CFLAGS = $(AM_CFLAGS) $(VULKAN_COMMONCFLAGS)
> -libvk_plugin_la_LIBADD = $(VULKAN_COMMONLIBS)
> -
> -libvk_win32_plugin_la_SOURCES = $(VULKAN_COMMONSOURCES) video_output/vulkan/surface.c \
> - video_output/vulkan/platform_win32.c
> -libvk_win32_plugin_la_CFLAGS = $(AM_CFLAGS) $(VULKAN_COMMONCFLAGS) \
> - -DVK_USE_PLATFORM_WIN32_KHR -DPLATFORM_NAME=Win32
> -libvk_win32_plugin_la_LIBADD = $(VULKAN_COMMONLIBS)
> -
> -libvk_android_plugin_la_SOURCES = $(VULKAN_COMMONSOURCES) video_output/vulkan/surface.c \
> - video_output/vulkan/platform_android.c
> -libvk_android_plugin_la_CFLAGS = $(AM_CFLAGS) $(VULKAN_COMMONCFLAGS) \
> - -DVK_USE_PLATFORM_ANDROID_KHR -DPLATFORM_NAME=Android
> -libvk_android_plugin_la_LIBADD = $(VULKAN_COMMONLIBS)
> -
> -if HAVE_VULKAN
> -vout_LTLIBRARIES += libvk_plugin.la
> -if HAVE_WIN32_DESKTOP
> -vout_LTLIBRARIES += libvk_win32_plugin.la
> -endif
> -if HAVE_ANDROID
> -vout_LTLIBRARIES += libvk_android_plugin.la
> -endif
> -endif
> -
> ### X11 ###
> include video_output/xcb/Makefile.am
>
> +### Vulkan ###
> +include video_output/vulkan/Makefile.am
>
> ### Wayland ###
> include video_output/wayland/Makefile.am
> diff --git a/modules/video_output/vulkan/Makefile.am b/modules/video_output/vulkan/Makefile.am
> new file mode 100644
> index 0000000000..e769232575
> --- /dev/null
> +++ b/modules/video_output/vulkan/Makefile.am
> @@ -0,0 +1,54 @@
> +
> +### Vulkan ###
> +
> +VULKAN_COMMONSOURCES = video_output/vulkan/instance.c \
> + video_output/vulkan/instance.h \
> + video_output/vulkan/platform.h \
> + video_output/placebo_utils.c \
> + video_output/placebo_utils.h
> +
> +# Trigger the c++ linker because of glslang dependency of libplacebo
> +VULKAN_COMMONSOURCES += dummy.cpp
> +
> +VULKAN_COMMONCFLAGS = $(VULKAN_CFLAGS) $(LIBPLACEBO_CFLAGS)
> +VULKAN_COMMONLIBS = $(VULKAN_LIBS) $(LIBPLACEBO_LIBS)
> +
> +libvk_plugin_la_SOURCES = $(VULKAN_COMMONSOURCES) video_output/vulkan/display.c
> +libvk_plugin_la_CFLAGS = $(AM_CFLAGS) $(VULKAN_COMMONCFLAGS)
> +libvk_plugin_la_LIBADD = $(VULKAN_COMMONLIBS)
> +
> +libvk_win32_plugin_la_SOURCES = $(VULKAN_COMMONSOURCES) video_output/vulkan/surface.c \
> + video_output/vulkan/platform_win32.c
> +libvk_win32_plugin_la_CFLAGS = $(AM_CFLAGS) $(VULKAN_COMMONCFLAGS) \
> + -DVK_USE_PLATFORM_WIN32_KHR -DPLATFORM_NAME=Win32
> +libvk_win32_plugin_la_LIBADD = $(VULKAN_COMMONLIBS)
> +
> +libvk_android_plugin_la_SOURCES = $(VULKAN_COMMONSOURCES) video_output/vulkan/surface.c \
> + video_output/vulkan/platform_android.c
> +libvk_android_plugin_la_CFLAGS = $(AM_CFLAGS) $(VULKAN_COMMONCFLAGS) \
> + -DVK_USE_PLATFORM_ANDROID_KHR -DPLATFORM_NAME=Android
> +libvk_android_plugin_la_LIBADD = $(VULKAN_COMMONLIBS)
> +
> +libvk_x11_plugin_la_SOURCES = $(VULKAN_COMMONSOURCES) \
> + video_output/vulkan/surface.c \
> + video_output/vulkan/platform_xcb.c
> +libvk_x11_plugin_la_CFLAGS = $(AM_CFLAGS) \
> + $(XCB_CFLAGS) $(VULKAN_COMMONCFLAGS) \
> + -DVK_USE_PLATFORM_XCB_KHR -DPLATFORM_NAME=X11
> +libvk_x11_plugin_la_LIBADD = $(VULKAN_COMMONLIBS) $(XCB_LIBS)
> +
> +if HAVE_VULKAN
> +vout_LTLIBRARIES += libvk_plugin.la
> +
> +if HAVE_XCB
> +vout_LTLIBRARIES += libvk_x11_plugin.la
> +endif
> +
> +if HAVE_WIN32_DESKTOP
> +vout_LTLIBRARIES += libvk_win32_plugin.la
> +endif
> +
> +if HAVE_ANDROID
> +vout_LTLIBRARIES += libvk_android_plugin.la
> +endif
> +endif
> diff --git a/modules/video_output/xcb/Makefile.am b/modules/video_output/xcb/Makefile.am
> index f946e07ce7..52d0304ec5 100644
> --- a/modules/video_output/xcb/Makefile.am
> +++ b/modules/video_output/xcb/Makefile.am
> @@ -32,14 +32,6 @@ libxcb_window_plugin_la_CFLAGS = $(AM_CFLAGS) \
> libxcb_window_plugin_la_LIBADD = $(XPROTO_LIBS) $(XCB_LIBS) \
> $(XCB_XKB_LIBS) $(XKBCOMMON_X11_LIBS)
>
> -libvk_x11_plugin_la_SOURCES = $(VULKAN_COMMONSOURCES) \
> - video_output/vulkan/surface.c \
> - video_output/vulkan/platform_xcb.c
> -libvk_x11_plugin_la_CFLAGS = $(AM_CFLAGS) \
> - $(XCB_CFLAGS) $(VULKAN_COMMONCFLAGS) \
> - -DVK_USE_PLATFORM_XCB_KHR -DPLATFORM_NAME=X11
> -libvk_x11_plugin_la_LIBADD = $(VULKAN_COMMONLIBS) $(XCB_LIBS)
> -
> libegl_x11_plugin_la_SOURCES = video_output/opengl/egl.c
> libegl_x11_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DUSE_PLATFORM_X11=1
> libegl_x11_plugin_la_CFLAGS = $(AM_CFLAGS) $(EGL_CFLAGS)
> @@ -61,9 +53,6 @@ libxcb_window_plugin_la_SOURCES += \
> video_output/xcb/vlc_xkb.h video_output/xcb/xkb.c
> libxcb_window_plugin_la_CFLAGS += -DHAVE_XKBCOMMON
> endif
> -if HAVE_VULKAN
> -vout_LTLIBRARIES += libvk_x11_plugin.la
> -endif
> if HAVE_EGL
> vout_LTLIBRARIES += libegl_x11_plugin.la
> endif
> --
> 2.26.0
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
>
More information about the vlc-devel
mailing list