Skip to content

Commit

Permalink
fix extension loading
Browse files Browse the repository at this point in the history
  • Loading branch information
paleolimbot committed May 21, 2024
1 parent 75e3927 commit b391e7d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions c/driver/sqlite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,14 @@ endif()

# Check for sqlite3_load_extension() in sqlite3.h
if(EXISTS "${SQLite3_INCLUDE_DIRS}/sqlite3.h")
file(READ "${SQLite3_INCLUDE_DIRS}/sqlite3.h" ADBC_SQLITE_H_CONTENT)
string(FIND "${ADBC_SQLITE_H_CONTENT}" "sqlite3_load_extension"
ADBC_SQLITE_WITH_LOAD_EXTENSION)
ADBC_SQLITE3_LOAD_EXTENSION_POS)

if(ADBC_SQLITE3_LOAD_EXTENSION_POS EQUAL -1)
set(ADBC_SQLITE_WITH_LOAD_EXTENSION OFF)
else()
set(ADBC_SQLITE_WITH_LOAD_EXTENSION ON)
endif()
endif()

if(NOT ADBC_SQLITE_WITH_LOAD_EXTENSION)
Expand Down

0 comments on commit b391e7d

Please sign in to comment.