From 997977c67a13dd0766f80a9f54631057538a6997 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Fri, 9 Jul 2021 09:19:05 +0100 Subject: [PATCH] Make the KDocTools dependency optional I am cross-compiling dolphin and haven't build KDocTools. Since it's only needed for the handbook we can make the dependency optional. --- CMakeLists.txt | 2 +- doc/CMakeLists.txt | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a949ab2e66..2667c26dc5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,7 +52,6 @@ find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS ) find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS - DocTools KCMUtils NewStuff CoreAddons @@ -83,6 +82,7 @@ endif() find_package(KF5 ${KF5_MIN_VERSION} OPTIONAL_COMPONENTS Activities + DocTools ) set_package_properties(KF5Activities PROPERTIES DESCRIPTION "KActivities libraries" URL "https://www.kde.org" diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 5d8e54edb7..934f7a9ff4 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -1,2 +1,4 @@ -kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en SUBDIR dolphin) +if (KF5DocTools_FOUND) + kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en SUBDIR dolphin) +endif()