vcpkg/ports/sqlite3/portfile.cmake

33 lines
1.4 KiB
CMake
Raw Normal View History

2017-02-15 20:14:37 +08:00
include(vcpkg_common_functions)
2017-04-02 04:35:22 +08:00
2017-09-11 17:41:40 +08:00
set(SQLITE_VERSION 3200100)
set(SQLITE_HASH 66c325fec1c13ed5360899aa3e3a7a67d2b79d24dde954df7df7179c4d07e7b20edf831cc7107df863f3f8b0f30d21b934fcd0f7ea7b74409abbc0060bc28f7b)
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
2017-04-02 04:35:22 +08:00
URLS "https://sqlite.org/2017/sqlite-amalgamation-${SQLITE_VERSION}.zip"
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})
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
-DSOURCE=${SOURCE_PATH}
2017-04-02 04:35:08 +08:00
-DVCPKG_CMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME}
2017-02-15 20:14:37 +08:00
)
vcpkg_build_cmake()
vcpkg_install_cmake()
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}")
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()