aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2024-01-15 19:47:27 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2024-01-23 15:27:33 +0300
commitc53136bd7d266fccaca679d0471dd8ac0ce91373 (patch)
treec1f3cfe28703e8fdf138c7e9daae11be9e0d2d05
parente330d6ead75dc3f86018b936552eef5abd80d9ac (diff)
Fix odb/sqlite/details/config.hxx for build2 build
-rw-r--r--odb/sqlite/details/config.hxx12
-rw-r--r--odb/sqlite/details/export.hxx10
2 files changed, 21 insertions, 1 deletions
diff --git a/odb/sqlite/details/config.hxx b/odb/sqlite/details/config.hxx
index bbf32f6..4f1c5ce 100644
--- a/odb/sqlite/details/config.hxx
+++ b/odb/sqlite/details/config.hxx
@@ -16,6 +16,18 @@
# endif
#endif
+// LIBODB_SQLITE_BUILD2 macro can be defined either by the buildfile or by the
+// included odb/sqlite/details/config*.h (see above).
+//
+#ifdef LIBODB_SQLITE_BUILD2
+# include <sqlite3.h>
+
+# if SQLITE_VERSION_NUMBER >= 3006012
+# define LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY 1
+# endif
+# define LIBODB_SQLITE_HAVE_COLUMN_METADATA 1
+#endif
+
// no post
#endif // ODB_SQLITE_DETAILS_CONFIG_HXX
diff --git a/odb/sqlite/details/export.hxx b/odb/sqlite/details/export.hxx
index 515b891..c0903ae 100644
--- a/odb/sqlite/details/export.hxx
+++ b/odb/sqlite/details/export.hxx
@@ -6,7 +6,15 @@
#include <odb/pre.hxx>
-#include <odb/sqlite/details/config.hxx>
+#ifdef ODB_COMPILER
+# error libodb-sqlite header included in odb-compiled header
+#elif !defined(LIBODB_SQLITE_BUILD2)
+# ifdef _MSC_VER
+# include <odb/sqlite/details/config-vc.h>
+# else
+# include <odb/sqlite/details/config.h>
+# endif
+#endif
// Normally we don't export class templates (but do complete specializations),
// inline functions, and classes with only inline member functions. Exporting