mirror of
https://github.com/GayPizzaSpecifications/padlab.git
synced 2025-08-03 21:21:33 +00:00
metal backend functional
This commit is contained in:
@ -2,14 +2,25 @@ cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
|
||||
project(padlab C)
|
||||
set(TARGET padlab)
|
||||
|
||||
option(USE_OPENGL "Use OpenGL for drawing (WIP)" OFF)
|
||||
if (USE_OPENGL)
|
||||
option(USE_METAL "use Metal for drawing" ${APPLE})
|
||||
if (USE_METAL)
|
||||
option(USE_OPENGL "Use OpenGL for drawing (WIP)" OFF)
|
||||
option(USE_OPENGL_LEGACY "Use legacy OpenGL for drawing" OFF)
|
||||
if (USE_OPENGL_LEGACY)
|
||||
message(FATAL_ERROR "USE_OPENGL and USE_OPENGL_LEGACY are both ON but only one backend can be used at a time, turn one OFF and regenerate. (or delete cache and try again)")
|
||||
if (USE_OPENGL)
|
||||
message(FATAL_ERROR "USE_METAL and USE_OPENGL are both ON but only one backend can be used at a time, turn one OFF and regenerate. (or delete cache and try again)")
|
||||
elseif (USE_OPENGL_LEGACY)
|
||||
message(FATAL_ERROR "USE_METAL and USE_OPENGL_LEGACY are both ON but only one backend can be used at a time, turn one OFF and regenerate. (or delete cache and try again)")
|
||||
endif()
|
||||
else()
|
||||
option(USE_OPENGL_LEGACY "Use legacy OpenGL for drawing" ON)
|
||||
option(USE_OPENGL "Use OpenGL for drawing (WIP)" OFF)
|
||||
if (USE_OPENGL)
|
||||
option(USE_OPENGL_LEGACY "Use legacy OpenGL for drawing" OFF)
|
||||
if (USE_OPENGL_LEGACY)
|
||||
message(FATAL_ERROR "USE_OPENGL and USE_OPENGL_LEGACY are both ON but only one backend can be used at a time, turn one OFF and regenerate. (or delete cache and try again)")
|
||||
endif()
|
||||
else()
|
||||
option(USE_OPENGL_LEGACY "Use legacy OpenGL for drawing" ON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||
|
Reference in New Issue
Block a user