diff --git a/CMakeLists.txt b/CMakeLists.txt index ba59a9b0..67815a6e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,10 +18,8 @@ option(FLUENTUI_BUILD_STATIC_LIB "Build static library." OFF) find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core) find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core) -set(QT_SDK_DIR "${Qt${QT_VERSION_MAJOR}_DIR}") -cmake_path(GET QT_SDK_DIR PARENT_PATH QT_SDK_DIR) -cmake_path(GET QT_SDK_DIR PARENT_PATH QT_SDK_DIR) -cmake_path(GET QT_SDK_DIR PARENT_PATH QT_SDK_DIR) +set(QT_SDK_DIR "${Qt${QT_VERSION_MAJOR}_DIR}/../../..") +cmake_path(SET QT_SDK_DIR NORMALIZE ${QT_SDK_DIR}) #设置QML插件输出目录,可以通过外部设置,如果外部没有设置就默认到\qml\FluentUI目录下 set(FLUENTUI_QML_PLUGIN_DIRECTORY "" CACHE PATH "Path to FluentUI plugin")