From 13b769c326f2087c87cdb78ab2fae47ec17e4b18 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Tue, 30 May 2006 09:02:38 +0000 Subject: Move cmake duplicate check here: -> FindTagLib: need by kdemultimedia/amarok -> FindPostgreSQL: need by koffice-kexi/amarok -> FindMySQL: need by koffice-kexi/amarok -> FindMusicBrainz: need by amarok/kdemultimedia -> FindUSB: need by kdebase/amarok -> FindBerkeleyDB: need by kbabel/kdevelop -> FindRUBY: need by koffice-kross/amarok I will remove them from kde module after new snapshot (next monday) svn path=/trunk/KDE/kdelibs/; revision=546487 --- modules/FindMySQL.cmake | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 modules/FindMySQL.cmake (limited to 'modules/FindMySQL.cmake') diff --git a/modules/FindMySQL.cmake b/modules/FindMySQL.cmake new file mode 100644 index 00000000..151251be --- /dev/null +++ b/modules/FindMySQL.cmake @@ -0,0 +1,28 @@ +# - Find MySQL +# Find the MySQL includes and client library +# This module defines +# MYSQL_INCLUDE_DIR, where to find mysql.h +# MYSQL_LIBRARIES, the libraries needed to use MySQL. +# MYSQL_FOUND, If false, do not try to use MySQL. + +find_path(MYSQL_INCLUDE_DIR mysql.h + /usr/include/mysql + /usr/local/include/mysql +) + +find_library(MYSQL_LIBRARIES NAMES mysqlclient + PATHS + /usr/lib/mysql + /usr/local/lib/mysql +) + +if(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES) + set(MYSQL_FOUND TRUE) + message(STATUS "Found MySQL: ${MYSQL_INCLUDE_DIR}, ${MYSQL_LIBRARIES}") +else(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES) + set(MYSQL_FOUND FALSE) + message(STATUS "MySQL not found.") +endif(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES) + +mark_as_advanced(MYSQL_INCLUDE_DIR MYSQL_LIBRARIES) + -- cgit v1.2.1