cmake: don't check LIBRW_GL3_GFXLIB when platform is not GL3

This commit is contained in:
Anonymous Maarten 2024-08-16 14:50:20 +02:00
parent a565c5bb80
commit d53e325b72
1 changed files with 9 additions and 7 deletions

View File

@ -38,6 +38,7 @@ if(NOT LIBRW_PLATFORM IN_LIST LIBRW_PLATFORMS)
message(FATAL_ERROR "Illegal LIBRW_PLATFORM=${LIBRW_PLATFORM}") message(FATAL_ERROR "Illegal LIBRW_PLATFORM=${LIBRW_PLATFORM}")
endif() endif()
if(LIBRW_PLATFORM_GL3)
set(LIBRW_GL3_GFXLIBS "GLFW" "SDL2") set(LIBRW_GL3_GFXLIBS "GLFW" "SDL2")
set(LIBRW_GL3_GFXLIB "GLFW" CACHE STRING "gfxlib for gl3 (choices=${LIBRW_GL3_GFXLIBS})") set(LIBRW_GL3_GFXLIB "GLFW" CACHE STRING "gfxlib for gl3 (choices=${LIBRW_GL3_GFXLIBS})")
set_property(CACHE LIBRW_GL3_GFXLIB PROPERTY STRINGS ${LIBRW_GL3_GFXLIBS}) set_property(CACHE LIBRW_GL3_GFXLIB PROPERTY STRINGS ${LIBRW_GL3_GFXLIBS})
@ -47,6 +48,7 @@ endif()
if(NOT LIBRW_GL3_GFXLIB IN_LIST LIBRW_GL3_GFXLIBS) if(NOT LIBRW_GL3_GFXLIB IN_LIST LIBRW_GL3_GFXLIBS)
message(FATAL_ERROR "Illegal LIBRW_GL3_GFXLIB=${LIBRW_GL3_GFXLIB}") message(FATAL_ERROR "Illegal LIBRW_GL3_GFXLIB=${LIBRW_GL3_GFXLIB}")
endif() endif()
endif()
if(LIBRW_PLATFORM_PS2) if(LIBRW_PLATFORM_PS2)
enable_language(DSM) enable_language(DSM)