Skip to content

Commit

Permalink
修正cmake的编译错误
Browse files Browse the repository at this point in the history
  • Loading branch information
czyt1988 committed Oct 27, 2023
1 parent 1f2436d commit 4192970
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/SARibbonBar/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ if(UNIX AND NOT APPLE)
endif()

# frameless core 相关路径设置
# 显示定义FRAMELESSHELPER_FEATURE_static_build为-1
add_definitions(-DFRAMELESSHELPER_FEATURE_static_build=-1)

SET(FRAMELESS_HEADER_BASE ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/framelesshelper/include)
SET(FRAMELESS_HEADER_DIR ${FRAMELESS_HEADER_BASE}/FramelessHelper)
Expand Down
3 changes: 2 additions & 1 deletion src/example/MainWindowExample/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ SET(VERSION_SHORT 0.1)
project(MainWindowExample VERSION ${VERSION_SHORT})
set(SARIBBON_EXPAMPLE_NAME MainWindowExample)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

# 显示定义FRAMELESSHELPER_FEATURE_static_build为-1 否则库引用会失败
add_definitions(-DFRAMELESSHELPER_FEATURE_static_build=-1)
# qt库加载,最低要求5.8
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} 5.8 COMPONENTS Core Gui Widgets REQUIRED)
Expand Down

0 comments on commit 4192970

Please sign in to comment.