MariaDB Connector C is build from source if it is not found on the system

The FindMariaDBConnector.cmake file now checks if the found library actually is
the MariaDB Connector-C library. If the found library is not the MariaDB
Connector-C, it will be built from source.
This commit is contained in:
Markus Makela
2016-02-03 11:35:01 +02:00
parent 081bacdc64
commit 2f65c3a7b8
5 changed files with 56 additions and 11 deletions

View File

@ -46,6 +46,12 @@ find_package(RabbitMQ)
# Read BuildPCRE2 for details about how to add pcre2 as a dependency to a target
include(cmake/BuildPCRE2.cmake)
# If the connector was not found, download and build it from source
if(NOT MARIADB_CONNECTOR_FOUND)
message(STATUS "Building MariaDB Connector-C from source.")
include(cmake/BuildMariaDBConnector.cmake)
endif()
# You can find the variables set by this in the FindCURL.cmake file
# which is a default module in CMake.