mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-01-23 07:11:12 +01:00
only enable metal on apple platforms by default
This commit is contained in:
parent
3cf831d46a
commit
3de2b0325b
@ -103,11 +103,20 @@ if (UNIX AND NOT APPLE)
|
|||||||
option(ENABLE_FERAL_GAMEMODE "Enables Feral Interactive GameMode Support" ON)
|
option(ENABLE_FERAL_GAMEMODE "Enables Feral Interactive GameMode Support" ON)
|
||||||
endif()
|
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_OPENGL "Enables the OpenGL backend" ON)
|
||||||
option(ENABLE_VULKAN "Enables the Vulkan backend" ON)
|
option(ENABLE_VULKAN "Enables the Vulkan backend" ON)
|
||||||
option(ENABLE_METAL "Enables the Metal backend" ON)
|
option(ENABLE_METAL "Enables the Metal backend" $ENABLE_METAL_DEFAULT)
|
||||||
option(ENABLE_DISCORD_RPC "Enables the Discord Rich Presence feature" ON)
|
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
|
# input backends
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
|
@ -534,52 +534,48 @@ if(APPLE)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_METAL)
|
if(ENABLE_METAL)
|
||||||
if(APPLE)
|
target_sources(CemuCafe PRIVATE
|
||||||
target_sources(CemuCafe PRIVATE
|
HW/Latte/Renderer/Metal/MetalRenderer.cpp
|
||||||
HW/Latte/Renderer/Metal/MetalRenderer.cpp
|
HW/Latte/Renderer/Metal/MetalRenderer.h
|
||||||
HW/Latte/Renderer/Metal/MetalRenderer.h
|
HW/Latte/Renderer/Metal/MetalCommon.h
|
||||||
HW/Latte/Renderer/Metal/MetalCommon.h
|
HW/Latte/Renderer/Metal/MetalCppImpl.cpp
|
||||||
HW/Latte/Renderer/Metal/MetalCppImpl.cpp
|
HW/Latte/Renderer/Metal/MetalLayer.mm
|
||||||
HW/Latte/Renderer/Metal/MetalLayer.mm
|
HW/Latte/Renderer/Metal/MetalLayer.h
|
||||||
HW/Latte/Renderer/Metal/MetalLayer.h
|
HW/Latte/Renderer/Metal/MetalLayerHandle.cpp
|
||||||
HW/Latte/Renderer/Metal/MetalLayerHandle.cpp
|
HW/Latte/Renderer/Metal/MetalLayerHandle.h
|
||||||
HW/Latte/Renderer/Metal/MetalLayerHandle.h
|
HW/Latte/Renderer/Metal/LatteToMtl.cpp
|
||||||
HW/Latte/Renderer/Metal/LatteToMtl.cpp
|
HW/Latte/Renderer/Metal/LatteToMtl.h
|
||||||
HW/Latte/Renderer/Metal/LatteToMtl.h
|
HW/Latte/Renderer/Metal/LatteTextureMtl.cpp
|
||||||
HW/Latte/Renderer/Metal/LatteTextureMtl.cpp
|
HW/Latte/Renderer/Metal/LatteTextureMtl.h
|
||||||
HW/Latte/Renderer/Metal/LatteTextureMtl.h
|
HW/Latte/Renderer/Metal/LatteTextureViewMtl.cpp
|
||||||
HW/Latte/Renderer/Metal/LatteTextureViewMtl.cpp
|
HW/Latte/Renderer/Metal/LatteTextureViewMtl.h
|
||||||
HW/Latte/Renderer/Metal/LatteTextureViewMtl.h
|
HW/Latte/Renderer/Metal/LatteTextureReadbackMtl.cpp
|
||||||
HW/Latte/Renderer/Metal/LatteTextureReadbackMtl.cpp
|
HW/Latte/Renderer/Metal/LatteTextureReadbackMtl.h
|
||||||
HW/Latte/Renderer/Metal/LatteTextureReadbackMtl.h
|
HW/Latte/Renderer/Metal/RendererShaderMtl.cpp
|
||||||
HW/Latte/Renderer/Metal/RendererShaderMtl.cpp
|
HW/Latte/Renderer/Metal/RendererShaderMtl.h
|
||||||
HW/Latte/Renderer/Metal/RendererShaderMtl.h
|
HW/Latte/Renderer/Metal/CachedFBOMtl.cpp
|
||||||
HW/Latte/Renderer/Metal/CachedFBOMtl.cpp
|
HW/Latte/Renderer/Metal/CachedFBOMtl.h
|
||||||
HW/Latte/Renderer/Metal/CachedFBOMtl.h
|
HW/Latte/Renderer/Metal/MetalBufferAllocator.h
|
||||||
HW/Latte/Renderer/Metal/MetalBufferAllocator.h
|
HW/Latte/Renderer/Metal/MetalMemoryManager.cpp
|
||||||
HW/Latte/Renderer/Metal/MetalMemoryManager.cpp
|
HW/Latte/Renderer/Metal/MetalMemoryManager.h
|
||||||
HW/Latte/Renderer/Metal/MetalMemoryManager.h
|
HW/Latte/Renderer/Metal/MetalPipelineCache.cpp
|
||||||
HW/Latte/Renderer/Metal/MetalPipelineCache.cpp
|
HW/Latte/Renderer/Metal/MetalPipelineCache.h
|
||||||
HW/Latte/Renderer/Metal/MetalPipelineCache.h
|
HW/Latte/Renderer/Metal/MetalDepthStencilCache.cpp
|
||||||
HW/Latte/Renderer/Metal/MetalDepthStencilCache.cpp
|
HW/Latte/Renderer/Metal/MetalDepthStencilCache.h
|
||||||
HW/Latte/Renderer/Metal/MetalDepthStencilCache.h
|
HW/Latte/Renderer/Metal/MetalSamplerCache.cpp
|
||||||
HW/Latte/Renderer/Metal/MetalSamplerCache.cpp
|
HW/Latte/Renderer/Metal/MetalSamplerCache.h
|
||||||
HW/Latte/Renderer/Metal/MetalSamplerCache.h
|
HW/Latte/Renderer/Metal/MetalHybridComputePipeline.cpp
|
||||||
HW/Latte/Renderer/Metal/MetalHybridComputePipeline.cpp
|
HW/Latte/Renderer/Metal/MetalHybridComputePipeline.h
|
||||||
HW/Latte/Renderer/Metal/MetalHybridComputePipeline.h
|
HW/Latte/Renderer/Metal/MetalQuery.cpp
|
||||||
HW/Latte/Renderer/Metal/MetalQuery.cpp
|
HW/Latte/Renderer/Metal/MetalQuery.h
|
||||||
HW/Latte/Renderer/Metal/MetalQuery.h
|
HW/Latte/Renderer/Metal/MetalPerformanceMonitor.h
|
||||||
HW/Latte/Renderer/Metal/MetalPerformanceMonitor.h
|
HW/Latte/Renderer/Metal/UtilityShaderSource.h
|
||||||
HW/Latte/Renderer/Metal/UtilityShaderSource.h
|
)
|
||||||
)
|
|
||||||
|
|
||||||
#target_link_libraries(CemuCafe PRIVATE
|
#target_link_libraries(CemuCafe PRIVATE
|
||||||
# "-framework Metal"
|
# "-framework Metal"
|
||||||
# "-framework QuartzCore"
|
# "-framework QuartzCore"
|
||||||
#)
|
#)
|
||||||
else()
|
|
||||||
message(FATAL_ERROR "Metal is only supported on macOS")
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_property(TARGET CemuCafe PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
set_property(TARGET CemuCafe PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user