summaryrefslogtreecommitdiff
path: root/qbs
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2021-05-07 14:33:01 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2021-05-07 14:14:10 +0000
commit8d44ae5d7e475e8cc830d42b5253e4bd77156bca (patch)
tree520990f7b93a71e9c9ce3b544a3c12f95e362f75 /qbs
parent64d7b6dda1cf52312e55d8f83990473851f8324d (diff)
downloadqt-creator-8d44ae5d7e475e8cc830d42b5253e4bd77156bca.tar.gz
sqlite: Fix qbs build
Change-Id: I919fd20c445510231e66c08d3dafd5c1b5696ac7 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'qbs')
-rw-r--r--qbs/modules/sqlite_sources/sqlite-sources.qbs19
1 files changed, 15 insertions, 4 deletions
diff --git a/qbs/modules/sqlite_sources/sqlite-sources.qbs b/qbs/modules/sqlite_sources/sqlite-sources.qbs
index ea80e58b1b..67e547bbeb 100644
--- a/qbs/modules/sqlite_sources/sqlite-sources.qbs
+++ b/qbs/modules/sqlite_sources/sqlite-sources.qbs
@@ -8,9 +8,18 @@ Module {
Depends { name: "cpp" }
- cpp.defines: [
- "_HAVE_SQLITE_CONFIG_H", "SQLITE_CORE"
- ].concat(buildSharedLib ? "BUILD_SQLITE_LIBRARY" : "BUILD_SQLITE_STATIC_LIBRARY")
+ cpp.defines: {
+ var defines = ["_HAVE_SQLITE_CONFIG_H", "SQLITE_CORE"];
+ if (buildSharedLib)
+ defines.push("BUILD_SQLITE_LIBRARY");
+ else
+ defines.push("BUILD_SQLITE_STATIC_LIBRARY");
+ if (qbs.targetOS.contains("linux"))
+ defines.push("_POSIX_C_SOURCE=200809L", "_GNU_SOURCE");
+ else if (qbs.targetOS.contains("macos"))
+ defines.push("_BSD_SOURCE");
+ return defines;
+ }
cpp.dynamicLibraries: base.concat((qbs.targetOS.contains("unix") && !qbs.targetOS.contains("bsd"))
? ["dl", "pthread"] : [])
@@ -31,10 +40,12 @@ Module {
prefix: sqlite_sources.sqliteDir3rdParty + '/'
cpp.warningLevel: "none"
files: [
+ "carray.c",
+ "config.h",
"sqlite3.c",
"sqlite3.h",
+ "sqlite.h",
"sqlite3ext.h",
- "carray.c"
]
}
}