[build] CMake: Fix GRAPHICS check (#4359)
This commit is contained in:
parent
0ef0791854
commit
cded378205
@ -100,9 +100,10 @@ elseif ("${PLATFORM}" MATCHES "SDL")
|
|||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (NOT ${OPENGL_VERSION} MATCHES "OFF")
|
if (NOT ${OPENGL_VERSION} MATCHES "OFF")
|
||||||
set(${SUGGESTED_GRAPHICS} "${GRAPHICS}")
|
set(SUGGESTED_GRAPHICS "${GRAPHICS}")
|
||||||
|
|
||||||
if (${OPENGL_VERSION} MATCHES "4.3")
|
if (${OPENGL_VERSION} MATCHES "4.3")
|
||||||
set(GRAPHICS "GRAPHICS_API_OPENGL_43")
|
set(GRAPHICS "GRAPHICS_API_OPENGL_43")
|
||||||
elseif (${OPENGL_VERSION} MATCHES "3.3")
|
elseif (${OPENGL_VERSION} MATCHES "3.3")
|
||||||
set(GRAPHICS "GRAPHICS_API_OPENGL_33")
|
set(GRAPHICS "GRAPHICS_API_OPENGL_33")
|
||||||
elseif (${OPENGL_VERSION} MATCHES "2.1")
|
elseif (${OPENGL_VERSION} MATCHES "2.1")
|
||||||
@ -114,8 +115,8 @@ if (NOT ${OPENGL_VERSION} MATCHES "OFF")
|
|||||||
elseif (${OPENGL_VERSION} MATCHES "ES 3.0")
|
elseif (${OPENGL_VERSION} MATCHES "ES 3.0")
|
||||||
set(GRAPHICS "GRAPHICS_API_OPENGL_ES3")
|
set(GRAPHICS "GRAPHICS_API_OPENGL_ES3")
|
||||||
endif ()
|
endif ()
|
||||||
if ("${SUGGESTED_GRAPHICS}" AND NOT "${SUGGESTED_GRAPHICS}" STREQUAL "${GRAPHICS}")
|
if (NOT "${SUGGESTED_GRAPHICS}" STREQUAL "" AND NOT "${SUGGESTED_GRAPHICS}" STREQUAL "${GRAPHICS}")
|
||||||
message(WARNING "You are overriding the suggested GRAPHICS=${SUGGESTED_GRAPHICS} with ${GRAPHICS}! This may fail")
|
message(WARNING "You are overriding the suggested GRAPHICS=${SUGGESTED_GRAPHICS} with ${GRAPHICS}! This may fail.")
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user