Commit d09aec1b authored by ghpzin's avatar ghpzin
Browse files

olive-editor: fix build with qt6-6.10

- add patch from merged upstream PR of `kddockwidgets` submodule:
https://www.github.com/KDAB/KDDockWidgets/pull/615
https://github.com/KDAB/KDDockWidgets/commit/f2b50fff29bd4b49acdfed3ed8fc42eb0a502032
(does not apply with `fetchpatch`)

Fixes build failure with qt6-6.10:
```
CMake Error at ext/KDDockWidgets/src/CMakeLists.txt:306 (target_link_libraries):
  Target "kddockwidgets" links to:

    Qt6::WidgetsPrivate

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.
```
parent 7ec92ade
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
diff --git a/ext/KDDockWidgets/CMakeLists.txt b/ext/KDDockWidgets/CMakeLists.txt
index 608a2491..d0edc399 100644
--- a/ext/KDDockWidgets/CMakeLists.txt
+++ b/ext/KDDockWidgets/CMakeLists.txt
@@ -160,8 +160,16 @@
 include(KDQtInstallPaths) #to set QT_INSTALL_FOO variables
 
 set(${PROJECT_NAME}_DEPS "widgets")
+if(Qt6Core_VERSION VERSION_GREATER_EQUAL "6.10.0")
+    set(QT_NO_PRIVATE_MODULE_WARNING ON)
+    find_package(Qt6 ${QT_MIN_VERSION} NO_MODULE REQUIRED COMPONENTS WidgetsPrivate)
+endif()
 if(${PROJECT_NAME}_QTQUICK)
     find_package(Qt${Qt_VERSION_MAJOR} NO_MODULE REQUIRED COMPONENTS Quick QuickControls2)
+    if(Qt6Core_VERSION VERSION_GREATER_EQUAL "6.10.0")
+        set(QT_NO_PRIVATE_MODULE_WARNING ON)
+        find_package(Qt6 ${QT_MIN_VERSION} NO_MODULE REQUIRED COMPONENTS QuickPrivate)
+    endif()
     add_definitions(-DKDDOCKWIDGETS_QTQUICK)
     set(${PROJECT_NAME}_DEPS "${${PROJECT_NAME}_DEPS} quick quickcontrols2")
 else()
+5 −0
Original line number Diff line number Diff line
@@ -57,6 +57,11 @@ stdenv.mkDerivation {
      url = "https://github.com/olive-editor/olive/commit/311eeb72944f93f873d1cd1784ee2bf423e1e7c2.patch";
      hash = "sha256-lswWn4DbXGH1qPvPla0jSgUJQXuqU7LQGHIPoXAE8ag=";
    })

    # Fix build of `kddockwidgets` with qt6-6.10, adapted from:
    # https://github.com/KDAB/KDDockWidgets/pull/615
    # https://github.com/KDAB/KDDockWidgets/commit/f2b50fff29bd4b49acdfed3ed8fc42eb0a502032
    ./olive-editor-kddockwidgets-fix-build-with-qt-6_10.patch
  ];

  # https://github.com/olive-editor/olive/issues/2200