Skip to content

Commit 2d8f4b9

Browse files
committed
Add CMake option SQLITE_ENABLE_RTREE to enable RTree extension when building internal sqlite3 library
See more here: https://sqlite.org/rtree.html Disabled by default
1 parent 23a16ed commit 2d8f4b9

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ option(SQLITECPP_INTERNAL_SQLITE "Add the internal SQLite3 source to the project
253253
if (SQLITECPP_INTERNAL_SQLITE)
254254
message(STATUS "Compile sqlite3 from source in subdirectory")
255255
option(SQLITE_ENABLE_JSON1 "Enable JSON1 extension when building internal sqlite3 library." ON)
256+
option(SQLITE_ENABLE_RTREE "Enable RTree extension when building internal sqlite3 library." OFF)
256257
# build the SQLite3 C library (for ease of use/compatibility) versus Linux sqlite3-dev package
257258
add_subdirectory(sqlite3)
258259
target_link_libraries(SQLiteCpp PUBLIC SQLite::SQLite3)

sqlite3/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@ if (SQLITE_ENABLE_JSON1)
3636
target_compile_definitions(sqlite3 PUBLIC SQLITE_ENABLE_JSON1)
3737
endif (SQLITE_ENABLE_JSON1)
3838

39-
if(SQLITE_ENABLE_RTREE)
39+
if (SQLITE_ENABLE_RTREE)
4040
# Enable RTree extension when building sqlite3
4141
# See more here: https://sqlite.org/rtree.html
4242
target_compile_definitions(sqlite3 PUBLIC SQLITE_ENABLE_RTREE)
43+
message(STATUS "Compile sqlite3 with SQLITE_ENABLE_RTREE")
4344
endif (SQLITE_ENABLE_RTREE)
4445

4546
if (UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang"))

0 commit comments

Comments
 (0)