aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Spencer <jon@jonspencer.ca>2019-02-26 11:08:53 -0800
committerPhil Christensen <philc@microsoft.com>2019-02-26 11:08:53 -0800
commitb6eec4ad64ca11112d364c3fab751bcd9dea1c1e (patch)
treea8e6037461d1f06fc7e25cac7169203fdee8fadd
parentd96b4628238e6df39e7c30985e0fa85844d667df (diff)
downloadvcpkg-b6eec4ad64ca11112d364c3fab751bcd9dea1c1e.tar.gz
vcpkg-b6eec4ad64ca11112d364c3fab751bcd9dea1c1e.zip
[sdl2] allow sdl2 vulkan support (#5374)
* [sdl2] allow sdl2 vulkan support * turn sdl2 vulkan support into a feature
-rw-r--r--ports/sdl2/CONTROL4
-rw-r--r--ports/sdl2/portfile.cmake7
2 files changed, 10 insertions, 1 deletions
diff --git a/ports/sdl2/CONTROL b/ports/sdl2/CONTROL
index 18e867b7c..05e9d6363 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 4bcfa5a9a..294d37449 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
)