[sqlite3] Rename sqlite3 tool as sqlite3.exe (#9437)

* [sqlite3] Rename sqlite3 tool as sqlite3.exe

* Update rename sqlite3-bin.exe condition

* [proj4] Fix the regressions cause by sqlite3
This commit is contained in:
NancyLi1013 2020-01-09 14:36:56 -08:00 committed by dan-shaw
parent 9b897498ef
commit 6ece7aea9c
4 changed files with 16 additions and 15 deletions

View File

@ -1,5 +1,5 @@
Source: proj4
Version: 6.2.1-1
Version: 6.2.1-2
Homepage: https://github.com/OSGeo/PROJ
Description: PROJ.4 library for cartographic projections
Build-Depends: sqlite3[core]

View File

@ -28,12 +28,12 @@ if ("database" IN_LIST FEATURES)
if (VCPKG_TARGET_IS_WINDOWS)
set(BIN_SUFFIX .exe)
if (VCPKG_TARGET_ARCHITECTURE STREQUAL arm)
if (NOT EXISTS ${CURRENT_INSTALLED_DIR}/../x86-windows/tools/sqlite3-bin.exe)
if (NOT EXISTS ${CURRENT_INSTALLED_DIR}/../x86-windows/tools/sqlite3.exe)
message(FATAL_ERROR "Proj4 database need to install sqlite3[tool]:x86-windows first.")
endif()
set(SQLITE3_BIN_PATH ${CURRENT_INSTALLED_DIR}/../x86-windows/tools)
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL arm64 OR (VCPKG_TARGET_ARCHITECTURE STREQUAL x64 AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic))
if (NOT EXISTS ${CURRENT_INSTALLED_DIR}/../x64-windows/tools/sqlite3-bin.exe)
if (NOT EXISTS ${CURRENT_INSTALLED_DIR}/../x64-windows/tools/sqlite3.exe)
message(FATAL_ERROR "Proj4 database need to install sqlite3[tool]:x64-windows first.")
endif()
set(SQLITE3_BIN_PATH ${CURRENT_INSTALLED_DIR}/../x64-windows/tools)
@ -61,7 +61,7 @@ vcpkg_configure_cmake(
-DBUILD_PROJ=OFF
-DBUILD_PROJINFO=OFF
-DPROJ_TESTS=OFF
-DEXE_SQLITE3=${SQLITE3_BIN_PATH}/sqlite3-bin${BIN_SUFFIX}
-DEXE_SQLITE3=${SQLITE3_BIN_PATH}/sqlite3${BIN_SUFFIX}
)
vcpkg_install_cmake()

View File

@ -1,5 +1,5 @@
Source: sqlite3
Version: 3.30.1-1
Version: 3.30.1-2
Homepage: https://sqlite.org/
Description: SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.

View File

@ -1,5 +1,3 @@
include(vcpkg_common_functions)
set(SQLITE_VERSION 3300100)
set(SQLITE_HASH 030b53fe684e0fb8e9747b1f160e5e875807eabb0763caff66fe949ee6aa92f26f409b9b25034d8d1f5cee554a99e56a2bb92129287b0fe0671409babe9d18ea )
@ -18,16 +16,15 @@ vcpkg_extract_source_archive_ex(
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
set(SQLITE3_SKIP_TOOLS ON)
if("tool" IN_LIST FEATURES)
set(SQLITE3_SKIP_TOOLS OFF)
endif()
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
INVERTED_FEATURES
tool SQLITE3_SKIP_TOOLS
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DSQLITE3_SKIP_TOOLS=${SQLITE3_SKIP_TOOLS}
OPTIONS ${FEATURE_OPTIONS}
OPTIONS_DEBUG
-DSQLITE3_SKIP_TOOLS=ON
)
@ -37,11 +34,15 @@ vcpkg_fixup_cmake_targets()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
if(NOT SQLITE3_SKIP_TOOLS AND EXISTS ${CURRENT_PACKAGES_DIR}/tools/sqlite3-bin${VCPKG_HOST_EXECUTABLE_SUFFIX})
file(RENAME ${CURRENT_PACKAGES_DIR}/tools/sqlite3-bin${VCPKG_HOST_EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/sqlite3${VCPKG_HOST_EXECUTABLE_SUFFIX})
endif()
configure_file(
${CMAKE_CURRENT_LIST_DIR}/sqlite3-config.in.cmake
${CURRENT_PACKAGES_DIR}/share/sqlite3/sqlite3-config.cmake
@ONLY
)
file(WRITE ${CURRENT_PACKAGES_DIR}/share/sqlite3/copyright "SQLite is in the Public Domain.\nhttp://www.sqlite.org/copyright.html\n")
vcpkg_copy_pdbs()
file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright "SQLite is in the Public Domain.\nhttp://www.sqlite.org/copyright.html\n")
vcpkg_copy_pdbs()