Skip to content

Commit 08b3433

Browse files
authored
Merge pull request #394 from zeux/cmake-yay
Don't define pugixml import target if it already exists
2 parents 0e3f169 + 06868c8 commit 08b3433

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: scripts/pugixml-config.cmake.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ include("${CMAKE_CURRENT_LIST_DIR}/pugixml-targets.cmake")
55
# If the user is not requiring 1.11 (either by explicitly requesting an older
66
# version or not requesting one at all), provide the old imported target name
77
# for compatibility.
8-
if (NOT DEFINED PACKAGE_FIND_VERSION OR PACKAGE_FIND_VERSION VERSION_LESS "1.11")
8+
if (NOT TARGET pugixml AND (NOT DEFINED PACKAGE_FIND_VERSION OR PACKAGE_FIND_VERSION VERSION_LESS "1.11"))
99
add_library(pugixml INTERFACE IMPORTED)
1010
# Equivalent to target_link_libraries INTERFACE, but compatible with CMake 3.10
1111
set_target_properties(pugixml PROPERTIES INTERFACE_LINK_LIBRARIES pugixml::pugixml)

0 commit comments

Comments
 (0)