File use-system-libs.patch of Package libSavitar

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5e991a7..e0b42f8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,9 +6,13 @@ include(CMakePackageConfigHelpers)
 
 option(BUILD_PYTHON "Build " ON)
 option(BUILD_STATIC "Build as a static library" OFF)
+option(USE_SYSTEM_LIBS "Use the system libraries if available" OFF)
 
-
-add_subdirectory(pugixml)
+if(USE_SYSTEM_LIBS)
+  find_package(pugixml CONFIG REQUIRED)
+else()
+  add_subdirectory(pugixml)
+endif()
 
 if(BUILD_PYTHON)
     set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
openSUSE Build Service is sponsored by