Add CMake option to allow using system pugixml library

This commit is contained in:
Gleb Popov 2021-03-15 10:25:20 +03:00 committed by Laurent Trinques
parent ab5dd39556
commit 564f38396f

View File

@ -18,9 +18,16 @@ message(" - fetch_pugixml")
Include(FetchContent)
FetchContent_Declare(
pugixml
GIT_REPOSITORY https://github.com/zeux/pugixml.git
GIT_TAG v1.11.4)
option(BUILD_PUGIXML "Build pugixml library, use system one otherwise" YES)
FetchContent_MakeAvailable(pugixml)
if(BUILD_PUGIXML)
FetchContent_Declare(
pugixml
GIT_REPOSITORY https://github.com/zeux/pugixml.git
GIT_TAG v1.11.4)
FetchContent_MakeAvailable(pugixml)
else()
find_package(pugixml REQUIRED)
endif()