source: trunk/FACT++/cmake/FindMySQL.cmake@ 19779

Last change on this file since 19779 was 19396, checked in by tbretz, 6 years ago
If pkgconf is not installed, this might yield reasonable results.
File size: 758 bytes
Line 
1# Try to find the package via pkg-config
2PKG_CHECK_MODULES(MYSQL mysqlclient QUIET)
3
4# Try to locate the package in the default path
5# and in the path provided by pkg-config
6FIND_PATH(MYSQL_INCLUDE_DIR NAMES mysql.h PATHS ${MYSQL_INCLUDE_DIRS} /usr/include/mysql)
7FIND_LIBRARY(MYSQL_LIBRARY NAMES mysqlclient PATHS ${MYSQL_LIBRARY_DIRS})
8
9# Check if MYSQL_LIBARARY and MYSQL_INCLUDE_DIR is set
10# Print a message otherwise
11#FIND_PACKAGE_HANDLE_STANDARD_ARGS(MySQL DEFAULT_MSG MYSQL_LIBRARY MYSQL_INCLUDE_DIR)
12FIND_PACKAGE_HANDLE_STANDARD_ARGS(MySQL FOUND_VAR MYSQL_FOUND REQUIRED_VARS MYSQL_LIBRARY MYSQL_INCLUDE_DIR VERSION_VAR MYSQL_VERSION)
13
14# Mark those variables to be displayed as 'advanced' in the GUI
15MARK_AS_ADVANCED(MYSQL_LIBRARY MYSQL_INCLUDE_DIR)
Note: See TracBrowser for help on using the repository browser.