mirror of
https://github.com/zeux/pugixml.git
synced 2024-12-27 13:33:17 +08:00
cmake: provide a compatibility target for users
For users using older pugixml releases, add an ALIAS target which works with the new versions too.
This commit is contained in:
parent
7a9da11d8b
commit
5063e87499
@ -1,3 +1,10 @@
|
|||||||
@PACKAGE_INIT@
|
@PACKAGE_INIT@
|
||||||
|
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/pugixml-targets.cmake")
|
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")
|
||||||
|
add_library(pugixml ALIAS pugixml::pugixml)
|
||||||
|
endif ()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user