-
Notifications
You must be signed in to change notification settings - Fork 484
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into data_types
- Loading branch information
Showing
25 changed files
with
674 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
# - Try to find MySQL / MySQL Embedded library | ||
# - Try to find MariaDB / MySQL library | ||
# Find the MySQL includes and client library | ||
# This module defines | ||
# MYSQL_INCLUDE_DIR, where to find mysql.h | ||
# MYSQL_LIBRARIES, the libraries needed to use MySQL. | ||
# MYSQL_LIB_DIR, path to the MYSQL_LIBRARIES | ||
# MYSQL_EMBEDDED_LIBRARIES, the libraries needed to use MySQL Embedded. | ||
# MYSQL_EMBEDDED_LIB_DIR, path to the MYSQL_EMBEDDED_LIBRARIES | ||
# MYSQL_FOUND, If false, do not try to use MySQL. | ||
# MYSQL_EMBEDDED_FOUND, If false, do not try to use MySQL Embedded. | ||
|
||
# Copyright (c) 2006-2008, Jarosław Staniek <[email protected]> | ||
# Copyright (c) 2023 Vadim Zeitline <[email protected]> (MariaDB support) | ||
# | ||
# Redistribution and use is allowed according to the terms of the BSD license. | ||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file. | ||
|
@@ -30,9 +28,8 @@ else(WIN32) | |
PATHS | ||
$ENV{MYSQL_INCLUDE_DIR} | ||
$ENV{MYSQL_DIR}/include | ||
/usr/local/mysql/include | ||
/opt/mysql/mysql/include | ||
PATH_SUFFIXES | ||
mariadb | ||
mysql | ||
) | ||
endif(WIN32) | ||
|
@@ -74,41 +71,22 @@ if(WIN32) | |
else(WIN32) | ||
# find_library(MYSQL_LIBRARIES NAMES mysqlclient | ||
set(MYSQL_LIB_PATHS | ||
$ENV{MYSQL_DIR}/libmysql_r/.libs | ||
$ENV{MYSQL_DIR}/lib | ||
$ENV{MYSQL_DIR}/lib/mysql | ||
/usr/local/mysql/lib | ||
/opt/mysql/mysql/lib | ||
$ENV{MYSQL_DIR}/libmysql_r/.libs | ||
$ENV{MYSQL_DIR}/lib | ||
$ENV{MYSQL_DIR}/lib/mysql | ||
/usr/local/mysql/lib | ||
/opt/mysql/mysql/lib | ||
PATH_SUFFIXES | ||
mariadb | ||
mysql | ||
) | ||
find_library(MYSQL_LIBRARIES NAMES mysqlclient | ||
find_library(MYSQL_LIBRARIES NAMES mariadbclient mysqlclient | ||
PATHS | ||
${MYSQL_LIB_PATHS} | ||
) | ||
endif(WIN32) | ||
|
||
find_library(MYSQL_EMBEDDED_LIBRARIES NAMES mysqld | ||
PATHS | ||
${MYSQL_LIB_PATHS} | ||
) | ||
|
||
if(MYSQL_LIBRARIES) | ||
get_filename_component(MYSQL_LIB_DIR ${MYSQL_LIBRARIES} PATH) | ||
endif(MYSQL_LIBRARIES) | ||
|
||
if(MYSQL_EMBEDDED_LIBRARIES) | ||
get_filename_component(MYSQL_EMBEDDED_LIB_DIR ${MYSQL_EMBEDDED_LIBRARIES} PATH) | ||
endif(MYSQL_EMBEDDED_LIBRARIES) | ||
|
||
set( CMAKE_REQUIRED_INCLUDES ${MYSQL_INCLUDE_DIR} ) | ||
set( CMAKE_REQUIRED_LIBRARIES ${MYSQL_EMBEDDED_LIBRARIES} ) | ||
check_cxx_source_compiles( "#include <mysql.h>\nint main() { int i = MYSQL_OPT_USE_EMBEDDED_CONNECTION; }" HAVE_MYSQL_OPT_EMBEDDED_CONNECTION ) | ||
|
||
if(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES) | ||
set(MYSQL_FOUND TRUE) | ||
|
@@ -118,12 +96,4 @@ else(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES) | |
message(STATUS "MySQL not found.") | ||
endif(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES) | ||
|
||
if(MYSQL_INCLUDE_DIR AND MYSQL_EMBEDDED_LIBRARIES AND HAVE_MYSQL_OPT_EMBEDDED_CONNECTION) | ||
set(MYSQL_EMBEDDED_FOUND TRUE) | ||
message(STATUS "Found MySQL Embedded: ${MYSQL_INCLUDE_DIR}, ${MYSQL_EMBEDDED_LIBRARIES}") | ||
else(MYSQL_INCLUDE_DIR AND MYSQL_EMBEDDED_LIBRARIES AND HAVE_MYSQL_OPT_EMBEDDED_CONNECTION) | ||
set(MYSQL_EMBEDDED_FOUND FALSE) | ||
message(STATUS "MySQL Embedded not found.") | ||
endif(MYSQL_INCLUDE_DIR AND MYSQL_EMBEDDED_LIBRARIES AND HAVE_MYSQL_OPT_EMBEDDED_CONNECTION) | ||
|
||
mark_as_advanced(MYSQL_INCLUDE_DIR MYSQL_LIBRARIES MYSQL_EMBEDDED_LIBRARIES) | ||
mark_as_advanced(MYSQL_INCLUDE_DIR MYSQL_LIBRARIES) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.