From 561146e744ea8889b9dd2481abacedd02f33f2e6 Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Tue, 5 Jul 2022 10:30:24 +0200 Subject: [PATCH 1/2] Minor formatting fix --- QXlsx/CMakeLists.txt | 10 +++++----- README.md | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/QXlsx/CMakeLists.txt b/QXlsx/CMakeLists.txt index c622113c..d82b479f 100644 --- a/QXlsx/CMakeLists.txt +++ b/QXlsx/CMakeLists.txt @@ -23,15 +23,15 @@ set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) if(NOT DEFINED ${QXLSX_PARENTPATH}) set(QXLSX_PARENTPATH ${CMAKE_CURRENT_SOURCE_DIR}/../) -endif(NOT DEFINED ${QXLSX_PARENTPATH}) - -if(NOT DEFINED ${QXLSX_HEADERPATH}) +endif(NOT DEFINED ${QXLSX_PARENTPATH}) + +if(NOT DEFINED ${QXLSX_HEADERPATH}) set(QXLSX_HEADERPATH ${CMAKE_CURRENT_SOURCE_DIR}/../QXlsx/header/) -endif(NOT DEFINED ${QXLSX_HEADERPATH}) +endif(NOT DEFINED ${QXLSX_HEADERPATH}) if(NOT DEFINED ${QXLSX_SOURCEPATH}) set(QXLSX_SOURCEPATH ${CMAKE_CURRENT_SOURCE_DIR}/../QXlsx/source/) -endif(NOT DEFINED ${QXLSX_SOURCEPATH}) +endif(NOT DEFINED ${QXLSX_SOURCEPATH}) message("Current Path of QXlsx") message(${QXLSX_PARENTPATH}) diff --git a/README.md b/README.md index 293b7af8..240c6de0 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@

-- QXlsx is excel file(*.xlsx) reader/writer library. +- QXlsx is excel file(`*.xlsx`) reader/writer library. - Because QtXlsx is no longer supported(2014), I created a new project that is based on QtXlsx. (2017-) - Development language of QXlsx is C++. (with Qt) - You don't need to use static library or dynamic shared object using QXlsx. From 9826af8a461fc107da533c31bad9426eb4ede957 Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Tue, 5 Jul 2022 10:33:47 +0200 Subject: [PATCH 2/2] Use c++17 when using Qt 6 --- QXlsx/CMakeLists.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/QXlsx/CMakeLists.txt b/QXlsx/CMakeLists.txt index d82b479f..527866ce 100644 --- a/QXlsx/CMakeLists.txt +++ b/QXlsx/CMakeLists.txt @@ -11,14 +11,18 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) -set(CMAKE_CXX_STANDARD 11) -set(CMAKE_CXX_STANDARD_REQUIRED ON) - include(GNUInstallDirs) find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Gui REQUIRED) find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Gui REQUIRED) +if (QT_MAJOR_VERSION EQUAL 6) + set(CMAKE_CXX_STANDARD 17) +else() + set(CMAKE_CXX_STANDARD 11) +endif() +set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) if(NOT DEFINED ${QXLSX_PARENTPATH})