Skip to content

Commit bce2fb0

Browse files
committed
Add SQLITE_HAS_CODEC to CMake options, with the mention of SQLCipher that implements required APIs
1 parent c80ccba commit bce2fb0

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

CHANGELOG.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Version 2.1.0 - July 18 2017
9999
- Update SQLite3 from 3.13 to latest 3.19.3 (2017-06-08)
100100
- Fixed Incompatibility in 3.19.0 (to use older SQLite version set the CMake variable SQLITE_USE_LEGACY_STRUCT) #125
101101
- Fixed link error (inline in cpp) and compiler warnings (unused variable...) #96
102-
- Added ability to open encrypted databases #107
102+
- Added ability to open encrypted databases (using SQLCipher, eg. libsqlcipher-dev) #107
103103
- Added convenience functions for constructing objects from a row #114
104104
- Added CMake install step #118
105105
- Fix warnings #119
@@ -110,7 +110,7 @@ Version 2.1.0 - July 18 2017
110110
Version 2.2.0 - Sept 19 2017
111111
- Update SQLite3 from 3.19.3 to latest 3.20.1 (2017-08-24) #143
112112
- Added tryExecuteStep and tryReset #142
113-
- Removed virtual kewords from destructors #140
113+
- Removed virtual keywords from destructors #140
114114
- Removed misplaced noexcept keyword #139
115115
- Improved Exception class C++ conformance #138
116116
- Fix warnings #134
@@ -120,7 +120,7 @@ Version 2.3.0 - March 3 2019
120120
- Update SQLite3 from 3.20.1 to latest 3.27.2 (2019-02-25) #183 #187
121121
- Add Statement binding for long int values #147
122122
- Allows long int for bind when used with name #148
123-
- More cmake instructions for linux #151
123+
- More cmake instructions for Linux #151
124124
- Add comparison with sqlite_orm #141
125125
- Fix Statement::bind truncates long integer to 32 bits on x86_64 Linux #155
126126
- Add a move constructor to Database #157
@@ -141,7 +141,7 @@ Version 2.4.0 - August 25 2019
141141
- #215 Disable implicit fallthrough warning when building internal sqlite3
142142
- #216 Set PROJECT_VERSION to fix CMP0048 Policy warnings
143143

144-
Upcoming Version 2.5.0 - Decembre 2019
144+
Upcoming Version 2.5.0 - December 2019
145145
- Update SQLite3 from 3.29.0 to 3.30.1 (2019-10-10)
146146
- #212 fix sqlite3 compile properties (jzt)
147147
- #219 Disable cast-function-type warning when building internal sqlite (zxey)

CMakeLists.txt

+9-2
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,19 @@ if (SQLITE_ENABLE_COLUMN_METADATA)
175175
target_compile_definitions(SQLiteCpp PUBLIC SQLITE_ENABLE_COLUMN_METADATA)
176176
endif (SQLITE_ENABLE_COLUMN_METADATA)
177177

178-
option(SQLITE_ENABLE_ASSERT_HANDLER "Enable the user defintion of a assertion_failed() handler." OFF)
178+
option(SQLITE_ENABLE_ASSERT_HANDLER "Enable the user definition of a assertion_failed() handler." OFF)
179179
if (SQLITE_ENABLE_ASSERT_HANDLER)
180-
# Enable the user defintion of a assertion_failed() handler (default to false, easier to handler for begginers).
180+
# Enable the user definition of a assertion_failed() handler (default to false, easier to handler for beginners).
181181
target_compile_definitions(SQLiteCpp PUBLIC SQLITECPP_ENABLE_ASSERT_HANDLER)
182182
endif (SQLITE_ENABLE_ASSERT_HANDLER)
183183

184+
option(SQLITE_HAS_CODEC "Enable database encryption API. Not available in the public release of SQLite." OFF)
185+
if (SQLITE_HAS_CODEC)
186+
# Enable database encryption API. Requires implementations of sqlite3_key & sqlite3_key_v2.
187+
# Eg. SQLCipher (libsqlcipher-dev) is an SQLite extension that provides 256 bit AES encryption of database files.
188+
target_compile_definitions(SQLiteCpp PUBLIC SQLITE_HAS_CODEC)
189+
endif (SQLITE_HAS_CODEC)
190+
184191
option(SQLITE_USE_LEGACY_STRUCT "Fallback to forward declaration of legacy struct sqlite3_value (pre SQLite 3.19)" OFF)
185192
if (SQLITE_USE_LEGACY_STRUCT)
186193
# Force forward declaration of legacy struct sqlite3_value (pre SQLite 3.19)

0 commit comments

Comments
 (0)