Merge pull request #7395 from mazes-80/11374
Cmake option to enable/disable vulkan video backend
This commit is contained in:
commit
271676a7c8
|
@ -35,6 +35,7 @@ option(ENABLE_ALSA "Enables ALSA sound backend" ON)
|
|||
option(ENABLE_PULSEAUDIO "Enables PulseAudio sound backend" ON)
|
||||
option(ENABLE_LLVM "Enables LLVM support, for disassembly" ON)
|
||||
option(ENABLE_TESTS "Enables building the unit tests" ON)
|
||||
option(ENABLE_VULKAN "Enables vulkan video backend" ON)
|
||||
option(USE_DISCORD_PRESENCE "Enables Discord Rich Presence, show the current game on Discord" ON)
|
||||
|
||||
# Maintainers: if you consider blanket disabling this for your users, please
|
||||
|
@ -543,6 +544,7 @@ if (_M_X86)
|
|||
add_subdirectory(Externals/Bochs_disasm)
|
||||
endif()
|
||||
add_subdirectory(Externals/cpp-optparse)
|
||||
|
||||
find_package(fmt 6.0)
|
||||
if(fmt_FOUND)
|
||||
message(STATUS "Using shared fmt ${fmt_VERSION}")
|
||||
|
@ -551,8 +553,12 @@ else()
|
|||
message(STATUS "Using static fmt from Externals")
|
||||
add_subdirectory(Externals/fmt EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
add_subdirectory(Externals/glslang)
|
||||
add_subdirectory(Externals/imgui)
|
||||
add_subdirectory(Externals/glslang)
|
||||
|
||||
if(ENABLE_VULKAN)
|
||||
add_definitions(-DUSE_VULKAN)
|
||||
endif()
|
||||
|
||||
find_package(pugixml)
|
||||
if(NOT pugixml_FOUND)
|
||||
|
|
|
@ -563,7 +563,6 @@ PUBLIC
|
|||
videonull
|
||||
videoogl
|
||||
videosoftware
|
||||
videovulkan
|
||||
|
||||
PRIVATE
|
||||
fmt::fmt
|
||||
|
@ -601,6 +600,10 @@ if(LIBUSB_FOUND)
|
|||
)
|
||||
endif()
|
||||
|
||||
if(ENABLE_VULKAN)
|
||||
target_link_libraries(core PUBLIC videovulkan)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
target_sources(core PRIVATE
|
||||
HW/EXI/BBA/TAP_Win32.cpp
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
add_subdirectory(OGL)
|
||||
add_subdirectory(Null)
|
||||
add_subdirectory(Software)
|
||||
add_subdirectory(Vulkan)
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
add_subdirectory(D3DCommon)
|
||||
|
@ -9,3 +8,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
|||
add_subdirectory(D3D12)
|
||||
endif()
|
||||
|
||||
if(ENABLE_VULKAN)
|
||||
add_subdirectory(Vulkan)
|
||||
endif()
|
||||
|
|
|
@ -225,7 +225,9 @@ const std::vector<std::unique_ptr<VideoBackendBase>>& VideoBackendBase::GetAvail
|
|||
backends.push_back(std::make_unique<DX11::VideoBackend>());
|
||||
backends.push_back(std::make_unique<DX12::VideoBackend>());
|
||||
#endif
|
||||
#ifdef USE_VULKAN
|
||||
backends.push_back(std::make_unique<Vulkan::VideoBackend>());
|
||||
#endif
|
||||
#ifdef HAS_OPENGL
|
||||
backends.push_back(std::make_unique<SW::VideoSoftware>());
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue