diff --git a/src/libs/3rdparty/sqlite/config.h b/src/libs/3rdparty/sqlite/config.h index 44daecedfc8..3672f4c5ddf 100644 --- a/src/libs/3rdparty/sqlite/config.h +++ b/src/libs/3rdparty/sqlite/config.h @@ -27,7 +27,7 @@ #include -#ifdef SQLITE_STATIC_LIBRARY +#if defined(SQLITE_STATIC_LIBRARY) || defined(SQLITEC_STATIC_LIBRARY) #include "sqlite_static_config.h" #endif diff --git a/src/libs/3rdparty/sqlite/sqlite_static_config.h b/src/libs/3rdparty/sqlite/sqlite_static_config.h index f34dc7bcb6e..011fd25657c 100644 --- a/src/libs/3rdparty/sqlite/sqlite_static_config.h +++ b/src/libs/3rdparty/sqlite/sqlite_static_config.h @@ -195,7 +195,7 @@ #define sqlite3_stmt_status qtc_sqlite3_stmt_status #define sqlite3_str_append qtc_sqlite3_str_append #define sqlite3_str_appendall qtc_sqlite3_str_appendall -#define sqlite3_str_appendchar qtc_sqlite3_str_appendchastruct r +#define sqlite3_str_appendchar qtc_sqlite3_str_appendchar #define sqlite3_str_appendf qtc_sqlite3_str_appendf #define sqlite3_str_errcode qtc_sqlite3_str_errcode #define sqlite3_str_finish qtc_sqlite3_str_finish diff --git a/src/libs/sqlite/CMakeLists.txt b/src/libs/sqlite/CMakeLists.txt index 5f0d073813f..0b23a7db126 100644 --- a/src/libs/sqlite/CMakeLists.txt +++ b/src/libs/sqlite/CMakeLists.txt @@ -2,6 +2,9 @@ add_qtc_library(SqliteC OBJECT PROPERTIES AUTOMOC OFF AUTOUIC OFF QT_COMPILE_OPTIONS_DISABLE_WARNINGS ON POSITION_INDEPENDENT_CODE ON CONDITION Qt5_VERSION VERSION_GREATER_EQUAL 6.2.0 DEFINES SQLITE_CORE SQLITE_CUSTOM_INCLUDE=config.h $<$:SQLITE_DEBUG> + PROPERTIES COMPILE_OPTIONS $,/FIconfig.h,-includeconfig.h> + PUBLIC_INCLUDES + ../3rdparty/sqlite SOURCES ../3rdparty/sqlite ../3rdparty/sqlite/sqlite3.c @@ -18,8 +21,7 @@ add_qtc_library(Sqlite CONDITION Qt5_VERSION VERSION_GREATER_EQUAL 6.2.0 PUBLIC_INCLUDES "${CMAKE_CURRENT_LIST_DIR}" - ../3rdparty/sqlite - DEFINES SQLITE_LIBRARY SQLITE_CUSTOM_INCLUDE=config.h $<$:SQLITE_REVERSE> + DEFINES SQLITE_CUSTOM_INCLUDE=config.h $<$:SQLITE_REVERSE> SOURCES constraints.h createtablesqlstatementbuilder.h diff --git a/src/libs/sqlite/sqlite3_fwd.h b/src/libs/sqlite/sqlite3_fwd.h index 1075719f2c4..7d1dc016ad8 100644 --- a/src/libs/sqlite/sqlite3_fwd.h +++ b/src/libs/sqlite/sqlite3_fwd.h @@ -3,7 +3,7 @@ #pragma once -#ifdef SQLITE_STATIC_LIBRARY +#if defined(SQLITE_STATIC_LIBRARY) || defined(SQLITEC_STATIC_LIBRARY) using sqlite3 = struct qtc_sqlite3; using sqlite3_stmt = struct qtc_sqlite3_stmt; using sqlite3_session = struct qtc_sqlite3_session; diff --git a/src/libs/sqlite/sqlitedatabasebackend.h b/src/libs/sqlite/sqlitedatabasebackend.h index 67556cc77e7..70b1db12f37 100644 --- a/src/libs/sqlite/sqlitedatabasebackend.h +++ b/src/libs/sqlite/sqlitedatabasebackend.h @@ -40,7 +40,7 @@ public: void close(); void closeWithoutException(); - struct sqlite3 *sqliteDatabaseHandle() const; + sqlite3 *sqliteDatabaseHandle() const; void setJournalMode(JournalMode journalMode); JournalMode journalMode();