diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2022-09-22 12:59:13 +0200 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2022-09-22 12:59:13 +0200 |
commit | 7bcc8dca27041e2b03855508fe54d435d816a78f (patch) | |
tree | 758eafd13d8dd66a621aa67cf130c5d13c0b9ca1 /CMakeLists.txt | |
parent | a76d2d296bf563ee21581769b9c8206c82619970 (diff) | |
download | libxslt-7bcc8dca27041e2b03855508fe54d435d816a78f.tar.gz |
cmake: Fix build with libxslt and libxml2 as subprojects
Fixes https://gitlab.gnome.org/GNOME/libxml2/-/issues/416
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 3 insertions, 1 deletions
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) |