Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libpq] Add Secur32.lib and openssl to libpq cmake wrapper #18377

Merged
merged 4 commits into from
Jun 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions ports/libpq/vcpkg-cmake-wrapper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,22 @@ if(PostgreSQL_FOUND AND "@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static")
list(APPEND PostgreSQL_LIBRARIES ${PostgreSQL_${LIB_ITEM}_LIBRARY})
endif()
endforeach()
if(WIN32)
if(TARGET PostgreSQL::PostgreSQL)
set_property(TARGET PostgreSQL::PostgreSQL APPEND PROPERTY INTERFACE_LINK_LIBRARIES "Secur32.lib")
endif()
list(APPEND PostgreSQL_LIBRARIES Secur32.lib)
endif()
cmake_policy(PUSH)
cmake_policy(SET CMP0057 NEW)
set(Z_VCPKG_PORT_FEATURES "@FEATURES@")
if("openssl" IN_LIST Z_VCPKG_PORT_FEATURES)
find_package(OpenSSL REQUIRED)
if(TARGET PostgreSQL::PostgreSQL)
set_property(TARGET PostgreSQL::PostgreSQL APPEND PROPERTY INTERFACE_LINK_LIBRARIES "OpenSSL::SSL")
endif()
list(APPEND PostgreSQL_LIBRARIES OpenSSL::SSL)
endif()
unset(Z_VCPKG_PORT_FEATURES)
cmake_policy(POP)
endif()
2 changes: 1 addition & 1 deletion ports/libpq/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "libpq",
"version": "12.2",
"port-version": 16,
"port-version": 17,
"description": "The official database access API of postgresql",
"homepage": "https://www.postgresql.org/",
"supports": "!uwp",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3450,7 +3450,7 @@
},
"libpq": {
"baseline": "12.2",
"port-version": 16
"port-version": 17
},
"libpqxx": {
"baseline": "7.3.1",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libpq.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "01e2ad37b9df46e45826e52a6cddfb95ca137abd",
"version": "12.2",
"port-version": 17
},
{
"git-tree": "7c75f4ea669ee37e510cb5d7ea0e39b0a7d3f6cb",
"version": "12.2",
Expand Down