From eebb5d4af59e7834bd1e12f8302d0d99aabdc9d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 12 May 2015 21:47:43 +0200 Subject: [PATCH] modules: link EGL along with SDL if targetting non-desktop ES. --- modules/FindMagnum.cmake | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/FindMagnum.cmake b/modules/FindMagnum.cmake index fc91d54c5..ecd5af2db 100644 --- a/modules/FindMagnum.cmake +++ b/modules/FindMagnum.cmake @@ -389,6 +389,16 @@ foreach(component ${Magnum_FIND_COMPONENTS}) unset(MAGNUM_${_COMPONENT}_LIBRARY) endif() + # Find also EGL library, if on ES + if(MAGNUM_TARGET_GLES AND NOT MAGNUM_TARGET_DESKTOP_GLES) + find_package(EGL) + if(EGL_FOUND) + list(APPEND _MAGNUM_${_COMPONENT}_LIBRARIES ${EGL_LIBRARY}) + else() + unset(MAGNUM_${_COMPONENT}_LIBRARY) + endif() + endif() + # (Windowless) NaCl application dependencies elseif(${component} STREQUAL NaClApplication OR ${component} STREQUAL WindowlessNaClApplication) set(_MAGNUM_${_COMPONENT}_LIBRARIES ppapi_cpp ppapi)