Skip to content

Commit

Permalink
Fix compatibility issue with CMake 3.10
Browse files Browse the repository at this point in the history
target_link_libraries/INTERFACE doesn't seem to work on CMake 3.10, but
directly setting the property does work.

Fixes #390.
  • Loading branch information
zeux committed Dec 18, 2020
1 parent 9079552 commit e2bc4f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/pugixml-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()

0 comments on commit e2bc4f4

Please sign in to comment.