Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions buildscripts/cmake/ExtDepsManifest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ if (MUSE_MODULE_DRAW)
require_dep(harfbuzz)
endif()

if (MUSE_MODULE_DOCKWINDOW AND MUSE_MODULE_DOCKWINDOW_KDDOCKWIDGETS_V2)
require_source_dep(kddockwidgets)
endif()

if (OS_IS_WIN AND MUSE_MODULE_AUDIO)
require_source_dep(asiosdk)
endif()
Expand Down
21 changes: 19 additions & 2 deletions framework/dockwindow_v2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,28 @@ target_sources(muse_dockwindow PRIVATE
# Setup the KDDockWidgets lib
###########################################

kddockwidgets_add_to_build()
# TODO: use muse_deps
include(FetchContent)

set(kddockwidgets_src_dir ${FETCHCONTENT_BASE_DIR}/kddockwidgets)
FetchContent_Declare(kddockwidgets
GIT_REPOSITORY https://github.com/musescore/KDDockWidgets.git
GIT_TAG main
SOURCE_DIR ${kddockwidgets_src_dir}/kddockwidgets
)
Comment on lines +53 to +58

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Show KDDockWidgets source-dir property producers/consumers in dockwindow_v2.
rg -n -C2 'kddockwidgets_SOURCE_DIR|FetchContent_Declare\(kddockwidgets|FetchContent_MakeAvailable\(kddockwidgets' framework/dockwindow_v2

Repository: musescore/muse_framework

Length of output: 1456


Preserve the kddockwidgets_SOURCE_DIR global property for QML consumers.

framework/dockwindow_v2/qml/Muse/Dock/CMakeLists.txt relies on a global property to resolve the KDDockWidgets include path. Currently, FetchContent only sets this path in the local scope, causing the QML target to fail finding headers.

Proposed fix
 set(kddockwidgets_src_dir ${FETCHCONTENT_BASE_DIR}/kddockwidgets)
+set_property(GLOBAL PROPERTY kddockwidgets_SOURCE_DIR ${kddockwidgets_src_dir})
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
set(kddockwidgets_src_dir ${FETCHCONTENT_BASE_DIR}/kddockwidgets)
FetchContent_Declare(kddockwidgets
GIT_REPOSITORY https://github.com/musescore/KDDockWidgets.git
GIT_TAG main
SOURCE_DIR ${kddockwidgets_src_dir}/kddockwidgets
)
set(kddockwidgets_src_dir ${FETCHCONTENT_BASE_DIR}/kddockwidgets)
set_property(GLOBAL PROPERTY kddockwidgets_SOURCE_DIR ${kddockwidgets_src_dir})
FetchContent_Declare(kddockwidgets
GIT_REPOSITORY https://github.com/musescore/KDDockWidgets.git
GIT_TAG main
SOURCE_DIR ${kddockwidgets_src_dir}/kddockwidgets
)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@framework/dockwindow_v2/CMakeLists.txt` around lines 53 - 58, The
FetchContent setup for kddockwidgets only defines a local source directory, but
QML consumers need the global kddockwidgets_SOURCE_DIR property to stay
available. Update the kddockwidgets FetchContent declaration in CMakeLists.txt
so it preserves that global property (or otherwise sets it explicitly) and keep
the existing source dir reference consistent with what
framework/dockwindow_v2/qml/Muse/Dock/CMakeLists.txt expects when resolving
KDDockWidgets headers.


if (NOT BUILD_SHARED_LIBS)
set(KDDockWidgets_STATIC ON CACHE BOOL "Build static versions of the libraries" FORCE)
endif()
set(KDDockWidgets_QT6 ON CACHE BOOL "Build against Qt 6" FORCE)
set(KDDockWidgets_FRONTENDS "qtquick" CACHE STRING "Frontends to build" FORCE)
set(KDDockWidgets_EXAMPLES OFF CACHE BOOL "Build the examples" FORCE)
set(KDDockWidgets_TESTS OFF CACHE BOOL "Build the tests" FORCE)

FetchContent_MakeAvailable(kddockwidgets)

target_link_libraries(muse_dockwindow PRIVATE kddockwidgets)

get_property(kddockwidgets_src_dir GLOBAL PROPERTY kddockwidgets_SOURCE_DIR)
target_include_directories(muse_dockwindow SYSTEM PRIVATE
${kddockwidgets_src_dir}
${kddockwidgets_src_dir}/kddockwidgets/src
Expand Down