2017-02-15 20:14:37 +08:00
|
|
|
include(vcpkg_common_functions)
|
2017-04-02 04:35:22 +08:00
|
|
|
|
2018-04-24 12:14:53 +08:00
|
|
|
set(SQLITE_VERSION 3230100)
|
|
|
|
set(SQLITE_HASH 5784f4dea7f14d7dcf5dd07f0e111c8f0b64ff55c68b32a23fba7a36baf1f095c7a35573fc3b57b84822878218b78f9b0187c4e3f0439d4215471ee5f556eee1)
|
2017-04-02 04:35:22 +08:00
|
|
|
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/sqlite-amalgamation-${SQLITE_VERSION})
|
|
|
|
|
2017-02-15 20:14:37 +08:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2018-04-03 20:38:05 +08:00
|
|
|
URLS "https://sqlite.org/2018/sqlite-amalgamation-${SQLITE_VERSION}.zip"
|
2017-04-02 04:35:22 +08:00
|
|
|
FILENAME "sqlite-amalgamation-${SQLITE_VERSION}.zip"
|
|
|
|
SHA512 ${SQLITE_HASH})
|
2017-02-15 20:14:37 +08:00
|
|
|
vcpkg_extract_source_archive(${ARCHIVE})
|
|
|
|
|
|
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
|
|
|
|
2018-02-28 04:24:41 +08:00
|
|
|
set(SQLITE3_SKIP_TOOLS ON)
|
|
|
|
if("tool" IN_LIST FEATURES)
|
|
|
|
set(SQLITE3_SKIP_TOOLS OFF)
|
|
|
|
endif()
|
|
|
|
|
2017-02-15 20:14:37 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2017-04-02 04:35:22 +08:00
|
|
|
PREFER_NINJA
|
2017-02-15 20:14:37 +08:00
|
|
|
OPTIONS
|
2018-02-28 04:24:41 +08:00
|
|
|
-DSQLITE3_SKIP_TOOLS=${SQLITE3_SKIP_TOOLS}
|
|
|
|
OPTIONS_DEBUG
|
|
|
|
-DSQLITE3_SKIP_TOOLS=ON
|
2017-02-15 20:14:37 +08:00
|
|
|
)
|
2018-02-28 04:24:41 +08:00
|
|
|
|
2017-02-15 20:14:37 +08:00
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
2018-03-20 04:46:22 +08:00
|
|
|
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
|
|
|
file(READ ${CURRENT_PACKAGES_DIR}/debug/share/sqlite3/sqlite3Config-debug.cmake SQLITE3_DEBUG_CONFIG)
|
|
|
|
string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" SQLITE3_DEBUG_CONFIG "${SQLITE3_DEBUG_CONFIG}")
|
|
|
|
file(WRITE ${CURRENT_PACKAGES_DIR}/share/sqlite3/sqlite3Config-debug.cmake "${SQLITE3_DEBUG_CONFIG}")
|
|
|
|
endif()
|
2017-02-15 20:14:37 +08:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
|
|
|
|
|
|
file(WRITE ${CURRENT_PACKAGES_DIR}/share/sqlite3/copyright "SQLite is in the Public Domain.\nhttp://www.sqlite.org/copyright.html\n")
|
|
|
|
vcpkg_copy_pdbs()
|