Skip to content

Commit

Permalink
Merge pull request #471 from ghutchis/more-openssl-windows
Browse files Browse the repository at this point in the history
Use installed OpenSSL not Qt version (OpenSSL v3)
  • Loading branch information
ghutchis authored Feb 9, 2024
2 parents 47650ab + c344ba1 commit 33effc3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 17 deletions.
10 changes: 3 additions & 7 deletions avogadro/lastinstall/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,10 @@ if((APPLE OR WIN32) AND NOT ${CMAKE_VERSION} VERSION_LESS 2.8.8)

# grab OpenSSL for Windows
if(WIN32)
if(EXISTS "${Qt5_Dir}/../../Tools/OpenSSLv3/Win_x64/")
set(OPENSSL_ROOT_DIR "${Qt5_Dir}/../../Tools/OpenSSLv3/Win_x64/")
find_package(OpenSSL REQUIRED)
if (DEFINED OPENSSL_FOUND)
set(OPENSSL_ROOT_DIR "${OPENSSL_INCLUDE_DIR}/.." CACHE PATH "OpenSSL root directory")
message(STATUS "Using OpenSSL from ${OPENSSL_ROOT_DIR}")
elseif(DEFINED $ENV{OPENSSL_ROOT_DIR})
set(OPENSSL_ROOT_DIR $ENV{OPENSSL_ROOT_DIR})
message(STATUS "Using OpenSSL from ${OPENSSL_ROOT_DIR}")
endif()
if (DEFINED OPENSSL_ROOT_DIR)
file(GLOB OPENSSL_DLL ${OPENSSL_ROOT_DIR}/bin/*.dll)
install(FILES ${OPENSSL_DLL} DESTINATION ${INSTALL_RUNTIME_DIR})
endif()
Expand Down
13 changes: 3 additions & 10 deletions cmake/AvogadroCPack.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,9 @@ if(INSTALL_BUNDLE_FILES)

# grab OpenSSL for Windows
if(WIN32)
if(EXISTS "${Qt5_Dir}/../../Tools/OpenSSLv3/Win_x64/")
set(OPENSSL_ROOT_DIR "${Qt5_Dir}/../../Tools/OpenSSLv3/Win_x64/")
elseif(DEFINED $ENV{OPENSSL_ROOT_DIR})
set(OPENSSL_ROOT_DIR $ENV{OPENSSL_ROOT_DIR})
elseif(EXISTS "D:/a/avogadroapp/Qt/Tools/OpenSSLv3/Win_x64/")
set(OPENSSL_ROOT_DIR "D:/a/avogadroapp/Qt/Tools/OpenSSLv3/Win_x64")
elseif(EXISTS "D:/a/avogadrolibs/Qt/Tools/OpenSSLv3/Win_x64/")
set(OPENSSL_ROOT_DIR "D:/a/avogadrolibs/Qt/Tools/OpenSSLv3/Win_x64")
endif()
if (DEFINED OPENSSL_ROOT_DIR)
find_package(OpenSSL REQUIRED)
if (DEFINED OPENSSL_FOUND)
set(OPENSSL_ROOT_DIR "${OPENSSL_INCLUDE_DIR}/.." CACHE PATH "OpenSSL root directory")
message(STATUS "Using OpenSSL from ${OPENSSL_ROOT_DIR}")
file(GLOB OPENSSL_DLL ${OPENSSL_ROOT_DIR}/bin/*.dll)
install(FILES ${OPENSSL_DLL} DESTINATION ${INSTALL_RUNTIME_DIR})
Expand Down

0 comments on commit 33effc3

Please sign in to comment.