mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-12-12 01:36:58 +00:00
Add Metal backend (#1287)
This commit is contained in:
parent
5520613dc3
commit
26e40a4bce
108 changed files with 14986 additions and 453 deletions
|
|
@ -102,10 +102,20 @@ if (UNIX AND NOT APPLE)
|
|||
option(ENABLE_BLUEZ "Build with Bluez support" ON)
|
||||
endif()
|
||||
|
||||
if (APPLE)
|
||||
set(ENABLE_METAL_DEFAULT ON)
|
||||
else()
|
||||
set(ENABLE_METAL_DEFAULT OFF)
|
||||
endif()
|
||||
|
||||
option(ENABLE_OPENGL "Enables the OpenGL backend" ON)
|
||||
option(ENABLE_VULKAN "Enables the Vulkan backend" ON)
|
||||
option(ENABLE_METAL "Enables the Metal backend" ${ENABLE_METAL_DEFAULT})
|
||||
option(ENABLE_DISCORD_RPC "Enables the Discord Rich Presence feature" ON)
|
||||
|
||||
if (ENABLE_METAL AND NOT APPLE)
|
||||
message(FATAL_ERROR "Metal backend is only supported on Apple platforms")
|
||||
endif()
|
||||
|
||||
# input backends
|
||||
if (WIN32)
|
||||
|
|
@ -180,6 +190,12 @@ if (ENABLE_OPENGL)
|
|||
find_package(OpenGL REQUIRED)
|
||||
endif()
|
||||
|
||||
if (ENABLE_METAL)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/dependencies/metal-cpp)
|
||||
|
||||
add_definitions(-DENABLE_METAL=1)
|
||||
endif()
|
||||
|
||||
if (ENABLE_DISCORD_RPC)
|
||||
add_compile_definitions(ENABLE_DISCORD_RPC)
|
||||
endif()
|
||||
|
|
@ -204,7 +220,7 @@ endif()
|
|||
|
||||
if (ENABLE_CUBEB)
|
||||
if (NOT ENABLE_VCPKG)
|
||||
find_package(cubeb)
|
||||
find_package(cubeb)
|
||||
endif()
|
||||
if (NOT cubeb_FOUND)
|
||||
option(BUILD_TESTS "" OFF)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue