mirror of
https://github.com/aap/librw.git
synced 2025-12-20 01:19:51 +00:00
Add Nintendo Switch support through CMake
This commit is contained in:
@@ -148,13 +148,16 @@ set_target_properties(librw
|
||||
)
|
||||
|
||||
if(LIBRW_PLATFORM_GL3)
|
||||
set(OpenGL_GL_PREFERENCE GLVND)
|
||||
find_package(OpenGL REQUIRED)
|
||||
if(NOT NINTENDO_SWITCH)
|
||||
set(OpenGL_GL_PREFERENCE GLVND)
|
||||
find_package(OpenGL REQUIRED)
|
||||
|
||||
target_link_libraries(librw
|
||||
PUBLIC
|
||||
OpenGL::GL
|
||||
)
|
||||
endif()
|
||||
|
||||
target_link_libraries(librw
|
||||
PUBLIC
|
||||
OpenGL::GL
|
||||
)
|
||||
if (LIBRW_GL3_GFXLIB STREQUAL "GLFW")
|
||||
find_package(glfw3 REQUIRED)
|
||||
target_link_libraries(librw
|
||||
@@ -175,6 +178,15 @@ if(LIBRW_PLATFORM_GL3)
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NINTENDO_SWITCH)
|
||||
target_link_libraries(librw
|
||||
PUBLIC
|
||||
EGL
|
||||
glapi
|
||||
drm_nouveau
|
||||
)
|
||||
endif()
|
||||
elseif(LIBRW_PLATFORM_D3D9)
|
||||
target_link_libraries(librw
|
||||
PUBLIC
|
||||
|
||||
Reference in New Issue
Block a user