sqlite3/CMakeLists.txt: set SQLITE_OMIT_LOAD_EXTENSION for sqlite3 is the option is enabled

This commit is contained in:
Bart 2024-12-14 19:15:13 +01:00
parent 643b153c61
commit e3ddbd9fb4

View File

@ -44,6 +44,11 @@ if (SQLITE_ENABLE_DBSTAT_VTAB)
message(STATUS "Compile sqlite3 with SQLITE_ENABLE_DBSTAT_VTAB")
endif (SQLITE_ENABLE_DBSTAT_VTAB)
if (SQLITE_OMIT_LOAD_EXTENSION)
target_compile_definitions(sqlite3 PUBLIC SQLITE_OMIT_LOAD_EXTENSION)
message(STATUS "Compile sqlite3 with SQLITE_OMIT_LOAD_EXTENSION")
endif (SQLITE_OMIT_LOAD_EXTENSION)
if (UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang"))
set_target_properties(sqlite3 PROPERTIES COMPILE_FLAGS "-fPIC")