view cmake/Modules/FindMySQL.cmake @ 1504:4dff34cd2d3d

Add 3GPP TS 29.215 V15.2.0 (2019-09) Add AVPs: - DRA-Deployment, Enumerated, code 2206, section 5.3.7 - Multiple-BBERF-Action, Enumerated, code 2204, section 5.3.6 - Subsession-Decision-Info, Grouped, code 2200, section 5.3.1 - Subsession-Enforcement-Info, Grouped, code 2201, section 5.3.2 - Subsession-Id, Unsigned32, code 2202, section 5.3.3 - Subsession-Operation, Enumerated, code 2203, section 5.3.4 - DRA-Binding, Enumerated, code 2208, section 5.3.x - PCRF-Address, DiameterIdentity, code 2207, section A.7.3.1.1 - UE-Local-IPv6-Prefix, OctetString, code 2205, section A.8.3.1
author Luke Mewburn <luke@mewburn.net>
date Fri, 03 Apr 2020 16:50:00 +1100
parents 6446c0eea547
children
line wrap: on
line source

# - Find mysqlclient
#
# -*- cmake -*-
#
# Find the native MySQL includes and library
#
#  MySQL_INCLUDE_DIR - where to find mysql.h, etc.
#  MySQL_LIBRARIES   - List of libraries when using MySQL.
#  MySQL_FOUND       - True if MySQL found.

IF (MySQL_INCLUDE_DIR AND MySQL_LIBRARY)
  # Already in cache, be silent
  SET(MySQL_FIND_QUIETLY TRUE)
ENDIF (MySQL_INCLUDE_DIR AND MySQL_LIBRARY)

# Include dir
FIND_PATH(MySQL_INCLUDE_DIR 
  NAMES mysql.h
  PATH_SUFFIXES mysql
)

# Library
#SET(MySQL_NAMES mysqlclient mysqlclient_r)
#SET(MySQL_NAMES mysqlclient_r)
SET(MySQL_NAMES mysqlclient_r mysqlclient)
FIND_LIBRARY(MySQL_LIBRARY
  NAMES ${MySQL_NAMES}
  PATHS /usr/lib /usr/local/lib
  PATH_SUFFIXES mysql
)

IF (MySQL_INCLUDE_DIR AND MySQL_LIBRARY)
  SET(MySQL_FOUND TRUE)
  SET( MySQL_LIBRARIES ${MySQL_LIBRARY} )
ELSE (MySQL_INCLUDE_DIR AND MySQL_LIBRARY)
  SET(MySQL_FOUND FALSE)
  SET( MySQL_LIBRARIES )
ENDIF (MySQL_INCLUDE_DIR AND MySQL_LIBRARY)


IF (MySQL_FOUND)
  IF (NOT MySQL_FIND_QUIETLY)
    MESSAGE(STATUS "Found MySQL: ${MySQL_LIBRARY}")
  ENDIF (NOT MySQL_FIND_QUIETLY)
ELSE (MySQL_FOUND)
  IF (MySQL_FIND_REQUIRED)
    MESSAGE(STATUS "Looked for MySQL libraries named ${MySQL_NAMES}.")
    MESSAGE(FATAL_ERROR "Could NOT find MySQL library")
  ENDIF (MySQL_FIND_REQUIRED)
ENDIF (MySQL_FOUND)

MARK_AS_ADVANCED(
  MySQL_LIBRARY
  MySQL_INCLUDE_DIR
  )

"Welcome to our mercurial repository"