Skip to content

Commit

Permalink
Postpone printing an error when OpenSSL not found on macOS (#652)
Browse files Browse the repository at this point in the history
  • Loading branch information
ken-matsui authored Jul 16, 2022
1 parent a4bac93 commit 31583e2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cmake/AddOpenSSL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ message(CHECK_START "Adding OpenSSL")
list(APPEND CMAKE_MESSAGE_INDENT " ")

if (APPLE)
if (EXISTS "${POAC_HOMEBREW_ROOT_PATH}/openssl")
set(OPENSSL_ROOT_DIR "${POAC_HOMEBREW_ROOT_PATH}/openssl")
else ()
message(FATAL_ERROR "OpenSSL not found. Please install it by `brew install openssl@3`")
endif ()
set(OPENSSL_ROOT_DIR "${POAC_HOMEBREW_ROOT_PATH}/openssl")
endif ()
if (DEFINED OPENSSL_ROOT_DIR)
set(OPENSSL_LIBRARIES ${OPENSSL_ROOT_DIR}/lib)
Expand Down Expand Up @@ -40,6 +36,10 @@ if (OPENSSL_FOUND)
else ()
message(CHECK_FAIL "not found")
list(APPEND missingDependencies openssl)

if (APPLE)
message(FATAL_ERROR "OpenSSL not found. Please install it by `brew install openssl@3`")
endif ()
endif ()

list(POP_BACK CMAKE_MESSAGE_INDENT)

0 comments on commit 31583e2

Please sign in to comment.