Skip to content
Snippets Groups Projects
Commit 116bbdb3 authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

SuperBuild: activate threadsafe and link with pthread to let GDAL detect SQLITE

parent b85a007f
No related branches found
No related tags found
No related merge requests found
......@@ -26,8 +26,7 @@ else()
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE:STRING=Release
-DBUILD_SHARED_LIBS:BOOL=ON
CMAKE_COMMAND
-DBUILD_SHARED_LIBS:BOOL=ON
)
set(_SB_${proj}_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
......
......@@ -8,15 +8,17 @@ 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)
add_library(sqlite3 sqlite3_win.c)
if(UNIX)
set(CMAKE_C_FLAGS "-pthread")
endif()
install(TARGETS sqlite3
RUNTIME DESTINATION bin COMPONENT RuntimeLibraries
LIBRARY DESTINATION lib COMPONENT RuntimeLibraries
ARCHIVE DESTINATION lib COMPONENT Development)
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
file(GLOB SQLITE_HEADERS "${CMAKE_SOURCE_DIR}/sqlite*.h")
install(FILES ${SQLITE_HEADERS}
DESTINATION include
COMPONENT Development)
DESTINATION include)
#if defined (WIN32)
#define SQLITE_API __declspec(dllexport)
#endif
#include "sqlite3.c"
\ No newline at end of file
#if defined (WIN32)
#define SQLITE_API __declspec(dllexport)
#endif
#include "sqlite3.c"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment