summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@qt.io>2021-11-03 10:24:35 +0100
committerChristian Stenger <christian.stenger@qt.io>2021-11-03 09:48:31 +0000
commit11c8784cfded938a6e658e6450ae1e91685e0c82 (patch)
tree234353f297ce22fec120314de1a7a013c11136b9
parentef289e693d438316e460c9cb8282a068cd7ea2a1 (diff)
downloadqbs-11c8784cfded938a6e658e6450ae1e91685e0c82.tar.gz
Fix linking with gcc 8
gcc removed the need to link against libstd++fs in gcc9. Change-Id: I22bfe4fa9aea0f1b56328b2d08497c713c6e6d9a Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
-rw-r--r--src/lib/pkgconfig/CMakeLists.txt2
-rw-r--r--src/lib/pkgconfig/pkgconfig.qbs2
-rw-r--r--src/lib/pkgconfig/use_pkgconfig.pri2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/pkgconfig/CMakeLists.txt b/src/lib/pkgconfig/CMakeLists.txt
index e64d934c8..c82edac16 100644
--- a/src/lib/pkgconfig/CMakeLists.txt
+++ b/src/lib/pkgconfig/CMakeLists.txt
@@ -15,7 +15,7 @@ else()
endif()
set(QBS_PKGCONFIG_PUBLIC_DEPENDS "")
-if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0)
+if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
set(QBS_PKGCONFIG_PUBLIC_DEPENDS "stdc++fs")
endif()
diff --git a/src/lib/pkgconfig/pkgconfig.qbs b/src/lib/pkgconfig/pkgconfig.qbs
index 0be5065f5..a32eb775b 100644
--- a/src/lib/pkgconfig/pkgconfig.qbs
+++ b/src/lib/pkgconfig/pkgconfig.qbs
@@ -60,7 +60,7 @@ QbsStaticLibrary {
Depends { name: "qbsvariant" }
cpp.defines: exportingProduct.publicDefines
cpp.staticLibraries: {
- if (qbs.toolchainType === "gcc" && cpp.compilerVersionMajor === 7)
+ if (qbs.toolchainType === "gcc" && cpp.compilerVersionMajor < 9)
return ["stdc++fs"];
return [];
}
diff --git a/src/lib/pkgconfig/use_pkgconfig.pri b/src/lib/pkgconfig/use_pkgconfig.pri
index e0e485e46..ad64cea6d 100644
--- a/src/lib/pkgconfig/use_pkgconfig.pri
+++ b/src/lib/pkgconfig/use_pkgconfig.pri
@@ -33,7 +33,7 @@ gcc {
isEmpty(COMPILER_VERSION) {
COMPILER_VERSION = $$system($$QMAKE_CXX " -dumpversion")
COMPILER_MAJOR_VERSION = $$str_member($$COMPILER_VERSION)
- equals(COMPILER_MAJOR_VERSION, 7) {
+ lessThan(COMPILER_MAJOR_VERSION, 9) {
LIBS += -lstdc++fs
}
}