Commit 252b73bf authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Link sqlite3 dynamically on Windows desktop.

parent 349f7e25
......@@ -23,4 +23,7 @@
set(EP_sqlite3_URL "http://www.sqlite.org/2014/sqlite-amalgamation-3080702.zip")
set(EP_sqlite3_URL_HASH "MD5=10587262e4381358b707df75392c895f")
set(EP_sqlite3_PATCH_COMMAND "${CMAKE_COMMAND}" "-E" "copy" "${CMAKE_CURRENT_SOURCE_DIR}/builders/sqlite3/CMakeLists.txt" "<SOURCE_DIR>")
set(EP_sqlite3_LINKING_TYPE "-DENABLE_STATIC=0")
if(WIN32)
list(APPEND EP_sqlite3_PATCH_COMMAND "COMMAND" "${CMAKE_COMMAND}" "-E" "copy" "${CMAKE_CURRENT_SOURCE_DIR}/builders/sqlite3/sqlite3.def" "<SOURCE_DIR>")
endif()
set(EP_sqlite3_LINKING_TYPE "-DENABLE_STATIC=NO")
......@@ -28,6 +28,9 @@ option(ENABLE_STATIC "Build static library (default is shared library)." OFF)
set(SOURCE_FILES sqlite3.c)
if(WIN32)
list(APPEND SOURCE_FILES sqlite3.def)
endif()
if(ENABLE_STATIC)
add_library(sqlite3 STATIC ${SOURCE_FILES})
......
LIBRARY sqlite3
EXPORTS
sqlite3_close
sqlite3_column_int
sqlite3_errmsg
sqlite3_exec
sqlite3_finalize
sqlite3_free
sqlite3_last_insert_rowid
sqlite3_mprintf
sqlite3_open
sqlite3_open16
sqlite3_prepare_v2
sqlite3_profile
sqlite3_snprintf
sqlite3_step
......@@ -94,11 +94,6 @@ if(WIN32)
list(APPEND EP_ms2_CMAKE_OPTIONS "-DENABLE_RELATIVE_PREFIX=YES")
endif()
# sqlite3
if(WIN32)
set(EP_sqlite3_LINKING_TYPE "-DENABLE_STATIC=YES")
endif()
# vpx
if(WIN32)
set(EP_vpx_LINKING_TYPE "--enable-static" "--disable-shared" "--enable-pic")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment