mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 06:42:08 +00:00
Allows building gzdoom with Vulkan with either X11 or Wayland WSI integration through CMake options
This commit is contained in:
parent
de770faeb1
commit
06f13006ca
2 changed files with 15 additions and 0 deletions
|
@ -1,6 +1,17 @@
|
|||
cmake_minimum_required(VERSION 3.15)
|
||||
project(zvulkan)
|
||||
|
||||
option( VULKAN_USE_XLIB "Use Vulkan xlib (X11) WSI integration" ON )
|
||||
option( VULKAN_USE_WAYLAND "Use Vulkan Wayland WSI integration" OFF )
|
||||
|
||||
if ( VULKAN_USE_XLIB )
|
||||
add_definitions( -DVULKAN_USE_XLIB=1 )
|
||||
else()
|
||||
if (VULKAN_USE_WAYLAND)
|
||||
add_definitions( -DVULKAN_USE_WAYLAND=1 )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(ZVULKAN_SOURCES
|
||||
src/vulkanbuilders.cpp
|
||||
src/vulkandevice.cpp
|
||||
|
|
|
@ -5,7 +5,11 @@
|
|||
#define VK_USE_PLATFORM_MACOS_MVK
|
||||
#define VK_USE_PLATFORM_METAL_EXT
|
||||
#else
|
||||
#if defined(VULKAN_USE_XLIB)
|
||||
#define VK_USE_PLATFORM_XLIB_KHR
|
||||
#elif defined(VULKAN_USE_WAYLAND)
|
||||
#define VK_USE_PLATFORM_WAYLAND_KHR
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* This file is part of volk library; see volk.h for version/license details */
|
||||
|
|
Loading…
Reference in a new issue