contrib/libpq: use hidden library

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
Azat Khuzhin 2022-01-20 17:23:01 +03:00
parent dc7affd813
commit 4114a17de0

View File

@ -57,12 +57,12 @@ set(SRCS
"${LIBPQ_SOURCE_DIR}/port/explicit_bzero.c"
)
add_library(libpq ${SRCS})
add_library(_libpq ${SRCS})
target_include_directories (libpq SYSTEM PUBLIC ${LIBPQ_SOURCE_DIR})
target_include_directories (libpq SYSTEM PUBLIC "${LIBPQ_SOURCE_DIR}/include")
target_include_directories (libpq SYSTEM PRIVATE "${LIBPQ_SOURCE_DIR}/configs")
target_include_directories (_libpq SYSTEM PUBLIC ${LIBPQ_SOURCE_DIR})
target_include_directories (_libpq SYSTEM PUBLIC "${LIBPQ_SOURCE_DIR}/include")
target_include_directories (_libpq SYSTEM PRIVATE "${LIBPQ_SOURCE_DIR}/configs")
target_link_libraries (libpq PRIVATE ssl)
target_link_libraries (_libpq PRIVATE OpenSSL::SSL)
add_library(ch_contrib::libpq ALIAS libpq)
add_library(ch_contrib::libpq ALIAS _libpq)