diff --git a/CMakeLists.txt b/CMakeLists.txt index 13bd674..e88bcfe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,6 +51,11 @@ include_directories(src/appdata) include_directories(src/settings) include_directories(src/uiconfig) +# 用于Qt Creator识别自定义qml模块的导入路径 +list(APPEND QML_MODULE_DIRS "${PROJECT_SOURCE_DIR}/qml") +set(QML_IMPORT_PATH "${QML_MODULE_DIRS}" CACHE STRING "Qt Creator extra qml import paths." FORCE) +message(STATUS "QML_IMPORT_PATH: ${QML_IMPORT_PATH}") + # 基础设置 set(UKUI_MENU_DATA_DIR "/usr/share/ukui-menu") set(UKUI_MENU_TRANSLATION_DIR "${UKUI_MENU_DATA_DIR}/translations")