mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-23 02:57:09 +01:00
Merge pull request #6016 from edmBernard/dev/fix_libpq_on_linux
[libpq] fix error at link time on linux
This commit is contained in:
commit
0bfa4c82b0
@ -66,6 +66,9 @@ if(WIN32)
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
list(APPEND pg_port_src
|
||||
src/port/strlcpy.c
|
||||
src/port/inet_aton.c
|
||||
src/port/inet_net_ntop.c
|
||||
src/port/getpeereid.c
|
||||
)
|
||||
endif()
|
||||
|
||||
@ -130,7 +133,12 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_DEBUG_POSTFIX "d")
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
add_library(libpq ${pg_port_src} ${pg_backend_src} ${pg_libpq_src})
|
||||
|
||||
target_compile_definitions(libpq PRIVATE -DFRONTEND -DENABLE_THREAD_SAFETY -DUSE_OPENSSL -D_CRT_SECURE_NO_WARNINGS)
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
target_compile_definitions(libpq PRIVATE -D_GNU_SOURCE)
|
||||
endif()
|
||||
|
||||
target_link_libraries(libpq PRIVATE OpenSSL::SSL)
|
||||
if(WIN32)
|
||||
target_link_libraries(libpq PRIVATE ws2_32 secur32 advapi32 shell32)
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: libpq
|
||||
Version: 9.6.1-5
|
||||
Version: 9.6.1-6
|
||||
Description: The official database access API of postgresql
|
||||
Build-Depends: openssl, zlib (linux)
|
||||
|
Loading…
x
Reference in New Issue
Block a user