Commit 6cfe9ec0 authored by K900's avatar K900
Browse files

kdePackages.extra-cmake-modules: don't pull in qdoc

parent 4a11705e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -6,6 +6,10 @@
mkKdeDerivation {
  pname = "extra-cmake-modules";

  # Don't depend on qdoc (leaks everywhere, causes random cross issues), we don't install the docs anyway
  # Upstream PR: https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/534
  patches = [ ./no-qdoc.patch ];

  outputs = [ "out" ];

  propagatedNativeBuildInputs = [
+20 −0
Original line number Diff line number Diff line
diff --git a/modules/ECMGenerateQDoc.cmake b/modules/ECMGenerateQDoc.cmake
index b6d64783314de790a5444c3c0d125b8e455883d9..68c570506fdc118ddef6249bce78051569298b4c 100644
--- a/modules/ECMGenerateQDoc.cmake
+++ b/modules/ECMGenerateQDoc.cmake
@@ -55,8 +55,13 @@ add_custom_target(generate_qch)
 add_custom_target(install_qch_docs)
 
 function(ecm_generate_qdoc target qdocconf_file)
-    find_package(Qt6Tools CONFIG REQUIRED)
-    find_package(Qt6 COMPONENTS ToolsTools CONFIG REQUIRED)
+    find_package(Qt6Tools CONFIG QUIET)
+    find_package(Qt6 OPTIONAL_COMPONENTS ToolsTools CONFIG QUIET)
+
+    if (NOT Qt6Tools_FOUND OR NOT Qt6ToolsTools_FOUND)
+        message(STATUS "Qt6Tools or Qt6ToolsTools not found, not generating API documentation")
+        return()
+    endif()
 
     if (NOT TARGET ${target})
         message(FATAL_ERROR "${target} is not a target")