diff --git a/CMakeLists.txt b/CMakeLists.txt index d44034e4..db3957d9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,7 +32,9 @@ include(CheckSymbolExists) include(CMakePackageConfigHelpers) include(GNUInstallDirs) -find_package(LibXml2 CONFIG REQUIRED) +if(NOT TARGET LibXml2) + find_package(LibXml2 CONFIG REQUIRED) +endif() option(BUILD_SHARED_LIBS "Build shared libraries" ON) option(LIBXSLT_WITH_DEBUGGER "Add the debugging support" ON)