Enable internal MySQL library on non-Linux system, because usage of OS packages is very fragile and usually doesn't work at all

This commit is contained in:
Alexey Milovidov 2019-12-26 22:49:34 +03:00
parent 1adc3cfb88
commit bdfa8f2ed0

View File

@ -1,17 +1,12 @@
option(ENABLE_MYSQL "Enable MySQL" ${ENABLE_LIBRARIES})
if(ENABLE_MYSQL)
if(OS_LINUX)
option(USE_INTERNAL_MYSQL_LIBRARY "Set to FALSE to use system mysqlclient library instead of bundled" ${NOT_UNBUNDLED})
else()
option(USE_INTERNAL_MYSQL_LIBRARY "Set to FALSE to use system mysqlclient library instead of bundled" OFF)
endif()
option(USE_INTERNAL_MYSQL_LIBRARY "Set to FALSE to use system mysqlclient library instead of bundled" ${NOT_UNBUNDLED})
if(USE_INTERNAL_MYSQL_LIBRARY AND NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/mariadb-connector-c/README")
message(WARNING "submodule contrib/mariadb-connector-c is missing. to fix try run: \n git submodule update --init --recursive")
set(USE_INTERNAL_MYSQL_LIBRARY 0)
endif()
if (USE_INTERNAL_MYSQL_LIBRARY)
set (MYSQLCLIENT_LIBRARIES mariadbclient)
set (USE_MYSQL 1)