From 799df5c6446766cc220d979541f4db5671ff540a Mon Sep 17 00:00:00 2001 From: Dylan Liu <312902918@qq.com> Date: Sat, 9 Mar 2024 22:33:51 +0800 Subject: [PATCH] CMakeLists: simplify code. --- CMakeLists.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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")