diff --git a/SuperBuild/CMake/External_sqlite.cmake b/SuperBuild/CMake/External_sqlite.cmake index 361cad026bd5a8afde6ff604c370607254884781..7918d937545f81f007daf8ecf20fdce49daf8796 100644 --- a/SuperBuild/CMake/External_sqlite.cmake +++ b/SuperBuild/CMake/External_sqlite.cmake @@ -24,8 +24,8 @@ SETUP_SUPERBUILD(SQLITE) ExternalProject_Add(SQLITE PREFIX SQLITE - URL "https://www.sqlite.org/2015/sqlite-amalgamation-3080801.zip" - URL_MD5 b1cbcbd710bdfd762dc169f1676053b5 + URL "https://www.sqlite.org/2016/sqlite-amalgamation-3110000.zip" + URL_MD5 ab80e70b65da455514a68441ce3e0a8c SOURCE_DIR ${SQLITE_SB_SRC} BINARY_DIR ${SQLITE_SB_BUILD_DIR} INSTALL_DIR ${SB_INSTALL_PREFIX} diff --git a/SuperBuild/patches/SQLITE/CMakeLists.txt b/SuperBuild/patches/SQLITE/CMakeLists.txt index 583de68887bb97126faab17aba420189fe0356a9..21afdaac1419c760bcf541acb3913a67dfc1765c 100644 --- a/SuperBuild/patches/SQLITE/CMakeLists.txt +++ b/SuperBuild/patches/SQLITE/CMakeLists.txt @@ -18,7 +18,7 @@ # limitations under the License. # -cmake_minimum_required(VERSION 2.8.3) +cmake_minimum_required(VERSION 3.10.0) project(sqlite) @@ -28,11 +28,19 @@ include_directories("${CMAKE_SOURCE_DIR}") add_definitions(-DSQLITE_ENABLE_COLUMN_METADATA=1) add_definitions(-DSQLITE_ENABLE_RTREE=1) add_definitions(-DSQLITE_OMIT_LOAD_EXTENSION=1) -add_definitions(-DSQLITE_THREADSAFE=1) +if(WIN32) + add_definitions(-DSQLITE_THREADSAFE=0) +else() + add_definitions(-DSQLITE_THREADSAFE=1) +endif() -add_library(sqlite3 sqlite3_win.c) +if(WIN32) + add_library(sqlite3 STATIC sqlite3.c) +else() + add_library(sqlite3 sqlite3.c) +endif() -add_executable(sqlite3-bin shell.c) +add_executable(sqlite3-bin shell.c sqlite3.c) target_link_libraries(sqlite3-bin sqlite3) set_target_properties(sqlite3-bin PROPERTIES OUTPUT_NAME sqlite3) diff --git a/SuperBuild/patches/SQLITE/sqlite3_win.c b/SuperBuild/patches/SQLITE/sqlite3_win.c deleted file mode 100644 index 02425d11e4df69e7c286a6afbd9e4a05bc3f0937..0000000000000000000000000000000000000000 --- a/SuperBuild/patches/SQLITE/sqlite3_win.c +++ /dev/null @@ -1,5 +0,0 @@ -#if defined (WIN32) -#define SQLITE_API __declspec(dllexport) -#endif - -#include "sqlite3.c"