CMakeLists: simplify code.

This commit is contained in:
Dylan Liu 2024-03-09 22:33:51 +08:00 committed by GitHub
parent 1d5f8772e1
commit 799df5c644
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core) find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core)
set(QT_SDK_DIR "${Qt${QT_VERSION_MAJOR}_DIR}") set(QT_SDK_DIR "${Qt${QT_VERSION_MAJOR}_DIR}/../../..")
cmake_path(GET QT_SDK_DIR PARENT_PATH QT_SDK_DIR) cmake_path(SET QT_SDK_DIR NORMALIZE ${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)
#QML<QT_SDK_DIR_PATH>\qml\FluentUI #QML<QT_SDK_DIR_PATH>\qml\FluentUI
set(FLUENTUI_QML_PLUGIN_DIRECTORY "" CACHE PATH "Path to FluentUI plugin") set(FLUENTUI_QML_PLUGIN_DIRECTORY "" CACHE PATH "Path to FluentUI plugin")