From 050c2e595f24c2a6efd8fcea8c4197a7af0bc674 Mon Sep 17 00:00:00 2001 From: zhuzichu Date: Tue, 22 Aug 2023 10:19:06 +0800 Subject: [PATCH] fix #254 --- CMakeLists.txt | 5 +---- example/CMakeLists.txt | 1 + src/CMakeLists.txt | 1 + 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 39c620a1..95ff6e09 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,10 +12,7 @@ option(FLUENTUI_BUILD_FRAMELESSHEPLER "Build FramelessHelper." ON) option(FLUENTUI_BUILD_STATIC_LIB "Build static library." OFF) find_package(Qt6 REQUIRED COMPONENTS Core Quick Qml) -#抑制 QTP0001 警告 -if(QT_KNOWN_POLICY_QTP0001) - qt_policy(SET QTP0001 NEW) -endif() + set(QT_SDK_DIR "${Qt6_DIR}") cmake_path(GET QT_SDK_DIR PARENT_PATH QT_SDK_DIR) cmake_path(GET QT_SDK_DIR PARENT_PATH QT_SDK_DIR) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 7fdc5b1c..ae24d128 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -108,6 +108,7 @@ qt_add_qml_module(example VERSION 1.0 QML_FILES ${qml_files} RESOURCES ${resource_files} + RESOURCE_PREFIX "/" ) #导入component头文件,不然通过QML_NAMED_ELEMENT生成的c++类会找不到头文件报错 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0bce0a9e..a5675514 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -81,6 +81,7 @@ qt_add_qml_module(${PROJECT_NAME} SOURCES ${sources_files} ${FLUENTUI_VERSION_RC_PATH} QML_FILES ${qml_files} RESOURCES ${resource_files} + RESOURCE_PREFIX "/" ) #链接库