ClickHouse/contrib/libpq-cmake/CMakeLists.txt

78 lines
3.0 KiB
CMake
Raw Normal View History

2020-12-10 00:36:31 +00:00
set(LIBPQ_SOURCE_DIR ${ClickHouse_SOURCE_DIR}/contrib/libpq)
set(SRCS
${LIBPQ_SOURCE_DIR}/fe-auth.c
${LIBPQ_SOURCE_DIR}/fe-auth-scram.c
${LIBPQ_SOURCE_DIR}/fe-connect.c
${LIBPQ_SOURCE_DIR}/fe-exec.c
# ${LIBPQ_SOURCE_DIR}/fe-gssapi-common.c
${LIBPQ_SOURCE_DIR}/fe-lobj.c
${LIBPQ_SOURCE_DIR}/fe-misc.c
${LIBPQ_SOURCE_DIR}/fe-print.c
${LIBPQ_SOURCE_DIR}/fe-protocol2.c
${LIBPQ_SOURCE_DIR}/fe-protocol3.c
${LIBPQ_SOURCE_DIR}/fe-secure.c
${LIBPQ_SOURCE_DIR}/fe-secure-common.c
# ${LIBPQ_SOURCE_DIR}/fe-secure-gssapi.c
${LIBPQ_SOURCE_DIR}/fe-secure-openssl.c
${LIBPQ_SOURCE_DIR}/legacy-pqsignal.c
${LIBPQ_SOURCE_DIR}/libpq-events.c
${LIBPQ_SOURCE_DIR}/pqexpbuffer.c
${LIBPQ_SOURCE_DIR}/common/scram-common.c
${LIBPQ_SOURCE_DIR}/common/sha2_openssl.c
${LIBPQ_SOURCE_DIR}/common/md5.c
${LIBPQ_SOURCE_DIR}/common/saslprep.c
${LIBPQ_SOURCE_DIR}/common/unicode_norm.c
${LIBPQ_SOURCE_DIR}/common/ip.c
${LIBPQ_SOURCE_DIR}/common/jsonapi.c
${LIBPQ_SOURCE_DIR}/common/wchar.c
${LIBPQ_SOURCE_DIR}/common/base64.c
${LIBPQ_SOURCE_DIR}/common/link-canary.c
${LIBPQ_SOURCE_DIR}/common/fe_memutils.c
${LIBPQ_SOURCE_DIR}/common/sha2.c
${LIBPQ_SOURCE_DIR}/common/sha2_openssl.c
${LIBPQ_SOURCE_DIR}/common/string.c
${LIBPQ_SOURCE_DIR}/common/pg_get_line.c
${LIBPQ_SOURCE_DIR}/common/stringinfo.c
${LIBPQ_SOURCE_DIR}/common/psprintf.c
${LIBPQ_SOURCE_DIR}/common/encnames.c
${LIBPQ_SOURCE_DIR}/port/snprintf.c
${LIBPQ_SOURCE_DIR}/port/strlcpy.c
${LIBPQ_SOURCE_DIR}/port/strerror.c
${LIBPQ_SOURCE_DIR}/port/inet_net_ntop.c
${LIBPQ_SOURCE_DIR}/port/getpeereid.c
${LIBPQ_SOURCE_DIR}/port/chklocale.c
${LIBPQ_SOURCE_DIR}/port/dirmod.c
${LIBPQ_SOURCE_DIR}/port/dlopen.c
${LIBPQ_SOURCE_DIR}/port/erand48.c
${LIBPQ_SOURCE_DIR}/port/explicit_bzero.c
${LIBPQ_SOURCE_DIR}/port/fls.c
${LIBPQ_SOURCE_DIR}/port/getopt.c
${LIBPQ_SOURCE_DIR}/port/kill.c
${LIBPQ_SOURCE_DIR}/port/link.c
${LIBPQ_SOURCE_DIR}/port/noblock.c
${LIBPQ_SOURCE_DIR}/port/open.c
${LIBPQ_SOURCE_DIR}/port/path.c
${LIBPQ_SOURCE_DIR}/port/pg_strong_random.c
${LIBPQ_SOURCE_DIR}/port/pgstrcasecmp.c
${LIBPQ_SOURCE_DIR}/port/thread.c
${LIBPQ_SOURCE_DIR}/error/elog.c
${LIBPQ_SOURCE_DIR}/error/errlog.c
)
add_library(libpq ${SRCS})
target_include_directories (libpq PUBLIC ${LIBPQ_SOURCE_DIR}/configs)
target_include_directories (libpq PUBLIC ${LIBPQ_SOURCE_DIR})
target_include_directories (libpq PUBLIC ${LIBPQ_SOURCE_DIR}/include)
target_include_directories (libpq PRIVATE ${LIBPQ_SOURCE_DIR}/include/common)
target_include_directories (libpq PRIVATE ${LIBPQ_SOURCE_DIR}/include/libpq)
target_link_libraries (libpq PRIVATE ssl)