34 lines
1.3 KiB
Diff
34 lines
1.3 KiB
Diff
From 408462531cdc45f8b9741d03beb1e25aeee7540e Mon Sep 17 00:00:00 2001
|
||
From: liuxinhao <liuxinhao@kylinsec.com.cn>
|
||
Date: Fri, 23 Aug 2024 10:16:55 +0800
|
||
Subject: [PATCH] fix(build): fix build error in qt5.9.2
|
||
MIME-Version: 1.0
|
||
Content-Type: text/plain; charset=UTF-8
|
||
Content-Transfer-Encoding: 8bit
|
||
|
||
- 修复Qt5.9.2下的编译错误
|
||
|
||
Closes #45382
|
||
---
|
||
style-helper/CMakeLists.txt | 4 ++++
|
||
1 file changed, 4 insertions(+)
|
||
|
||
diff --git a/style-helper/CMakeLists.txt b/style-helper/CMakeLists.txt
|
||
index 20b6a0b..2b67091 100644
|
||
--- a/style-helper/CMakeLists.txt
|
||
+++ b/style-helper/CMakeLists.txt
|
||
@@ -32,6 +32,10 @@ set(KIRANSTYLE_HELPER_QRC ${CMAKE_CURRENT_BINARY_DIR}/kiranstyle-helper.qrc)
|
||
configure_file(kiranstyle-helper.qrc.in ${KIRANSTYLE_HELPER_QRC})
|
||
# 手动添加resources,避免低版本Qt上AUTORCC未扫描到资源文件并关联上依赖关系
|
||
qt5_add_resources(KIRANSTYLE_HELPER_QRC_SOURCE ${KIRANSTYLE_HELPER_QRC})
|
||
+# qt5-qtbase-5.9.2下qt5_add_resources手动添加rcc,不会给qrc文件标记SKIP_AUTORCC
|
||
+if("${Qt5_VERSION_MAJOR}.${Qt5_VERSION_MINOR}.${Qt5_VERSION_PATCH}" STREQUAL "5.9.2")
|
||
+ set_source_files_properties(${KIRANSTYLE_HELPER_QRC} PROPERTIES SKIP_AUTORCC ON)
|
||
+endif()
|
||
|
||
file(GLOB_RECURSE SRC "src/*.cpp" "src/*.h" "src/*.ui")
|
||
file(GLOB_RECURSE INCLUDE "include/*.h")
|
||
--
|
||
2.27.0
|
||
|