CMake: FindMySQL, added Program Files(x86)/MySQL to search path for MySQL

This commit is contained in:
Torndeco 2015-05-04 15:36:21 +02:00 committed by Pascal Bach
parent 6fb5ecca03
commit 9d28a6aa1f

View File

@ -1,3 +1,6 @@
SET(BINDIR32_ENV_NAME "ProgramFiles(x86)")
SET(BINDIR32 $ENV{${BINDIR32_ENV_NAME}})
find_path(MYSQL_INCLUDE_DIR mysql.h
/usr/include/mysql
/usr/local/include/mysql
@ -8,6 +11,7 @@ find_path(MYSQL_INCLUDE_DIR mysql.h
$ENV{MYSQL_INCLUDE_DIR}
$ENV{MYSQL_DIR}/include
$ENV{ProgramFiles}/MySQL/*/include
${BINDIR32}/MySQL/include
$ENV{SystemDrive}/MySQL/*/include)
if (WIN32)
@ -26,6 +30,7 @@ if (WIN32)
$ENV{MYSQL_DIR}/libmysql/${libsuffixBuild}
$ENV{MYSQL_DIR}/client/${libsuffixBuild}
$ENV{ProgramFiles}/MySQL/*/lib/${libsuffixDist}
${BINDIR32}/MySQL/lib
$ENV{SystemDrive}/MySQL/*/lib/${libsuffixDist})
else (WIN32)
find_library(MYSQL_LIB NAMES mysqlclient_r