From e2bc4f4af2bccc4ffa54f732b4fa642c8758a7fc Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Fri, 18 Dec 2020 09:07:44 -0800 Subject: [PATCH] Fix compatibility issue with CMake 3.10 target_link_libraries/INTERFACE doesn't seem to work on CMake 3.10, but directly setting the property does work. Fixes #390. --- scripts/pugixml-config.cmake.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/pugixml-config.cmake.in b/scripts/pugixml-config.cmake.in index 58be639..d9db814 100644 --- a/scripts/pugixml-config.cmake.in +++ b/scripts/pugixml-config.cmake.in @@ -7,5 +7,6 @@ include("${CMAKE_CURRENT_LIST_DIR}/pugixml-targets.cmake") # for compatibility. if (NOT DEFINED PACKAGE_FIND_VERSION OR PACKAGE_FIND_VERSION VERSION_LESS "1.11") add_library(pugixml INTERFACE IMPORTED) - target_link_libraries(pugixml INTERFACE pugixml::pugixml) + # Equivalent to target_link_libraries INTERFACE, but compatible with CMake 3.10 + set_target_properties(pugixml PROPERTIES INTERFACE_LINK_LIBRARIES pugixml::pugixml) endif ()