From 925923c50773a69135f041a4b79436eb09b65007 Mon Sep 17 00:00:00 2001 From: Paulo Coutinho Date: Fri, 1 Oct 2021 19:27:16 -0300 Subject: [PATCH] fix load extension --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7123a570..67f19f88 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -209,6 +209,12 @@ if (SQLITE_USE_LEGACY_STRUCT) target_compile_definitions(SQLiteCpp PUBLIC SQLITE_USE_LEGACY_STRUCT) endif (SQLITE_USE_LEGACY_STRUCT) +option(SQLITE_OMIT_LOAD_EXTENSION "Enable omit load extension" OFF) +if (SQLITE_OMIT_LOAD_EXTENSION) + # Enable the user definition of load_extension(). + target_compile_definitions(SQLiteCpp PUBLIC 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(SQLiteCpp PROPERTIES COMPILE_FLAGS "-fPIC") endif (UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang"))