2019-06-10 18:50:46 +00:00
|
|
|
set(MARIADB_CLIENT_SOURCE_DIR ${ClickHouse_SOURCE_DIR}/contrib/mariadb-connector-c)
|
|
|
|
set(MARIADB_CLIENT_BINARY_DIR ${ClickHouse_BINARY_DIR}/contrib/mariadb-connector-c)
|
2018-08-02 00:49:31 +00:00
|
|
|
|
|
|
|
set(SRCS
|
2019-04-24 09:06:28 +00:00
|
|
|
#${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/bmove_upp.c
|
2018-08-02 00:49:31 +00:00
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/get_password.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/ma_alloc.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/ma_array.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/ma_charset.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/ma_compress.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/ma_context.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/ma_default.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/ma_dtoa.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/ma_errmsg.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/ma_hash.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/ma_init.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/ma_io.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/ma_list.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/ma_ll2str.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/ma_loaddata.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/ma_net.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/ma_password.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/ma_pvio.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/mariadb_async.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/mariadb_charset.c
|
|
|
|
#${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/mariadb_dyncol.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/mariadb_lib.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/mariadb_stmt.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/ma_sha1.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/ma_stmt_codec.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/ma_string.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/ma_time.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/ma_tls.c
|
2019-08-16 16:27:49 +00:00
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/secure/openssl_crypt.c
|
2018-08-02 00:49:31 +00:00
|
|
|
#${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/secure/gnutls.c
|
|
|
|
#${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/secure/ma_schannel.c
|
|
|
|
#${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/secure/schannel.c
|
|
|
|
#${MARIADB_CLIENT_SOURCE_DIR}/plugins/auth/auth_gssapi_client.c
|
|
|
|
#${MARIADB_CLIENT_SOURCE_DIR}/plugins/auth/dialog.c
|
|
|
|
#${MARIADB_CLIENT_SOURCE_DIR}/plugins/auth/gssapi_client.c
|
|
|
|
#${MARIADB_CLIENT_SOURCE_DIR}/plugins/auth/gssapi_errmsg.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/plugins/auth/mariadb_cleartext.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/plugins/auth/my_auth.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/plugins/auth/old_password.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/plugins/auth/sha256_pw.c
|
2019-08-16 00:59:59 +00:00
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/plugins/auth/caching_sha2_pw.c
|
2018-08-02 00:49:31 +00:00
|
|
|
#${MARIADB_CLIENT_SOURCE_DIR}/plugins/auth/sspi_client.c
|
|
|
|
#${MARIADB_CLIENT_SOURCE_DIR}/plugins/auth/sspi_errmsg.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/plugins/connection/aurora.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/plugins/connection/replication.c
|
|
|
|
#${MARIADB_CLIENT_SOURCE_DIR}/plugins/io/remote_io.c
|
|
|
|
#${MARIADB_CLIENT_SOURCE_DIR}/plugins/pvio/pvio_npipe.c
|
|
|
|
#${MARIADB_CLIENT_SOURCE_DIR}/plugins/pvio/pvio_shmem.c
|
|
|
|
${MARIADB_CLIENT_SOURCE_DIR}/plugins/pvio/pvio_socket.c
|
|
|
|
#${MARIADB_CLIENT_SOURCE_DIR}/plugins/trace/trace_example.c
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/linux_x86_64/libmariadb/ma_client_plugin.c
|
|
|
|
)
|
|
|
|
|
2019-03-22 11:18:24 +00:00
|
|
|
if(OPENSSL_LIBRARIES)
|
|
|
|
list(APPEND SRCS ${MARIADB_CLIENT_SOURCE_DIR}/libmariadb/secure/openssl.c)
|
|
|
|
endif()
|
|
|
|
|
2019-04-24 09:06:28 +00:00
|
|
|
add_library(mysqlclient ${SRCS})
|
2018-08-02 00:49:31 +00:00
|
|
|
|
2019-03-22 11:18:24 +00:00
|
|
|
if(OPENSSL_LIBRARIES)
|
2019-04-24 09:06:28 +00:00
|
|
|
target_link_libraries(mysqlclient PRIVATE ${OPENSSL_LIBRARIES})
|
2019-03-22 11:18:24 +00:00
|
|
|
target_compile_definitions(mysqlclient PRIVATE -D HAVE_OPENSSL -D HAVE_TLS)
|
|
|
|
endif()
|
2018-08-05 09:00:07 +00:00
|
|
|
|
2018-08-02 00:49:31 +00:00
|
|
|
target_include_directories(mysqlclient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/linux_x86_64/include)
|
|
|
|
target_include_directories(mysqlclient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/common/include)
|
|
|
|
target_include_directories(mysqlclient PUBLIC ${MARIADB_CLIENT_SOURCE_DIR}/include)
|
|
|
|
|
2019-03-22 11:18:24 +00:00
|
|
|
target_compile_definitions(mysqlclient PRIVATE -D THREAD)
|