2017-02-15 20:14:37 +08:00
|
|
|
include(vcpkg_common_functions)
|
2017-04-02 04:35:22 +08:00
|
|
|
|
2019-04-09 08:14:39 +08:00
|
|
|
set(SQLITE_VERSION 3270200)
|
|
|
|
set(SQLITE_HASH f84a6a3101c989164f17b85a6c2674ae2728a75d70daf5e33627a6eaa399adaf763deb968d891ad0660f1ebe660d27fbd55ace379d807f3bb8af4e95c01b68c4)
|
2017-04-02 04:35:22 +08:00
|
|
|
|
2017-02-15 20:14:37 +08:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2019-04-09 08:14:39 +08:00
|
|
|
URLS "https://sqlite.org/2019/sqlite-amalgamation-${SQLITE_VERSION}.zip"
|
2017-04-02 04:35:22 +08:00
|
|
|
FILENAME "sqlite-amalgamation-${SQLITE_VERSION}.zip"
|
2018-11-07 09:29:12 +08:00
|
|
|
SHA512 ${SQLITE_HASH}
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_extract_source_archive_ex(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
ARCHIVE ${ARCHIVE}
|
|
|
|
REF ${SQLITE_VERSION}
|
|
|
|
)
|
2017-02-15 20:14:37 +08:00
|
|
|
|
|
|
|
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-06-16 11:07:21 +08:00
|
|
|
vcpkg_fixup_cmake_targets()
|
2017-02-15 20:14:37 +08:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
|
|
|
2018-06-16 11:07:21 +08:00
|
|
|
configure_file(
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/sqlite3-config.in.cmake
|
|
|
|
${CURRENT_PACKAGES_DIR}/share/sqlite3/sqlite3-config.cmake
|
|
|
|
@ONLY
|
|
|
|
)
|
|
|
|
|
2017-02-15 20:14:37 +08:00
|
|
|
file(WRITE ${CURRENT_PACKAGES_DIR}/share/sqlite3/copyright "SQLite is in the Public Domain.\nhttp://www.sqlite.org/copyright.html\n")
|
|
|
|
vcpkg_copy_pdbs()
|