Skip to content

Commit e2bc4f4

Browse files
committed
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.
1 parent 9079552 commit e2bc4f4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/pugixml-config.cmake.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ include("${CMAKE_CURRENT_LIST_DIR}/pugixml-targets.cmake")
77
# for compatibility.
88
if (NOT DEFINED PACKAGE_FIND_VERSION OR PACKAGE_FIND_VERSION VERSION_LESS "1.11")
99
add_library(pugixml INTERFACE IMPORTED)
10-
target_link_libraries(pugixml INTERFACE pugixml::pugixml)
10+
# Equivalent to target_link_libraries INTERFACE, but compatible with CMake 3.10
11+
set_target_properties(pugixml PROPERTIES INTERFACE_LINK_LIBRARIES pugixml::pugixml)
1112
endif ()

0 commit comments

Comments
 (0)