We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0e3f169 + 06868c8 commit 08b3433Copy full SHA for 08b3433
scripts/pugixml-config.cmake.in
@@ -5,7 +5,7 @@ include("${CMAKE_CURRENT_LIST_DIR}/pugixml-targets.cmake")
5
# If the user is not requiring 1.11 (either by explicitly requesting an older
6
# version or not requesting one at all), provide the old imported target name
7
# for compatibility.
8
-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"))
9
add_library(pugixml INTERFACE IMPORTED)
10
# Equivalent to target_link_libraries INTERFACE, but compatible with CMake 3.10
11
set_target_properties(pugixml PROPERTIES INTERFACE_LINK_LIBRARIES pugixml::pugixml)
0 commit comments