fix(Build/Cmake): CMake now uses the Windows env vars (#3419)

* CMake wasn't able to find the enviroment variables which are noted in
the Wiki e.g MYSQL_INCLUDE_DIR or MYSQL_LIBRARY. Further I added
another variable for OpenSSL which is OPENSSL_ROOT_DIR.
This change allows .zip installations with a custom PATH.
This commit is contained in:
Malte Grave
2021-01-11 22:50:07 +01:00
committed by GitHub
parent 8e06b08416
commit 2010308b7c
2 changed files with 3 additions and 0 deletions

View File

@@ -154,6 +154,7 @@ find_path(MYSQL_INCLUDE_DIR
"$ENV{ProgramFiles}/MySQL/*/include"
"$ENV{SystemDrive}/MySQL/*/include"
"c:/msys/local/include"
"$ENV{MYSQL_INCLUDE_DIR}"
DOC
"Specify the directory containing mysql.h."
)
@@ -197,6 +198,7 @@ if( WIN32 )
"$ENV{ProgramFiles}/MySQL/*/lib/opt"
"$ENV{SystemDrive}/MySQL/*/lib/opt"
"c:/msys/local/include"
"$ENV{MYSQL_LIBRARY}"
DOC "Specify the location of the mysql library here."
)
endif( WIN32 )

View File

@@ -28,6 +28,7 @@
SET(_OPENSSL_ROOT_HINTS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;Inno Setup: App Path]"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (64-bit)_is1;Inno Setup: App Path]"
"$ENV{OPENSSL_ROOT_DIR}"
)
IF(PLATFORM EQUAL 64)