Skip to content
Snippets Groups Projects
Unverified Commit 08b34331 authored by Arseny Kapoulkine's avatar Arseny Kapoulkine Committed by GitHub
Browse files

Merge pull request #394 from zeux/cmake-yay

Don't define pugixml import target if it already exists
parents 0e3f1699 06868c8f
No related branches found
Tags v1.8.1
No related merge requests found
......@@ -5,7 +5,7 @@ include("${CMAKE_CURRENT_LIST_DIR}/pugixml-targets.cmake")
# If the user is not requiring 1.11 (either by explicitly requesting an older
# version or not requesting one at all), provide the old imported target name
# for compatibility.
if (NOT DEFINED PACKAGE_FIND_VERSION OR PACKAGE_FIND_VERSION VERSION_LESS "1.11")
if (NOT TARGET pugixml AND (NOT DEFINED PACKAGE_FIND_VERSION OR PACKAGE_FIND_VERSION VERSION_LESS "1.11"))
add_library(pugixml INTERFACE IMPORTED)
# Equivalent to target_link_libraries INTERFACE, but compatible with CMake 3.10
set_target_properties(pugixml PROPERTIES INTERFACE_LINK_LIBRARIES pugixml::pugixml)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment