3rdparty: Add option to build against system pugixml

Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
This commit is contained in:
Emmanuel Gil Peyrot 2021-05-17 17:03:43 +02:00 committed by Megamouse
parent 8f271861f5
commit 8ed42410bf

View File

@ -38,7 +38,13 @@ add_subdirectory(libpng EXCLUDE_FROM_ALL)
# pugixml
if (USE_SYSTEM_PUGIXML)
pkg_check_modules(PUGIXML REQUIRED IMPORTED_TARGET pugixml>=1.11)
add_library(pugixml INTERFACE)
target_link_libraries(pugixml INTERFACE PkgConfig::PUGIXML)
else()
add_subdirectory(pugixml EXCLUDE_FROM_ALL)
endif()
# libusb