From 6dd30948029f3fdcd29c9dc0583e8f91b860e19c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20A=2E=20Col=C3=B3n=20V=C3=A9lez?= Date: Wed, 24 Dec 2014 11:41:04 -0500 Subject: [PATCH] Fix the rare case in which EGL is not found. EGL sometimes is not found. Checklib 1st does . string(TOLOWER ${lib} lower_lib) pkg_search_module(${var} QUIET ${lower_lib}) . Therefore this part should be equivalent since we always compare lower. . This part seems to not find anything and then it does. . find_library(${var}_LIBRARIES ${lib}) . Here it also does not find anything since it tries to find libegl while the library is called libEGL therefore I changed the name to upper. to avoid _internal_message("-- ${lib} not found (miss lib)") . It could fail in the unlikely event that someone renamed libEGL to libegl. This bug is triggered when you combine crosscompiling from amd64 to i386 with Debian multiarch paths. For other distros it should work with pkg_search_module normally. --- cmake/SearchForStuff.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake index b16b52f1cd..8e2f147a1b 100644 --- a/cmake/SearchForStuff.cmake +++ b/cmake/SearchForStuff.cmake @@ -31,7 +31,7 @@ include(FindLibc) ## Use CheckLib package to find module include(CheckLib) check_lib(AIO aio aio.h) -check_lib(EGL egl EGL/egl.h) +check_lib(EGL EGL EGL/egl.h) check_lib(GLESV2 GLESv2 GLES3/gl3ext.h) # NOTE: looking for GLESv3, not GLESv2 check_lib(PORTAUDIO portaudio portaudio.h pa_linux_alsa.h) check_lib(SOUNDTOUCH SoundTouch soundtouch/SoundTouch.h)