From 70129af847e571be5258075de9dd8d922d54bd40 Mon Sep 17 00:00:00 2001 From: Matt Witherspoon <32485495+spoonincode@users.noreply.github.com> Date: Tue, 27 Sep 2022 21:39:19 -0400 Subject: [PATCH] manually set PKG_CONFIG_PATH for openssl on macOS --- libraries/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libraries/CMakeLists.txt b/libraries/CMakeLists.txt index 28f2aeb0fd..0343e5c01c 100644 --- a/libraries/CMakeLists.txt +++ b/libraries/CMakeLists.txt @@ -31,6 +31,12 @@ if(eos-vm IN_LIST EOSIO_WASM_RUNTIMES OR eos-vm-jit IN_LIST EOSIO_WASM_RUNTIMES) add_subdirectory( eos-vm ) endif() +#yubihsm's openssl discovery is via pkg-config instead of find_package. Help it out on macOS otherwise openssl's pkgconfig +# files may not be found down in the /opt/homebrew/opt directory +if(APPLE) + get_filename_component(OPENSSL_LIB_PATH "${OPENSSL_CRYPTO_LIBRARY}" DIRECTORY) + set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${OPENSSL_LIB_PATH}/pkgconfig") +endif() set(ENABLE_STATIC ON) set(CMAKE_MACOSX_RPATH OFF) set(BUILD_ONLY_LIB ON CACHE BOOL "Library only build")