mariadb/cmake/mariadb_connector_c.cmake
Sergei Golubchik e4afd3c337 MDEV-22003 mysql_config disappeared from 10.5 (e.g. binary tarball or source build)
* generate and install mysql_config
* symlink mariadb_config (from C/C) to mariadb-config

also:
* .gitignore generated mariadb-config.1
* remove obsolete compiler flag from C/C
2020-03-24 02:39:32 +01:00

47 lines
1.2 KiB
CMake

SET(OPT CONC_)
IF (CMAKE_BUILD_TYPE STREQUAL "Debug")
SET(CONC_WITH_RTC ON)
ENDIF()
SET(CONC_WITH_SIGNCODE ${SIGNCODE})
SET(SIGN_OPTIONS ${SIGNTOOL_PARAMETERS})
SET(CONC_WITH_EXTERNAL_ZLIB ON)
IF(SSL_DEFINES MATCHES "WOLFSSL")
IF(WIN32)
SET(CONC_WITH_SSL "SCHANNEL")
ELSE()
SET(CONC_WITH_SSL "GNUTLS") # that's what debian wants, right?
ENDIF()
ELSE()
SET(CONC_WITH_SSL "OPENSSL")
SET(OPENSSL_FOUND TRUE)
ENDIF()
SET(CONC_WITH_CURL OFF)
SET(CONC_WITH_MYSQLCOMPAT ON)
IF (INSTALL_LAYOUT STREQUAL "RPM")
SET(CONC_INSTALL_LAYOUT "RPM")
ELSE()
SET(CONC_INSTALL_LAYOUT "DEFAULT")
ENDIF()
SET(PLUGIN_INSTALL_DIR ${INSTALL_PLUGINDIR})
SET(MARIADB_UNIX_ADDR ${MYSQL_UNIX_ADDR})
SET(CLIENT_PLUGIN_PVIO_NPIPE STATIC)
SET(CLIENT_PLUGIN_PVIO_SHMEM STATIC)
SET(CLIENT_PLUGIN_PVIO_SOCKET STATIC)
MESSAGE("== Configuring MariaDB Connector/C")
ADD_SUBDIRECTORY(libmariadb)
IF(UNIX)
INSTALL(CODE "EXECUTE_PROCESS(
COMMAND ${CMAKE_COMMAND} -E make_directory ${INSTALL_BINDIR}
COMMAND ${CMAKE_COMMAND} -E create_symlink mariadb_config ${INSTALL_BINDIR}/mariadb-config
WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX})"
COMPONENT Development)
ENDIF()