From d395e440883b4b4c764ccd7bae1cf1539d441661 Mon Sep 17 00:00:00 2001 From: Zan Dobersek Date: Fri, 24 Jan 2020 11:35:35 +0100 Subject: [PATCH] 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. --- cmake/FindEGL.cmake | 3 ++- cmake/FindLibxkbcommon.cmake | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/FindEGL.cmake b/cmake/FindEGL.cmake index 6733b30c..99a35528 100644 --- a/cmake/FindEGL.cmake +++ b/cmake/FindEGL.cmake @@ -50,7 +50,8 @@ mark_as_advanced(EGL_INCLUDE_DIR EGL_LIBRARY) if (EGL_LIBRARIES AND NOT TARGET GL::egl) add_library(GL::egl INTERFACE IMPORTED) if (TARGET PkgConfig::EGL) - target_link_libraries(GL::egl INTERFACE PkgConfig::EGL) + set_property(TARGET GL::egl PROPERTY + INTERFACE_LINK_LIBRARIES PkgConfig::EGL) else () set_property(TARGET GL::egl PROPERTY INTERFACE_LINK_LIBRARIES ${EGL_LIBRARY}) diff --git a/cmake/FindLibxkbcommon.cmake b/cmake/FindLibxkbcommon.cmake index c95d9b3c..a6afe7c4 100644 --- a/cmake/FindLibxkbcommon.cmake +++ b/cmake/FindLibxkbcommon.cmake @@ -48,7 +48,8 @@ find_library(LIBXKBCOMMON_LIBRARY if (LIBXKBCOMMON_LIBRARY AND NOT TARGET XkbCommon::libxkbcommon) add_library(XkbCommon::libxkbcommon INTERFACE IMPORTED) if (TARGET PkgConfig::LIBXKBCOMMON) - target_link_libraries(XkbCommon::libxkbcommon INTERFACE PkgConfig::LIBXKBCOMMON) + set_property(TARGET XkbCommon::libxkbcommon PROPERTY + INTERFACE_LINK_LIBRARIES PkgConfig::LIBXKBCOMMON) else () set_property(TARGET XkbCommon::libxkbcommon PROPERTY INTERFACE_LINK_LIBRARIES ${LIBXKBCOMMON_LIBRARY})