summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorJulien Schueller <schueller@phimeca.com>2020-09-11 19:28:42 +0200
committerJulien Schueller <schueller@phimeca.com>2020-09-16 14:48:46 +0200
commitcf33d6452852d8bbac23fe6b578b289ecee80d16 (patch)
tree574f7ba793e78ef8634a9c798f1684117ec89621 /cmake
parenta54988c822de918933af62c3d39212f223bfb2c4 (diff)
CMake: Fix FindGLESv2
Avoids a linking error when the library is not found as find_library sets GLESv2_LIBRARY to GLESv2-NOTFOUND Change-Id: I7ddc15483276e0be0c78b67b760c4d9188758270 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindGLESv2.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmake/FindGLESv2.cmake b/cmake/FindGLESv2.cmake
index 8e2bc6959f..56298c7773 100644
--- a/cmake/FindGLESv2.cmake
+++ b/cmake/FindGLESv2.cmake
@@ -9,7 +9,9 @@ else()
find_path(GLESv2_INCLUDE_DIR NAMES "GLES2/gl2.h" "OpenGLES/ES2/gl.h" DOC "The OpenGLES 2 include path")
find_package(EGL)
set(_libraries "${CMAKE_REQUIRED_LIBRARIES}")
- list(APPEND CMAKE_REQUIRED_LIBRARIES "${GLESv2_LIBRARY}")
+ if(GLESv2_LIBRARY)
+ list(APPEND CMAKE_REQUIRED_LIBRARIES "${GLESv2_LIBRARY}")
+ endif ()
if(EGL_LIBRARY)
list(APPEND CMAKE_REQUIRED_LIBRARIES "${EGL_LIBRARY}")
endif()