FindOpenSSL: cleanup path hints
-only use Windows-specific paths on Windows -recode the contents of $ENV{PROGRAMFILES} to be a valid CMake path before using it
This commit is contained in:
parent
c78a7d11dd
commit
fc798ed64f
|
@ -29,25 +29,34 @@ if (UNIX)
|
||||||
pkg_check_modules(_OPENSSL QUIET openssl)
|
pkg_check_modules(_OPENSSL QUIET openssl)
|
||||||
endif (UNIX)
|
endif (UNIX)
|
||||||
|
|
||||||
# http://www.slproweb.com/products/Win32OpenSSL.html
|
IF (WIN32)
|
||||||
SET(_OPENSSL_ROOT_HINTS
|
# http://www.slproweb.com/products/Win32OpenSSL.html
|
||||||
|
SET(_OPENSSL_ROOT_HINTS
|
||||||
${OPENSSL_ROOT_DIR}
|
${OPENSSL_ROOT_DIR}
|
||||||
"[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 (32-bit)_is1;Inno Setup: App Path]"
|
||||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (64-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
|
ENV OPENSSL_ROOT_DIR
|
||||||
)
|
)
|
||||||
SET(_OPENSSL_ROOT_PATHS
|
FILE(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles)
|
||||||
"$ENV{PROGRAMFILES}/OpenSSL"
|
SET(_OPENSSL_ROOT_PATHS
|
||||||
"$ENV{PROGRAMFILES}/OpenSSL-Win32"
|
"${_programfiles}/OpenSSL"
|
||||||
"$ENV{PROGRAMFILES}/OpenSSL-Win64"
|
"${_programfiles}/OpenSSL-Win32"
|
||||||
|
"${_programfiles}/OpenSSL-Win64"
|
||||||
"C:/OpenSSL/"
|
"C:/OpenSSL/"
|
||||||
"C:/OpenSSL-Win32/"
|
"C:/OpenSSL-Win32/"
|
||||||
"C:/OpenSSL-Win64/"
|
"C:/OpenSSL-Win64/"
|
||||||
)
|
)
|
||||||
SET(_OPENSSL_ROOT_HINTS_AND_PATHS
|
UNSET(_programfiles)
|
||||||
|
SET(_OPENSSL_ROOT_HINTS_AND_PATHS
|
||||||
HINTS ${_OPENSSL_ROOT_HINTS}
|
HINTS ${_OPENSSL_ROOT_HINTS}
|
||||||
PATHS ${_OPENSSL_ROOT_PATHS}
|
PATHS ${_OPENSSL_ROOT_PATHS}
|
||||||
)
|
)
|
||||||
|
ELSE ()
|
||||||
|
SET(_OPENSSL_ROOT_HINTS
|
||||||
|
${OPENSSL_ROOT_DIR}
|
||||||
|
ENV OPENSSL_ROOT_DIR
|
||||||
|
)
|
||||||
|
ENDIF ()
|
||||||
|
|
||||||
FIND_PATH(OPENSSL_INCLUDE_DIR
|
FIND_PATH(OPENSSL_INCLUDE_DIR
|
||||||
NAMES
|
NAMES
|
||||||
|
|
Loading…
Reference in New Issue