From d18847f62196673c01e39ab4cc96d3e08b7a18b2 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Wed, 26 Apr 2023 07:54:48 +0200 Subject: [PATCH] [sqlite3] Fix tool installation with zlib (#31050) * [sqlite3] Fix tool installation with zlib * Disambiguate PDB --------- Co-authored-by: Billy Robert O'Neal III --- ports/sqlite3/CMakeLists.txt | 6 +++++- ports/sqlite3/portfile.cmake | 4 ++-- ports/sqlite3/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/s-/sqlite3.json | 5 +++++ 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ports/sqlite3/CMakeLists.txt b/ports/sqlite3/CMakeLists.txt index c4fcadf9b16..f8e6ba6422b 100644 --- a/ports/sqlite3/CMakeLists.txt +++ b/ports/sqlite3/CMakeLists.txt @@ -46,6 +46,10 @@ endif() if(NOT SQLITE3_SKIP_TOOLS) add_executable(sqlite3-bin shell.c) + set_target_properties(sqlite3-bin PROPERTIES + OUTPUT_NAME sqlite3 + PDB_NAME "sqlite3${CMAKE_EXECUTABLE_SUFFIX}.pdb" + ) target_link_libraries(sqlite3-bin PRIVATE sqlite3) if (WITH_ZLIB) @@ -55,7 +59,7 @@ if(NOT SQLITE3_SKIP_TOOLS) endif() install(TARGETS sqlite3-bin sqlite3 - RUNTIME DESTINATION tools + RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) diff --git a/ports/sqlite3/portfile.cmake b/ports/sqlite3/portfile.cmake index f1a0d572f6c..b42f2da21a9 100644 --- a/ports/sqlite3/portfile.cmake +++ b/ports/sqlite3/portfile.cmake @@ -78,8 +78,8 @@ vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-${PORT} CONFIG_PATH share/unoff 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}") +if("tool" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES sqlite3 DESTINATION "${CURRENT_PACKAGES_DIR}/tools" AUTO_CLEAN) endif() configure_file( diff --git a/ports/sqlite3/vcpkg.json b/ports/sqlite3/vcpkg.json index 744147e558e..be282c11e0e 100644 --- a/ports/sqlite3/vcpkg.json +++ b/ports/sqlite3/vcpkg.json @@ -1,7 +1,7 @@ { "name": "sqlite3", "version": "3.40.1", - "port-version": 2, + "port-version": 3, "description": "SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.", "homepage": "https://sqlite.org/", "license": "blessing", diff --git a/versions/baseline.json b/versions/baseline.json index 68e49d13268..3fdb7b603d4 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -7590,7 +7590,7 @@ }, "sqlite3": { "baseline": "3.40.1", - "port-version": 2 + "port-version": 3 }, "sqlitecpp": { "baseline": "3.2.0", diff --git a/versions/s-/sqlite3.json b/versions/s-/sqlite3.json index 19dcb07683b..358d74496a0 100644 --- a/versions/s-/sqlite3.json +++ b/versions/s-/sqlite3.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "846077eab115952eeb4dda0eaae97a3eb776fa9f", + "version": "3.40.1", + "port-version": 3 + }, { "git-tree": "6bb52479b5ab874f6283e585a3bf2294f52966ca", "version": "3.40.1",