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 Pick-to: 6.8 Change-Id: Ia156676b40e6d04a5037a305db35192cad306a0c Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This commit is contained in:
parent
8c0fb7e07d
commit
52a3ab1eb2
@ -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