# CMakeLists.txt for QXlsx Library
cmake_minimum_required(VERSION 3.16)
project(QXlsx
VERSION 1.4.4
LANGUAGES CXX
)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
include(GNUInstallDirs)
if(NOT DEFINED QT_VERSION_MAJOR)
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Gui REQUIRED)
endif()
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Gui REQUIRED)
set(EXPORT_NAME QXlsxQt${QT_VERSION_MAJOR})
if (QT_VERSION_MAJOR EQUAL 6)
set(CMAKE_CXX_STANDARD 17 CACHE STRING "")
else()
set(CMAKE_CXX_STANDARD 11 CACHE STRING "")
endif()
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
if(NOT DEFINED QXLSX_PARENTPATH)
set(QXLSX_PARENTPATH ${CMAKE_CURRENT_SOURCE_DIR}/../)
endif()
if(NOT DEFINED QXLSX_HEADERPATH)
set(QXLSX_HEADERPATH ${CMAKE_CURRENT_SOURCE_DIR}/../QXlsx/header/)
endif()
if(NOT DEFINED QXLSX_SOURCEPATH)
set(QXLSX_SOURCEPATH ${CMAKE_CURRENT_SOURCE_DIR}/../QXlsx/source/)
endif()
# Due historical reasons this value is kept off
option(BUILD_SHARED_LIBS "Build in shared lib mode" OFF)
set(SRC_FILES
source/xlsxcellrange.cpp
source/xlsxcellrange.cpp
source/xlsxcontenttypes.cpp
source/xlsxdrawinganchor.cpp
source/xlsxrichstring.cpp
source/xlsxworkbook.cpp
source/xlsxabstractooxmlfile.cpp
source/xlsxcellreference.cpp
source/xlsxdatavalidation.cpp
source/xlsxdrawing.cpp
source/xlsxsharedstrings.cpp
source/xlsxworksheet.cpp
source/xlsxabstractsheet.cpp
source/xlsxchart.cpp
source/xlsxdatetype.cpp
source/xlsxformat.cpp
source/xlsxsimpleooxmlfile.cpp
source/xlsxzipreader.cpp
source/xlsxcell.cpp
source/xlsxchartsheet.cpp
source/xlsxdocpropsapp.cpp
source/xlsxmediafile.cpp
source/xlsxstyles.cpp
source/xlsxzipwriter.cpp
source/xlsxcellformula.cpp
source/xlsxcolor.cpp
source/xlsxdocpropscore.cpp
source/xlsxnumformatparser.cpp
source/xlsxtheme.cpp
source/xlsxcelllocation.cpp
source/xlsxconditionalformatting.cpp
source/xlsxdocument.cpp
source/xlsxrelationships.cpp
source/xlsxutility.cpp
header/xlsxabstractooxmlfile_p.h
header/xlsxchartsheet_p.h
header/xlsxdocpropsapp_p.h
header/xlsxformat_p.h
header/xlsxsharedstrings_p.h
header/xlsxworkbook_p.h
header/xlsxabstractsheet_p.h
header/xlsxcolor_p.h
header/xlsxdocpropscore_p.h
header/xlsxmediafile_p.h
header/xlsxsimpleooxmlfile_p.h
header/xlsxworksheet_p.h
header/xlsxcellformula_p.h
header/xlsxconditionalformatting_p.h
header/xlsxdocument_p.h
header/xlsxnumformatparser_p.h
header/xlsxstyles_p.h
header/xlsxzipreader_p.h
header/xlsxcell_p.h
header/xlsxcontenttypes_p.h
header/xlsxdrawinganchor_p.h
header/xlsxrelationships_p.h
header/xlsxtheme_p.h
header/xlsxzipwriter_p.h
header/xlsxchart_p.h
header/xlsxdatavalidation_p.h
header/xlsxdrawing_p.h
header/xlsxrichstring_p.h
header/xlsxutility_p.h
)
set(QXLSX_PUBLIC_HEADERS
header/xlsxabstractooxmlfile.h
header/xlsxabstractsheet.h
header/xlsxabstractsheet_p.h
header/xlsxcellformula.h
header/xlsxcell.h
header/xlsxcelllocation.h
header/xlsxcellrange.h
header/xlsxcellreference.h
header/xlsxchart.h
header/xlsxchartsheet.h
header/xlsxconditionalformatting.h
header/xlsxdatavalidation.h
header/xlsxdatetype.h
header/xlsxdocument.h
header/xlsxformat.h
header/xlsxglobal.h
header/xlsxrichstring.h
header/xlsxworkbook.h
header/xlsxworksheet.h
)
add_library(QXlsx
${SRC_FILES}
${QXLSX_PUBLIC_HEADERS}
)
add_library(QXlsx::QXlsx ALIAS QXlsx)
target_compile_definitions(QXlsx PRIVATE
QT_NO_KEYWORDS
QT_NO_CAST_TO_ASCII
QT_NO_CAST_FROM_ASCII
QT_NO_URL_CAST_FROM_STRING
QT_NO_CAST_FROM_BYTEARRAY
QT_USE_QSTRINGBUILDER
QT_NO_SIGNALS_SLOTS_KEYWORDS
QT_USE_FAST_OPERATOR_PLUS
QT_DISABLE_DEPRECATED_BEFORE=0x060600
)
if (NOT WIN32)
# Strict iterators can't be used on Windows, they lead to a link error
# when application code iterates over a QVector<QPoint> for instance, unless
# Qt itself was also built with strict iterators.
# See example at https://bugreports.qt.io/browse/AUTOSUITE-946
target_compile_definitions(QXlsx PRIVATE QT_STRICT_ITERATORS)
endif()
target_compile_features(QXlsx INTERFACE cxx_std_11)
if (BUILD_SHARED_LIBS)
target_compile_definitions(QXlsx PUBLIC QXlsx_SHAREDLIB)
endif()
target_link_libraries(${PROJECT_NAME}
Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::GuiPrivate
)
target_include_directories(QXlsx
PRIVATE
${QXLSX_HEADERPATH}
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/header>
$<INSTALL_INTERFACE:include/QXlsxQt${QT_VERSION_MAJOR}>
)
set_target_properties(QXlsx PROPERTIES
OUTPUT_NAME ${EXPORT_NAME}
VERSION ${PROJECT_VERSION}
SOVERSION 0.${PROJECT_VERSION}
PUBLIC_HEADER "${QXLSX_PUBLIC_HEADERS}"
)
install(TARGETS QXlsx
EXPORT ${EXPORT_NAME}Targets DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/QXlsxQt${QT_VERSION_MAJOR} COMPONENT devel
)
install(EXPORT ${EXPORT_NAME}Targets
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${EXPORT_NAME}/
FILE ${EXPORT_NAME}Targets.cmake
NAMESPACE QXlsx::
COMPONENT devel
)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/qxlsx-config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/${EXPORT_NAME}Config.cmake
@ONLY
)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/qxlsx-config-version.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/${EXPORT_NAME}ConfigVersion.cmake
@ONLY
)
install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/${EXPORT_NAME}Config.cmake
${CMAKE_CURRENT_BINARY_DIR}/${EXPORT_NAME}ConfigVersion.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${EXPORT_NAME}/
)
include(CPackConfig)
没有合适的资源?快使用搜索试试~ 我知道了~
Qt-Case.zip 利用Qt开发软件进行编的例程,为博文提供案例
共330个文件
h:144个
cpp:125个
zip:25个
需积分: 5 4 下载量 142 浏览量
2024-11-25
12:38:59
上传
评论
收藏 72.19MB ZIP 举报
温馨提示
Qt-Case示例,配合博文讲解清晰明了,目前更新: ①QCustomPlot三方库文件和封装成库文件的提供、以及博文讲解的例程; ②QXlsx三方库文件和封装成库文件的提供、以及博文讲解的例程; ③QsLog和log4qt第三方库日志文件和封装成库文件的提供、以及博文讲解的例程; ④将源代码封装成库文件使用,以一些常见的第三方库文件为例,配合博文讲解; ⑤点击鼠标右键创建菜单栏使用,提供例程和博文讲解; ⑥截图为图片或PDF打印,提供例程和博文讲解; ⑦实现热键盘/快捷键的使用,提供例程和博文讲解; ⑧与STM单片机开发板对应的Wife上位机显示例程,讲解了串口到Wife出来后,上位机软件进行解析,然后UI界面显示,可运用在工程上各个方面,例如监控、无线工业控制、教学等各行业,提供例程和博文讲解; ⑨通过Qt平台实现修改窗口标题图标以及自定义标题栏、自定义标题栏拓展并提供了3种实现方式、样式表的使用及具体方法、串口设计线程实现、CAN二次开发设计、SQLite数据库的使用及相关技巧,以上功能均提供例程并配合博文讲解; ⑩更新中...
资源推荐
资源详情
资源评论
收起资源包目录
Qt-Case.zip 利用Qt开发软件进行编的例程,为博文提供案例 (330个子文件)
libQXlsx.a 1.68MB
libqcustomplot2.a 1.43MB
libQXlsx.a 1.07MB
liblogHand.a 9KB
liblogHand.a 8KB
CPackConfig.cmake 617B
qcustomplot.cpp 1.25MB
xlsxworksheet.cpp 97KB
xlsxchart.cpp 74KB
xlsxstyles.cpp 64KB
xlsxdrawinganchor.cpp 47KB
xlsxdocument.cpp 44KB
xlsxformat.cpp 32KB
xlsxconditionalformatting.cpp 31KB
patternformatter.cpp 26KB
patternformatter.cpp 26KB
xlsxworkbook.cpp 24KB
propertyconfigurator.cpp 22KB
propertyconfigurator.cpp 22KB
logmanager.cpp 17KB
logmanager.cpp 17KB
factory.cpp 16KB
factory.cpp 16KB
xlsxdatavalidation.cpp 16KB
xlsxsharedstrings.cpp 14KB
dailyrollingfileappender.cpp 12KB
dailyrollingfileappender.cpp 12KB
xlsxcellformula.cpp 12KB
properties.cpp 10KB
properties.cpp 10KB
optionconverter.cpp 10KB
optionconverter.cpp 10KB
logerror.cpp 10KB
logerror.cpp 10KB
xlsxtheme.cpp 10KB
datetime.cpp 10KB
datetime.cpp 10KB
fileappender.cpp 9KB
fileappender.cpp 9KB
logger.cpp 9KB
logger.cpp 9KB
xlsxutility.cpp 9KB
loggingevent.cpp 8KB
loggingevent.cpp 8KB
QsLog.cpp 7KB
appenderskeleton.cpp 7KB
appenderskeleton.cpp 7KB
writerappender.cpp 7KB
writerappender.cpp 7KB
xlsxcell.cpp 7KB
xlsxdocpropscore.cpp 7KB
xlsxrichstring.cpp 7KB
level.cpp 6KB
level.cpp 6KB
xlsxcontenttypes.cpp 6KB
rollingfileappender.cpp 6KB
rollingfileappender.cpp 6KB
hierarchy.cpp 6KB
hierarchy.cpp 6KB
initialisationhelper.cpp 6KB
initialisationhelper.cpp 6KB
QsLogDestFile.cpp 6KB
xlsxrelationships.cpp 5KB
consoleappender.cpp 5KB
consoleappender.cpp 5KB
ttcclayout.cpp 5KB
ttcclayout.cpp 5KB
xlsxcolor.cpp 5KB
xlsxdocpropsapp.cpp 5KB
ndc.cpp 4KB
ndc.cpp 4KB
patternlayout.cpp 4KB
patternlayout.cpp 4KB
listappender.cpp 4KB
listappender.cpp 4KB
configuratorhelper.cpp 4KB
configuratorhelper.cpp 4KB
xlsxchartsheet.cpp 4KB
debugappender.cpp 4KB
debugappender.cpp 4KB
basicconfigurator.cpp 3KB
basicconfigurator.cpp 3KB
xlsxabstractsheet.cpp 3KB
xlsxcellreference.cpp 3KB
mdc.cpp 3KB
mdc.cpp 3KB
classlogger.cpp 3KB
classlogger.cpp 3KB
levelrangefilter.cpp 3KB
levelrangefilter.cpp 3KB
stringmatchfilter.cpp 3KB
stringmatchfilter.cpp 3KB
levelmatchfilter.cpp 3KB
levelmatchfilter.cpp 3KB
QsLogDest.cpp 3KB
nullappender.cpp 3KB
nullappender.cpp 3KB
xlsxcellrange.cpp 3KB
simplelayout.cpp 2KB
simplelayout.cpp 2KB
共 330 条
- 1
- 2
- 3
- 4
资源评论
黄金右肾
- 粉丝: 531
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 社区二手物品交易小程序ssm.zip
- 基于java+springboot+mysql+微信小程序的图书馆座位预约系统 源码+数据库+论文(高分毕业设计).zip
- “返家乡”高校暑期社会实践微信小程序设计与开发ssm.zip
- 校园失物招领小程序ssm.zip
- 基于小程序的社区超市管理系统springboot.zip
- 基于java+springboot+mysql+微信小程序的微信小程序的居民健康监测系统 源码+数据库+论文(高分毕业设计).zip
- 基于java+springboot+mysql+微信小程序的网上花店微信小程序 源码+数据库+论文(高分毕业设计).zip
- 校园反诈骗微信小程序的设计与开发ssm.zip
- 高校学生事务管理系统ssm.zip
- 健身达人微信小程序的设计与实现ssm.zip
- 发布.zip
- 基于微信小程序的电影院订票选座系统ssm.zip
- 基于微信平台的文玩销售小程序ssm.zip
- 基于微信小程序的教学质量评价系统ssm.zip
- 澡堂预订的微信小程序的设计和利用ssm.zip
- 微信小程序软件缺陷管理系统ssm.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功