mirror of https://gitee.com/cxasm/notepad--.git
qt5/6: 增加兼容性构建检查方案,如果文件中存在 true 将认为可兼容构建
This commit is contained in:
parent
bb5af11a50
commit
5414380422
|
@ -110,3 +110,13 @@ endif()
|
|||
|
||||
# ----------------- Notepad-- 其它主线构建相关 ----------------- #
|
||||
|
||||
if(USE_QT6)
|
||||
# Qt5/Qt6 兼容性构建检查文件检查
|
||||
include(cmake/platforms/utils.cmake)
|
||||
qt5_qt6_compatible_check(cmake/qt5_qt6_compatible_check QT56_PASS)
|
||||
if(NOT QT56_PASS)
|
||||
message(SEND_ERROR "[${QT56_PASS}] Qt5/Qt6 兼容性检查文件当前未能检查通过,不建议构建 Qt6。")
|
||||
else()
|
||||
message(NOTICE "[${QT56_PASS}] Qt5/Qt6 兼容性检查文件当前检查通过。")
|
||||
endif(NOT QT56_PASS)
|
||||
endif(USE_QT6)
|
||||
|
|
|
@ -38,3 +38,17 @@ endfunction(get_current_platform_lib_name _VAR _IS_SHREAD _LIB)
|
|||
# 在 MacOS 中
|
||||
# 用于编译的静态库与动态库后缀分别是:.a 与 .dylib
|
||||
# 文件名称由 lib 开头
|
||||
|
||||
# qt5_qt6_compatible_check <file> <var>
|
||||
# Qt5/6 兼容性构建检查方案,如果文件中存在 true 将认为可兼容构建
|
||||
# _CHECK_FILE Qt5/Qt6 兼容性检查文件
|
||||
# _VAR 检查结果
|
||||
function(qt5_qt6_compatible_check _CHECK_FILE _VAR)
|
||||
set(${_VAR} true PARENT_SCOPE)
|
||||
file(READ ${_CHECK_FILE} file_content)
|
||||
string(FIND ${file_content} "true" _index)
|
||||
if(_index LESS 0)
|
||||
# -1: It is not checked and passed
|
||||
set(${_VAR} false PARENT_SCOPE)
|
||||
endif(_index LESS 0)
|
||||
endfunction(qt5_qt6_compatible_check _CHECK_FILE _VAR)
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
true
|
Loading…
Reference in New Issue