Skip to content

Commit d395e44

Browse files
committed
Use set_property() to specify imported target's link libraries, instead of
target_link_libraries() that falters with older CMake versions. Rubber-stamped by Adrian Perez de Castro.
1 parent 67ccb40 commit d395e44

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

cmake/FindEGL.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ mark_as_advanced(EGL_INCLUDE_DIR EGL_LIBRARY)
5050
if (EGL_LIBRARIES AND NOT TARGET GL::egl)
5151
add_library(GL::egl INTERFACE IMPORTED)
5252
if (TARGET PkgConfig::EGL)
53-
target_link_libraries(GL::egl INTERFACE PkgConfig::EGL)
53+
set_property(TARGET GL::egl PROPERTY
54+
INTERFACE_LINK_LIBRARIES PkgConfig::EGL)
5455
else ()
5556
set_property(TARGET GL::egl PROPERTY
5657
INTERFACE_LINK_LIBRARIES ${EGL_LIBRARY})

cmake/FindLibxkbcommon.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ find_library(LIBXKBCOMMON_LIBRARY
4848
if (LIBXKBCOMMON_LIBRARY AND NOT TARGET XkbCommon::libxkbcommon)
4949
add_library(XkbCommon::libxkbcommon INTERFACE IMPORTED)
5050
if (TARGET PkgConfig::LIBXKBCOMMON)
51-
target_link_libraries(XkbCommon::libxkbcommon INTERFACE PkgConfig::LIBXKBCOMMON)
51+
set_property(TARGET XkbCommon::libxkbcommon PROPERTY
52+
INTERFACE_LINK_LIBRARIES PkgConfig::LIBXKBCOMMON)
5253
else ()
5354
set_property(TARGET XkbCommon::libxkbcommon PROPERTY
5455
INTERFACE_LINK_LIBRARIES ${LIBXKBCOMMON_LIBRARY})

0 commit comments

Comments
 (0)