Fixed: Debug version of mysqlclient
This commit is contained in:
parent
69585a8421
commit
b1d55cb083
1 changed files with 26 additions and 3 deletions
|
@ -23,12 +23,26 @@ ELSE(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
|
||||||
$ENV{SystemDrive}/MySQL/*/include)
|
$ENV{SystemDrive}/MySQL/*/include)
|
||||||
|
|
||||||
IF(WIN32 AND MSVC)
|
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
|
PATHS
|
||||||
$ENV{ProgramFiles}/MySQL/*/lib/opt
|
$ENV{ProgramFiles}/MySQL/*/lib/opt
|
||||||
$ENV{SystemDrive}/MySQL/*/lib/opt)
|
$ENV{SystemDrive}/MySQL/*/lib/opt)
|
||||||
ELSE(WIN32 AND MSVC)
|
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
|
PATHS
|
||||||
/usr/lib
|
/usr/lib
|
||||||
/usr/local/lib
|
/usr/local/lib
|
||||||
|
@ -38,6 +52,15 @@ ELSE(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
|
||||||
)
|
)
|
||||||
ENDIF(WIN32 AND MSVC)
|
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)
|
IF(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
|
||||||
SET(MYSQL_FOUND TRUE)
|
SET(MYSQL_FOUND TRUE)
|
||||||
MESSAGE(STATUS "Found MySQL: ${MYSQL_INCLUDE_DIR}, ${MYSQL_LIBRARIES}")
|
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.")
|
MESSAGE(STATUS "MySQL not found.")
|
||||||
ENDIF(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
|
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)
|
ENDIF(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
|
||||||
|
|
Loading…
Reference in a new issue