This repository has been archived by the owner on Jan 24, 2023. It is now read-only.
forked from moneroexamples/openmonero
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathFindMySQL++.cmake
executable file
·56 lines (41 loc) · 1.5 KB
/
FindMySQL++.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# - Find MySQL++
# Find the MySQL++ includes and client library
# This module defines
# MYSQLPP_INCLUDE_DIR, where to find mysql.h
# MYSQLPP_LIBRARIES, the libraries needed to use MySQL.
# MYSQLPP_FOUND, If false, do not try to use MySQL.
# Adapted from: https://raw.githubusercontent.com/piratical/Madeline_2.0_PDE/master/cmake/modules/FindMySQL%2B%2B.cmake
set(MYSQLPP_INCLUDE_DIRS "")
foreach(component mysql++.h mysql.h)
FIND_PATH(MYSQLPP_INCLUDE_${component}
NAMES ${component}
PATHS
/usr/include/mysql
/usr/include/mysql++
/usr/local/include/mysql++
/opt/mysql++/include/mysql++
/opt/mysqlpp/include/mysql++
/opt/mysqlpp/include/)
list(APPEND MYSQLPP_INCLUDE_DIRS
${MYSQLPP_INCLUDE_${component}})
endforeach()
set(MYSQLPP_LIBRARIES "")
foreach(component mysqlpp mysqlclient)
FIND_LIBRARY(MYSQL_LIBRARY_${component}
NAMES ${component}
PATHS
/usr/lib
/usr/local/lib
/opt/mysql++
/opt/mysqlpp
/opt/mysqlpp/lib)
list(APPEND MYSQLPP_LIBRARIES ${MYSQL_LIBRARY_${component}})
endforeach()
if(MYSQLPP_INCLUDE_DIRS AND MYSQLPP_LIBRARIES)
set(MYSQLPP_FOUND TRUE)
message(STATUS "Found MySQL++: ${MYSQLPP_INCLUDE_DIRS}, ${MYSQLPP_LIBRARIES}")
else(MYSQLPP_INCLUDE_DIRS AND MYSQLPP_LIBRARIES)
set(MYSQLPP_FOUND FALSE)
message(STATUS "MySQL++ was not found.")
endif(MYSQLPP_INCLUDE_DIRS AND MYSQLPP_LIBRARIES)
mark_as_advanced(MYSQLPP_INCLUDE_DIRS MYSQLPP_LIBRARIES)