mirror of
https://github.com/aap/librw.git
synced 2025-12-20 01:19:51 +00:00
cmake: nx toolchain has FindOpenGL module
This commit is contained in:
@@ -149,16 +149,6 @@ set_target_properties(librw
|
||||
)
|
||||
|
||||
if(LIBRW_PLATFORM_GL3)
|
||||
if(LIBRW_PLATFORM_GL3_REQUIRES_OPENGL)
|
||||
set(OpenGL_GL_PREFERENCE GLVND)
|
||||
find_package(OpenGL REQUIRED)
|
||||
|
||||
target_link_libraries(librw
|
||||
PRIVATE
|
||||
OpenGL::GL
|
||||
)
|
||||
endif()
|
||||
|
||||
if (LIBRW_GL3_GFXLIB STREQUAL "GLFW")
|
||||
find_package(glfw3 REQUIRED)
|
||||
target_link_libraries(librw
|
||||
@@ -174,12 +164,25 @@ if(LIBRW_PLATFORM_GL3)
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NINTENDO_SWITCH)
|
||||
find_package(NXGL REQUIRED)
|
||||
set(OpenGL_GL_PREFERENCE GLVND)
|
||||
find_package(OpenGL)
|
||||
if(TARGET OpenGL::OpenGL)
|
||||
target_link_libraries(librw
|
||||
PRIVATE
|
||||
NXGL::OpenGL
|
||||
OpenGL::OpenGL
|
||||
)
|
||||
elseif(TARGET OpenGL::EGL)
|
||||
target_link_libraries(librw
|
||||
PRIVATE
|
||||
OpenGL::EGL
|
||||
)
|
||||
elseif(TARGET OpenGL::GL)
|
||||
target_link_libraries(librw
|
||||
PRIVATE
|
||||
OpenGL::GL
|
||||
)
|
||||
else()
|
||||
message(FATAL_ERROR "find_package(OpenGL) failed.")
|
||||
endif()
|
||||
elseif(LIBRW_PLATFORM_D3D9)
|
||||
target_link_libraries(librw
|
||||
|
||||
Reference in New Issue
Block a user