[sdl2] allow sdl2 vulkan support (#5374)

* [sdl2] allow sdl2 vulkan support

* turn sdl2 vulkan support into a feature
This commit is contained in:
Jon Spencer 2019-02-26 11:08:53 -08:00 committed by Phil Christensen
parent d96b462823
commit b6eec4ad64
2 changed files with 10 additions and 1 deletions

View File

@ -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

View File

@ -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
)