File: FindMySQL.cmake

package info (click to toggle)
tarantool 1.5.2.20.g5f5d924-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 26,568 kB
  • ctags: 18,697
  • sloc: ansic: 109,092; sh: 21,312; cpp: 20,633; xml: 9,666; asm: 2,488; python: 2,195; java: 1,759; perl: 1,002; makefile: 679
file content (24 lines) | stat: -rw-r--r-- 708 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
find_path(MYSQL_INCLUDE_DIR
    NAMES mysql.h
    PATH_SUFFIXES mysql
)
find_library(MYSQL_LIBRARIES
    NAMES mysqlclient_r
    PATH_SUFFIXES mysql
)

if(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
    set(MYSQL_FOUND ON)
endif(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)

if(MYSQL_FOUND)
    if (NOT MYSQL_FIND_QUIETLY)
        message(STATUS "Found MySQL includes: ${MYSQL_INCLUDE_DIR}/mysql.h")
        message(STATUS "Found MySQL library: ${MYSQL_LIBRARIES}")
    endif (NOT MYSQL_FIND_QUIETLY)
    set(MYSQL_INCLUDE_DIRS ${MYSQL_INCLUDE_DIR})
else(MYSQL_FOUND)
    if (MYSQL_FIND_REQUIRED)
        message(FATAL_ERROR "Could not find mysql development files")
    endif (MYSQL_FIND_REQUIRED)
endif (MYSQL_FOUND)