File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -228,6 +228,7 @@ endif ()
228228option (SQLITECPP_INTERNAL_SQLITE "Add the internal SQLite3 source to the project." ON )
229229if (SQLITECPP_INTERNAL_SQLITE)
230230 message (STATUS "Compile sqlite3 from source in subdirectory" )
231+ option (SQLITE_ENABLE_JSON1 "Enable JSON1 extension when building internal sqlite3 library." ON )
231232 # build the SQLite3 C library (for ease of use/compatibility) versus Linux sqlite3-dev package
232233 add_subdirectory (sqlite3)
233234 target_link_libraries (SQLiteCpp PUBLIC sqlite3)
Original file line number Diff line number Diff line change @@ -21,6 +21,12 @@ if (SQLITE_ENABLE_COLUMN_METADATA)
2121 target_compile_definitions (sqlite3 PUBLIC SQLITE_ENABLE_COLUMN_METADATA)
2222endif (SQLITE_ENABLE_COLUMN_METADATA)
2323
24+ if (SQLITE_ENABLE_JSON1)
25+ # Enable JSON1 extension when building sqlite3
26+ # See more here: https://www.sqlite.org/json1.html
27+ target_compile_definitions (sqlite3 PUBLIC SQLITE_ENABLE_JSON1)
28+ endif (SQLITE_ENABLE_JSON1)
29+
2430if (UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" ))
2531 set_target_properties (sqlite3 PROPERTIES COMPILE_FLAGS "-fPIC" )
2632endif (UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" ))
You can’t perform that action at this time.
0 commit comments