Fixed: Debug version of mysqlclient

This commit is contained in:
kervala 2010-09-20 21:37:15 +02:00
parent b2f006b9ca
commit 7e70573c6e

View file

@ -23,12 +23,26 @@ ELSE(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
$ENV{SystemDrive}/MySQL/*/include)
IF(WIN32 AND MSVC)
FIND_LIBRARY(MYSQL_LIBRARIES NAMES libmysql mysqlclient
FIND_LIBRARY(MYSQL_LIBRARY_RELEASE NAMES libmysql mysqlclient
PATHS
$ENV{ProgramFiles}/MySQL/*/lib/opt
$ENV{SystemDrive}/MySQL/*/lib/opt)
FIND_LIBRARY(MYSQL_LIBRARY_DEBUG NAMES libmysqld mysqlclientd
PATHS
$ENV{ProgramFiles}/MySQL/*/lib/opt
$ENV{SystemDrive}/MySQL/*/lib/opt)
ELSE(WIN32 AND MSVC)
FIND_LIBRARY(MYSQL_LIBRARIES NAMES mysqlclient
FIND_LIBRARY(MYSQL_LIBRARY_RELEASE NAMES mysqlclient
PATHS
/usr/lib
/usr/local/lib
/usr/lib/mysql
/usr/local/lib/mysql
/opt/local/lib/mysql5/mysql
)
FIND_LIBRARY(MYSQL_LIBRARY_DEBUG NAMES mysqlclientd
PATHS
/usr/lib
/usr/local/lib
@ -38,6 +52,15 @@ ELSE(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
)
ENDIF(WIN32 AND MSVC)
IF(MYSQL_INCLUDE_DIR)
IF(MYSQL_LIBRARY_RELEASE)
SET(MYSQL_LIBRARIES "optimized;${MYSQL_LIBRARY_RELEASE}")
IF(MYSQL_LIBRARY_DEBUG)
SET(MYSQL_LIBRARIES "${MYSQL_LIBRARIES};debug;${MYSQL_LIBRARY_DEBUG}")
ENDIF(MYSQL_LIBRARY_DEBUG)
ENDIF(MYSQL_LIBRARY_RELEASE)
ENDIF(MYSQL_INCLUDE_DIR)
IF(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
SET(MYSQL_FOUND TRUE)
MESSAGE(STATUS "Found MySQL: ${MYSQL_INCLUDE_DIR}, ${MYSQL_LIBRARIES}")
@ -46,6 +69,6 @@ ELSE(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
MESSAGE(STATUS "MySQL not found.")
ENDIF(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
MARK_AS_ADVANCED(MYSQL_INCLUDE_DIR MYSQL_LIBRARIES)
MARK_AS_ADVANCED(MYSQL_LIBRARY_RELEASE MYSQL_LIBRARY_DEBUG)
ENDIF(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)