diff --git a/ports/sdl2/CONTROL b/ports/sdl2/CONTROL index 18e867b7c6..05e9d6363d 100644 --- a/ports/sdl2/CONTROL +++ b/ports/sdl2/CONTROL @@ -1,3 +1,7 @@ Source: sdl2 Version: 2.0.9-1 Description: Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. + +Feature: vulkan +Description: Vulkan functionality for SDL +Build-Depends: vulkan diff --git a/ports/sdl2/portfile.cmake b/ports/sdl2/portfile.cmake index 4bcfa5a9af..294d374496 100644 --- a/ports/sdl2/portfile.cmake +++ b/ports/sdl2/portfile.cmake @@ -16,13 +16,18 @@ string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SDL_STATIC) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SDL_SHARED) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" FORCE_STATIC_VCRT) +set(VULKAN_VIDEO OFF) +if("vulkan" IN_LIST FEATURES) + set(VULKAN_VIDEO ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DSDL_STATIC=${SDL_STATIC} -DSDL_SHARED=${SDL_SHARED} - -DVIDEO_VULKAN=OFF + -DVIDEO_VULKAN=${VULKAN_VIDEO} -DFORCE_STATIC_VCRT=${FORCE_STATIC_VCRT} -DLIBC=ON )