-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qxlsx/1.4.3: Add qt6 compatibility #11364
Closed
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
bfbd2fb
Add qt6 compatibility
MartinDelille ea6b2ed
Set QT_VERSION_MAJOR
MartinDelille c74580d
Patch CMakeLists.txt c++ 17 version only for qt6
MartinDelille d92ae5a
Fix check
MartinDelille 1cd3798
Respect c++ standard if already defined
MartinDelille File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
commit e53efc535340dc74120c53b83b6462ae9144e39d | ||
Author: Martin Delille <[email protected]> | ||
Date: Tue Jul 5 10:33:47 2022 +0200 | ||
|
||
Use c++17 when using Qt 6 | ||
|
||
diff --git a/QXlsx/CMakeLists.txt b/QXlsx/CMakeLists.txt | ||
index d82b479..527866c 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}) |
25 changes: 25 additions & 0 deletions
25
recipes/qxlsx/all/patches/0004-defined-cpp-standard-only-if-need.patch
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
commit 9072fc1b7160fd67123a39cf9590db5133de51ec | ||
Author: Martin Delille <[email protected]> | ||
Date: Fri Jul 22 10:21:54 2022 +0200 | ||
|
||
Define cpp standard only if not defined | ||
|
||
diff --git a/QXlsx/CMakeLists.txt b/QXlsx/CMakeLists.txt | ||
index 527866c..7e59cc5 100644 | ||
--- a/QXlsx/CMakeLists.txt | ||
+++ b/QXlsx/CMakeLists.txt | ||
@@ -16,10 +16,12 @@ 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) | ||
+if(NOT CMAKE_CXX_STANDARD) | ||
+ if (QT_MAJOR_VERSION EQUAL 6) | ||
set(CMAKE_CXX_STANDARD 17) | ||
-else() | ||
+ else() | ||
set(CMAKE_CXX_STANDARD 11) | ||
+ endif() | ||
endif() | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prince-chrismc How shall I handle the C++ version conditionnally here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is the test packge, it's prefect