mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-23 18:17:46 +00:00
forgot one
This commit is contained in:
parent
a6bbb9aa10
commit
faadde5b45
1 changed files with 74 additions and 0 deletions
74
FindMySQLConnectorCPP.cmake
Normal file
74
FindMySQLConnectorCPP.cmake
Normal file
|
@ -0,0 +1,74 @@
|
|||
# - Try to find Mysql-Connector-C++
|
||||
# Once done, this will define
|
||||
#
|
||||
# MYSQLCONNECTORCPP_FOUND - system has Mysql-Connector-C++ installed
|
||||
# MYSQLCONNECTORCPP_INCLUDE_DIRS - the Mysql-Connector-C++ include directories
|
||||
# MYSQLCONNECTORCPP_LIBRARIES - link these to use Mysql-Connector-C++
|
||||
#
|
||||
# The user may wish to set, in the CMake GUI or otherwise, this variable:
|
||||
# MYSQLCONNECTORCPP_ROOT_DIR - path to start searching for the module
|
||||
|
||||
set(MYSQLCONNECTORCPP_ROOT_DIR
|
||||
"${MYSQLCONNECTORCPP_ROOT_DIR}"
|
||||
CACHE
|
||||
PATH
|
||||
"Where to start looking for this component.")
|
||||
|
||||
if(WIN32)
|
||||
find_path(MYSQLCONNECTORCPP_INCLUDE_DIR
|
||||
NAMES
|
||||
mysql_connection.h
|
||||
PATHS
|
||||
"C:\\Program Files"
|
||||
HINTS
|
||||
${MYSQLCONNECTORCPP_ROOT_DIR}
|
||||
PATH_SUFFIXES
|
||||
include)
|
||||
|
||||
find_library(MYSQLCONNECTORCPP_LIBRARY
|
||||
NAMES
|
||||
mysqlcppconn
|
||||
mysqlcppconn-static
|
||||
HINTS
|
||||
${MYSQLCONNECTORCPP_ROOT_DIR}
|
||||
PATH_SUFFIXES
|
||||
lib)
|
||||
|
||||
else()
|
||||
find_path(MYSQLCONNECTORCPP_INCLUDE_DIR
|
||||
mysql_connection.h
|
||||
HINTS
|
||||
${MYSQLCONNECTORCPP_ROOT_DIR}
|
||||
PATH_SUFFIXES
|
||||
include)
|
||||
|
||||
find_library(MYSQLCONNECTORCPP_LIBRARY
|
||||
NAMES
|
||||
mysqlcppconn
|
||||
mysqlcppconn-static
|
||||
HINTS
|
||||
${MYSQLCONNECTORCPP_ROOT_DIR}
|
||||
PATH_SUFFIXES
|
||||
lib64
|
||||
lib)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(MYSQLCONNECTORCPP_INCLUDE_DIR
|
||||
MYSQLCONNECTORCPP_LIBRARY)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(MysqlConnectorCpp
|
||||
DEFAULT_MSG
|
||||
MYSQLCONNECTORCPP_INCLUDE_DIR
|
||||
MYSQLCONNECTORCPP_LIBRARY)
|
||||
|
||||
if(MYSQLCONNECTORCPP_FOUND)
|
||||
set(MYSQLCONNECTORCPP_INCLUDE_DIRS
|
||||
"${MYSQLCONNECTORCPP_INCLUDE_DIR}")
|
||||
# Add any dependencies here
|
||||
set(MYSQLCONNECTORCPP_LIBRARIES
|
||||
"${MYSQLCONNECTORCPP_LIBRARY}")
|
||||
# Add any dependencies here
|
||||
mark_as_advanced(MYSQLCONNECTORCPP_ROOT_DIR)
|
||||
endif()
|
||||
|
Loading…
Add table
Reference in a new issue