CMake: Link to EGL::EGL target instead of library for GLES dependency
This ensures that the EGL::EGL dependency is promoted to global in the same scope as GLESv2::GLESv2 if it is a link dependency. Amends c4d3e5d7d31d4cd2bfec35ba8c86aeb7329288b7 Change-Id: Ia156676b40e6d04a5037a305db35192cad306a0c Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 52a3ab1eb23915b620948dceb577cf23c1b2391f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
767b1e529a
commit
1a4369d9ac
@ -80,7 +80,9 @@ if(GLESv2_FOUND AND NOT TARGET GLESv2::GLESv2)
|
||||
IMPORTED_LOCATION "${GLESv2_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GLESv2_INCLUDE_DIR}")
|
||||
|
||||
if(EGL_LIBRARY)
|
||||
if(TARGET EGL::EGL)
|
||||
target_link_libraries(GLESv2::GLESv2 INTERFACE "EGL::EGL")
|
||||
elseif(EGL_LIBRARY)
|
||||
target_link_libraries(GLESv2::GLESv2 INTERFACE "${EGL_LIBRARY}")
|
||||
endif()
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user