diff options
author | Shauren <none@none> | 2010-06-30 23:14:50 +0200 |
---|---|---|
committer | Shauren <none@none> | 2010-06-30 23:14:50 +0200 |
commit | c0dfc791dec0f33ad623ab3a648dc0ff500cc5ae (patch) | |
tree | 41a8e87c5bc4e7909e9bedd218eaa62a51d88b91 | |
parent | 4cd95932dac8ae8c51ed6f2cbbd2a75aec809fbc (diff) |
OpenSSL windows detection
You have to have x64 version of the library to build in x64 mode (and x86 for win32 build) - affects only windows
--HG--
branch : trunk
-rw-r--r-- | cmake/FindOpenSSL.cmake | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/cmake/FindOpenSSL.cmake b/cmake/FindOpenSSL.cmake index 3014230e1d3..bafe35266d6 100644 --- a/cmake/FindOpenSSL.cmake +++ b/cmake/FindOpenSSL.cmake @@ -15,6 +15,20 @@ if( OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES ) set(OPENSSL_FOUND 1) else( OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES ) set(OPENSSL_FOUND 0) + + if(WIN32) + if(CMAKE_CL_64) + set(tmp_OPENSSL_DIR + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (64-bit)_is1;InstallLocation]/include/openssl" + ) + else() + set(tmp_OPENSSL_DIR + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;InstallLocation]/include/openssl" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;InstallLocation]/include/openssl" + ) + endif() + endif() + find_path(OPENSSL_INCLUDE_DIR NAMES ssl.h @@ -24,9 +38,7 @@ else( OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES ) /usr/local/include /usr/local/include/openssl /usr/local/openssl/include - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (64-bit)_is1;InstallLocation]/include/openssl" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;InstallLocation]/include/openssl" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;InstallLocation]/include/openssl" + ${tmp_OPENSSL_DIR} DOC "Specify the directory containing openssl.h." ) @@ -41,9 +53,7 @@ else( OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES ) /usr/local/lib /usr/local/lib/ssl /usr/local/ssl/lib - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (64-bit)_is1;InstallLocation]/lib" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;InstallLocation]/lib" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;InstallLocation]/lib" + ${tmp_OPENSSL_DIR} DOC "Specify the OpenSSL library here." ) @@ -52,9 +62,7 @@ else( OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES ) NAMES libeay32 PATHS - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (64-bit)_is1;InstallLocation]/lib" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;InstallLocation]/lib" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;InstallLocation]/lib" + ${tmp_OPENSSL_DIR} DOC "if more libraries are necessary to link in a OpenSSL client, specify them here." ) |