Skip to content

Commit

Permalink
[sqlite3] Fix tool installation with zlib (#31050)
Browse files Browse the repository at this point in the history
* [sqlite3] Fix tool installation with zlib

* Disambiguate PDB

---------

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
  • Loading branch information
dg0yt and BillyONeal authored Apr 26, 2023
1 parent a5a4929 commit d18847f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
6 changes: 5 additions & 1 deletion ports/sqlite3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
)
Expand Down
4 changes: 2 additions & 2 deletions ports/sqlite3/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion ports/sqlite3/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -7590,7 +7590,7 @@
},
"sqlite3": {
"baseline": "3.40.1",
"port-version": 2
"port-version": 3
},
"sqlitecpp": {
"baseline": "3.2.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/s-/sqlite3.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "846077eab115952eeb4dda0eaae97a3eb776fa9f",
"version": "3.40.1",
"port-version": 3
},
{
"git-tree": "6bb52479b5ab874f6283e585a3bf2294f52966ca",
"version": "3.40.1",
Expand Down

0 comments on commit d18847f

Please sign in to comment.