CMake: use definitions when testing EGL

Use any definition from pkgconfig for the EGL compilation test.

Change-Id: I95c659b87ab7b0de81f000e3f52195161a493ef5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Samuli Piippo 2020-08-24 11:10:17 +03:00
parent fcc25b11bb
commit 3a4153766e
1 changed files with 1 additions and 0 deletions

View File

@ -118,6 +118,7 @@ endif()
cmake_push_check_state(RESET)
list(APPEND CMAKE_REQUIRED_LIBRARIES "${EGL_LIBRARY}")
list(APPEND CMAKE_REQUIRED_INCLUDES "${EGL_INCLUDE_DIR}")
list(APPEND CMAKE_REQUIRED_DEFINITIONS "${EGL_DEFINITIONS}")
check_cxx_source_compiles("
#include <EGL/egl.h>