Skip to content

Commit

Permalink
修正cmake引入qwk的一些错误,修改文档
Browse files Browse the repository at this point in the history
  • Loading branch information
czyt1988 committed Feb 22, 2024
1 parent 76cc02c commit 064c15c
Show file tree
Hide file tree
Showing 20 changed files with 10,418 additions and 78 deletions.
27 changes: 12 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,25 +113,22 @@ endif()
##################################

if(SARIBBON_USE_FRAMELESS_LIB)
if(NOT DEFINED QWindowKit_DIR)
# 没有定义QWindowKit_DIR,先尝试能否find_package
if(NOT QWindowKit_DIR)
message(STATUS "option SARIBBON_USE_FRAMELESS_LIB=ON,but QWindowKit_DIR not defined,will set QWindowKit_DIR=${SARIBBON_BIN_DIR}/lib/cmake/QWindowKit")
set(__qwk_dir ${SARIBBON_BIN_DIR}/lib/cmake/QWindowKit)
if(EXISTS ${__qwk_dir})
set(QWindowKit_DIR ${__qwk_dir})
else()
message(WARNING "SARIBBON_USE_FRAMELESS_LIB=ON,but not defined QWindowKit_DIR path")
endif()
# 再次尝试加载QWindowKit
find_package(QWindowKit QUIET)
if(NOT QWindowKit_FOUND)
message(WARNING "option SARIBBON_USE_FRAMELESS_LIB=ON,but QWindowKit_DIR not defined,will set QWindowKit_DIR=${SARIBBON_BIN_DIR}/cmake/QWindowKit")
set(__qwk_dir ${SARIBBON_BIN_DIR}/lib/cmake/QWindowKit)
if(EXISTS ${__qwk_dir})
set(QWindowKit_DIR ${__qwk_dir})
else()
message(WARNING "SARIBBON_USE_FRAMELESS_LIB=ON,but not defined QWindowKit_DIR path")
endif()
# 再次尝试加载QWindowKit
find_package(QWindowKit QUIET)
if(NOT QWindowKit_FOUND)
set(SARIBBON_USE_FRAMELESS_LIB OFF)
message(WARNING "can not find package QWindowKit at ${__qwk_dir},set SARIBBON_USE_FRAMELESS_LIB=OFF")
endif()
set(SARIBBON_USE_FRAMELESS_LIB OFF)
message(WARNING "can not find package QWindowKit at ${__qwk_dir},set SARIBBON_USE_FRAMELESS_LIB=OFF")
endif()
else()
message(STATUS "QWindowKit_DIR=${QWindowKit_DIR}")
find_package(QWindowKit QUIET)
if(NOT QWindowKit_FOUND)
set(SARIBBON_USE_FRAMELESS_LIB OFF)
Expand Down
2 changes: 1 addition & 1 deletion changlog.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
7.`setTabBarBaseLineColor`控制tabbar下基线颜色,某些主题需要设置颜色(窗口标题栏和category区域颜色一样的情况下如office 2013主题)可通过此函数设置,传入`QColor()`取消颜色
- 添加了`SARibbonBar::initHighDpi()`静态函数,方便开启高分屏设置
- 【注意】frameless库更换为qwindowkit(https://github.com/stdware/qwindowkit),qwindowkit源码不作为项目一部分,使用`git submodule`管理,因此,项目clone下来后,需要执行`git submodule update --init --recursive`
- 【注意】如果开启`SARIBBON_USE_FRAMELESS_LIB`默认开启),需要先构建`qwindowkit`,目前`qwindowkit`不提供qmake,只提供cmake,编译完`qwindowkit`后,SARibbon支持qmake和cmake
- 【注意】如果开启`SARIBBON_USE_FRAMELESS_LIB`默认不开启),需要先构建`qwindowkit`,目前`qwindowkit`不提供qmake,只提供cmake,编译完`qwindowkit`后,SARibbon支持qmake和cmake
- `SARibbonMainWindow`支持非ribbon模式
-`SAWindowButtonGroup`改名为`SARibbonSystemButtonGroupBar`,同时支持添加action

Expand Down
1 change: 1 addition & 0 deletions doc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
html/
Loading

0 comments on commit 064c15c

Please sign in to comment.