From 03df7307bbccbd714f5516116a11632af6af54b2 Mon Sep 17 00:00:00 2001 From: Adrian Graber Date: Thu, 17 Jun 2021 15:57:52 +0200 Subject: [PATCH] Add find_library checks for Switch libraries Makes sure that required Switch libraries are present before proceeding --- src/CMakeLists.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 68c906a..7c63e1d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -180,11 +180,15 @@ if(LIBRW_PLATFORM_GL3) endif() if(NINTENDO_SWITCH) + find_library(SWITCH_EGL_LIBRARY EGL) + find_library(SWITCH_GLAPI_LIBRARY glapi) + find_library(SWITCH_DRM_NOUVEAU_LIBRARY drm_nouveau) + target_link_libraries(librw PUBLIC - EGL - glapi - drm_nouveau + ${SWITCH_EGL_LIBRARY} + ${SWITCH_GLAPI_LIBRARY} + ${SWITCH_DRM_NOUVEAU_LIBRARY} ) endif() elseif(LIBRW_PLATFORM_D3D9)