-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
800 additions
and
788 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,49 @@ | ||
cmake_minimum_required(VERSION 3.5) | ||
SET(VERSION_SHORT 0.1) | ||
project(MainWindowExample VERSION ${VERSION_SHORT}) | ||
set(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
set(CMAKE_AUTOMOC ON) | ||
set(CMAKE_AUTORCC ON) | ||
# 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) | ||
add_executable(MainWindowExample WIN32 | ||
mainwindow.h | ||
mainwindow.cpp | ||
main.cpp | ||
saribbonresouce.qrc | ||
) | ||
|
||
if(NOT TARGET SARibbonBar) | ||
# 说明这个例子是单独加载 | ||
message(STATUS "NOT TARGET SARibbonBar find_package(SARibbonBar REQUIRED)") | ||
find_package(SARibbonBar REQUIRED) | ||
endif() | ||
target_link_libraries(MainWindowExample PUBLIC SARibbonBar::SARibbonBar) | ||
target_link_libraries(MainWindowExample PUBLIC | ||
Qt${QT_VERSION_MAJOR}::Core | ||
Qt${QT_VERSION_MAJOR}::Gui | ||
Qt${QT_VERSION_MAJOR}::Widgets) | ||
|
||
set_target_properties(MainWindowExample PROPERTIES | ||
AUTOMOC ON | ||
AUTORCC ON | ||
AUTOUIC ON | ||
CXX_EXTENSIONS OFF | ||
DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX} | ||
VERSION ${SARIBBON_VERSION} | ||
EXPORT_NAME MainWindowExample | ||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" | ||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" | ||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" | ||
) | ||
|
||
install(TARGETS MainWindowExample | ||
RUNTIME DESTINATION bin | ||
LIBRARY DESTINATION bin | ||
ARCHIVE DESTINATION lib | ||
) | ||
cmake_minimum_required(VERSION 3.5) | ||
SET(VERSION_SHORT 0.1) | ||
project(MainWindowExample VERSION ${VERSION_SHORT}) | ||
set(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
set(CMAKE_AUTOMOC ON) | ||
set(CMAKE_AUTORCC ON) | ||
# 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) | ||
add_executable(MainWindowExample | ||
mainwindow.h | ||
mainwindow.cpp | ||
main.cpp | ||
saribbonresouce.qrc | ||
) | ||
if(WIN32) | ||
set_target_properties(MainWindowExample PROPERTIES | ||
WIN32_EXECUTABLE TRUE | ||
) | ||
endif() | ||
if(NOT TARGET SARibbonBar) | ||
# 说明这个例子是单独加载 | ||
message(STATUS "NOT TARGET SARibbonBar find_package(SARibbonBar REQUIRED)") | ||
find_package(SARibbonBar REQUIRED) | ||
endif() | ||
target_link_libraries(MainWindowExample PUBLIC SARibbonBar::SARibbonBar) | ||
target_link_libraries(MainWindowExample PUBLIC | ||
Qt${QT_VERSION_MAJOR}::Core | ||
Qt${QT_VERSION_MAJOR}::Gui | ||
Qt${QT_VERSION_MAJOR}::Widgets) | ||
|
||
set_target_properties(MainWindowExample PROPERTIES | ||
AUTOMOC ON | ||
AUTORCC ON | ||
AUTOUIC ON | ||
CXX_EXTENSIONS OFF | ||
DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX} | ||
VERSION ${SARIBBON_VERSION} | ||
EXPORT_NAME MainWindowExample | ||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" | ||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" | ||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" | ||
) | ||
|
||
install(TARGETS MainWindowExample | ||
RUNTIME DESTINATION bin | ||
LIBRARY DESTINATION bin | ||
ARCHIVE DESTINATION lib | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,53 @@ | ||
cmake_minimum_required(VERSION 3.5) | ||
SET(VERSION_SHORT 0.1) | ||
project(MdiAreaWindowExample VERSION ${VERSION_SHORT}) | ||
set(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
# 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) | ||
file(GLOB HEADER_FILES "${CMAKE_CURRENT_LIST_DIR}/*.h") | ||
file(GLOB SOURCE_FILES "${CMAKE_CURRENT_LIST_DIR}/*.cpp") | ||
file(GLOB UI_FILES "${CMAKE_CURRENT_LIST_DIR}/*.ui") | ||
file(GLOB RESOURCE_FILES "${CMAKE_CURRENT_LIST_DIR}/*.qrc") | ||
add_executable(MdiAreaWindowExample WIN32 | ||
${HEADER_FILES} | ||
${SOURCE_FILES} | ||
${UI_FILES} | ||
${RESOURCE_FILES} | ||
) | ||
|
||
if(NOT TARGET SARibbonBar) | ||
# 说明这个例子是单独加载 | ||
message(STATUS "NOT TARGET SARibbonBar find_package(SARibbonBar REQUIRED)") | ||
find_package(SARibbonBar REQUIRED) | ||
endif() | ||
|
||
target_link_libraries(MdiAreaWindowExample PUBLIC SARibbonBar::SARibbonBar) | ||
target_link_libraries(MdiAreaWindowExample PUBLIC | ||
Qt${QT_VERSION_MAJOR}::Core | ||
Qt${QT_VERSION_MAJOR}::Gui | ||
Qt${QT_VERSION_MAJOR}::Widgets) | ||
|
||
set_target_properties(MdiAreaWindowExample PROPERTIES | ||
AUTOMOC ON | ||
AUTORCC ON | ||
AUTOUIC ON | ||
CXX_EXTENSIONS OFF | ||
DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX} | ||
VERSION ${SARIBBON_VERSION} | ||
EXPORT_NAME MdiAreaWindowExample | ||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" | ||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" | ||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" | ||
) | ||
|
||
install(TARGETS MdiAreaWindowExample | ||
RUNTIME DESTINATION bin | ||
LIBRARY DESTINATION bin | ||
ARCHIVE DESTINATION lib | ||
) | ||
|
||
cmake_minimum_required(VERSION 3.5) | ||
SET(VERSION_SHORT 0.1) | ||
project(MdiAreaWindowExample VERSION ${VERSION_SHORT}) | ||
set(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
# 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) | ||
file(GLOB HEADER_FILES "${CMAKE_CURRENT_LIST_DIR}/*.h") | ||
file(GLOB SOURCE_FILES "${CMAKE_CURRENT_LIST_DIR}/*.cpp") | ||
file(GLOB UI_FILES "${CMAKE_CURRENT_LIST_DIR}/*.ui") | ||
file(GLOB RESOURCE_FILES "${CMAKE_CURRENT_LIST_DIR}/*.qrc") | ||
add_executable(MdiAreaWindowExample | ||
${HEADER_FILES} | ||
${SOURCE_FILES} | ||
${UI_FILES} | ||
${RESOURCE_FILES} | ||
) | ||
if(WIN32) | ||
set_target_properties(MdiAreaWindowExample PROPERTIES | ||
WIN32_EXECUTABLE TRUE | ||
) | ||
endif() | ||
if(NOT TARGET SARibbonBar) | ||
# 说明这个例子是单独加载 | ||
message(STATUS "NOT TARGET SARibbonBar find_package(SARibbonBar REQUIRED)") | ||
find_package(SARibbonBar REQUIRED) | ||
endif() | ||
|
||
target_link_libraries(MdiAreaWindowExample PUBLIC SARibbonBar::SARibbonBar) | ||
target_link_libraries(MdiAreaWindowExample PUBLIC | ||
Qt${QT_VERSION_MAJOR}::Core | ||
Qt${QT_VERSION_MAJOR}::Gui | ||
Qt${QT_VERSION_MAJOR}::Widgets) | ||
|
||
set_target_properties(MdiAreaWindowExample PROPERTIES | ||
AUTOMOC ON | ||
AUTORCC ON | ||
AUTOUIC ON | ||
CXX_EXTENSIONS OFF | ||
DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX} | ||
VERSION ${SARIBBON_VERSION} | ||
EXPORT_NAME MdiAreaWindowExample | ||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" | ||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" | ||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" | ||
) | ||
|
||
install(TARGETS MdiAreaWindowExample | ||
RUNTIME DESTINATION bin | ||
LIBRARY DESTINATION bin | ||
ARCHIVE DESTINATION lib | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,52 @@ | ||
cmake_minimum_required(VERSION 3.5) | ||
SET(VERSION_SHORT 0.1) | ||
project(NormalMenuBarExample VERSION ${VERSION_SHORT}) | ||
set(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
|
||
# qt库加载,最低要求5.9 | ||
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED) | ||
find_package(Qt${QT_VERSION_MAJOR} 5.9 COMPONENTS Core Gui Widgets REQUIRED) | ||
|
||
# linux下会报 | ||
set(CMAKE_AUTOUIC_SEARCH_PATHS ${CMAKE_CURRENT_LIST_DIR}) | ||
add_executable(NormalMenuBarExample WIN32 | ||
MainWindow.h | ||
MainWindow.cpp | ||
MainWindow.ui | ||
main.cpp | ||
) | ||
|
||
if(NOT TARGET SARibbonBar) | ||
# 说明这个例子是单独加载 | ||
message(STATUS "NOT TARGET SARibbonBar find_package(SARibbonBar REQUIRED)") | ||
find_package(SARibbonBar REQUIRED) | ||
endif() | ||
|
||
target_link_libraries(NormalMenuBarExample PUBLIC SARibbonBar::SARibbonBar) | ||
target_link_libraries(NormalMenuBarExample PUBLIC | ||
Qt${QT_VERSION_MAJOR}::Core | ||
Qt${QT_VERSION_MAJOR}::Gui | ||
Qt${QT_VERSION_MAJOR}::Widgets) | ||
|
||
set_target_properties(NormalMenuBarExample PROPERTIES | ||
AUTOMOC ON | ||
AUTORCC ON | ||
AUTOUIC ON | ||
CXX_EXTENSIONS OFF | ||
DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX} | ||
VERSION ${SARIBBON_VERSION} | ||
EXPORT_NAME NormalMenuBarExample | ||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" | ||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" | ||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" | ||
) | ||
|
||
install(TARGETS NormalMenuBarExample | ||
RUNTIME DESTINATION bin | ||
LIBRARY DESTINATION bin | ||
ARCHIVE DESTINATION lib | ||
) | ||
|
||
|
||
cmake_minimum_required(VERSION 3.5) | ||
SET(VERSION_SHORT 0.1) | ||
project(NormalMenuBarExample VERSION ${VERSION_SHORT}) | ||
set(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
|
||
# qt库加载,最低要求5.9 | ||
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED) | ||
find_package(Qt${QT_VERSION_MAJOR} 5.9 COMPONENTS Core Gui Widgets REQUIRED) | ||
|
||
# linux下会报 | ||
set(CMAKE_AUTOUIC_SEARCH_PATHS ${CMAKE_CURRENT_LIST_DIR}) | ||
add_executable(NormalMenuBarExample | ||
MainWindow.h | ||
MainWindow.cpp | ||
MainWindow.ui | ||
main.cpp | ||
) | ||
if(WIN32) | ||
set_target_properties(NormalMenuBarExample PROPERTIES WIN32_EXECUTABLE TRUE) | ||
endif() | ||
if(NOT TARGET SARibbonBar) | ||
# 说明这个例子是单独加载 | ||
message(STATUS "NOT TARGET SARibbonBar find_package(SARibbonBar REQUIRED)") | ||
find_package(SARibbonBar REQUIRED) | ||
endif() | ||
|
||
target_link_libraries(NormalMenuBarExample PUBLIC SARibbonBar::SARibbonBar) | ||
target_link_libraries(NormalMenuBarExample PUBLIC | ||
Qt${QT_VERSION_MAJOR}::Core | ||
Qt${QT_VERSION_MAJOR}::Gui | ||
Qt${QT_VERSION_MAJOR}::Widgets) | ||
|
||
set_target_properties(NormalMenuBarExample PROPERTIES | ||
AUTOMOC ON | ||
AUTORCC ON | ||
AUTOUIC ON | ||
CXX_EXTENSIONS OFF | ||
DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX} | ||
VERSION ${SARIBBON_VERSION} | ||
EXPORT_NAME NormalMenuBarExample | ||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" | ||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" | ||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" | ||
) | ||
|
||
install(TARGETS NormalMenuBarExample | ||
RUNTIME DESTINATION bin | ||
LIBRARY DESTINATION bin | ||
ARCHIVE DESTINATION lib | ||
) | ||
|
||
|
Oops, something went wrong.