diff options
Diffstat (limited to 'cmake/macros/FindOpenSSL.cmake')
-rw-r--r-- | cmake/macros/FindOpenSSL.cmake | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cmake/macros/FindOpenSSL.cmake b/cmake/macros/FindOpenSSL.cmake index fef3779b129..25e98f42d2c 100644 --- a/cmake/macros/FindOpenSSL.cmake +++ b/cmake/macros/FindOpenSSL.cmake @@ -33,13 +33,17 @@ SET(_OPENSSL_ROOT_HINTS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (64-bit)_is1;Inno Setup: App Path]" ) +set(_OPENSSL_MSI_INSTALL_GUID "") + IF(PLATFORM EQUAL 64) + set(_OPENSSL_MSI_INSTALL_GUID "117551DB-A110-4BBD-BB05-CFE0BCB3ED31") SET(_OPENSSL_ROOT_PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (64-bit)_is1;InstallLocation]" "C:/OpenSSL-Win64/" "C:/OpenSSL/" ) ELSE() + set(_OPENSSL_MSI_INSTALL_GUID "A1EEC576-43B9-4E75-9E02-03DA542D2A38") SET(_OPENSSL_ROOT_PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;InstallLocation]" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;InstallLocation]" @@ -47,6 +51,13 @@ ELSE() ) ENDIF() +# If OpenSSL was installed using .msi package instead of .exe, Inno Setup registry values are not written to Uninstall\OpenSSL +# but because it is only a shim around Inno Setup it does write the location of uninstaller which we can use to determine path +get_filename_component(_OPENSSL_MSI_INSTALL_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Inno Setup MSIs\\${_OPENSSL_MSI_INSTALL_GUID};]" DIRECTORY) +if(NOT _OPENSSL_MSI_INSTALL_PATH STREQUAL "/") + list(APPEND _OPENSSL_ROOT_PATHS ${_OPENSSL_MSI_INSTALL_PATH}) +endif() + FIND_PATH(OPENSSL_ROOT_DIR NAMES include/openssl/ssl.h |