1# 2# Find the ODBC driver manager includes and library. 3# 4# ODBC is an open standard for connecting to different databases in a 5# semi-vendor-independent fashion. First you install the ODBC driver 6# manager. Then you need a driver for each separate database you want 7# to connect to (unless a generic one works). VTK includes neither 8# the driver manager nor the vendor-specific drivers: you have to find 9# those yourself. 10# 11# This module defines 12# ODBC_INCLUDE_DIRECTORIES, where to find sql.h 13# ODBC_LIBRARIES, the libraries to link against to use ODBC 14# ODBC_FOUND. If false, you cannot build anything that requires MySQL. 15 16# also defined, but not for general use is 17# ODBC_LIBRARY, where to find the ODBC driver manager library. 18 19SET( ODBC_FOUND 0 ) 20 21FIND_PATH(ODBC_INCLUDE_DIRECTORIES sql.h 22 /usr/include 23 /usr/include/odbc 24 /usr/local/include 25 /usr/local/include/odbc 26 /usr/local/odbc/include 27 "C:/Program Files/ODBC/include" 28 "C:/ODBC/include" 29 DOC "Specify the directory containing sql.h." 30) 31 32FIND_LIBRARY( ODBC_LIBRARY 33 NAMES odbc iodbc unixodbc 34 PATHS 35 /usr/lib 36 /usr/lib/odbc 37 /usr/local/lib 38 /usr/local/lib/odbc 39 /usr/local/odbc/lib 40 "C:/Program Files/ODBC/lib" 41 "C:/ODBC/lib/debug" 42 DOC "Specify the ODBC driver manager library here." 43) 44 45IF (ODBC_LIBRARY) 46 IF (ODBC_INCLUDE_DIRECTORIES) 47 SET( ODBC_FOUND 1 ) 48 ENDIF () 49ENDIF () 50 51SET( ODBC_LIBRARIES ${ODBC_LIBRARY} ) 52 53MARK_AS_ADVANCED( ODBC_FOUND ODBC_LIBRARY ODBC_EXTRA_LIBRARIES ODBC_INCLUDE_DIRECTORIES ) 54 55