client-root/third_party/build_mysqlconnector.sh

25 lines
915 B
Bash
Raw Normal View History

2019-07-01 14:24:27 -04:00
#!/usr/bin/env bash
source ../scripts/build_helper.sh
library_path="mysqlconnector"
requires_rebuild ${library_path}
[[ $? -eq 0 ]] && exit 0
cd ${library_path}
HEADER=$(cat cdk/foundation/connection_openssl.cc)
if ! [[ "${HEADER:0:34}" == "#if !defined(SSL_ERROR_WANT_ASYNC)" ]]; then
echo "Creating new one!"
echo "#if !defined(SSL_ERROR_WANT_ASYNC)
#define SSL_ERROR_WANT_ASYNC 0xFFEEDDCC
#endif
#if !defined(SSL_ERROR_WANT_ASYNC_JOB)
#define SSL_ERROR_WANT_ASYNC_JOB 0xFFEECCDD
#endif
`cat cdk/foundation/connection_openssl.cc`" > cdk/foundation/connection_openssl.cc
fi
cd ..
2019-07-01 16:32:56 -04:00
cmake_build ${library_path} -DCMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++ -I`pwd`/boringssl/include/" -DWITH_JDBC=ON -DWITH_SSL="`pwd`/boringssl/" -DOPENSSL_ROOT_DIR="`pwd`/boringssl/" -DCMAKE_BUILD_TYPE=RelWithDebInfo
2019-07-01 14:24:27 -04:00
check_err_exit ${library_path} "Failed to build mysqlconnector!"
set_build_successful ${library_path}