From 2fe50f24a21dbc8cd11726a5b774a8d88bba3785 Mon Sep 17 00:00:00 2001 From: "Jonathan M. Henson" Date: Tue, 17 Sep 2019 08:52:29 -0700 Subject: [PATCH] Made the LibCrypto finder be specific to the package installing it so certain package managers wouldn't freak out when S2N and aws-c-cal install identical artifacts to cmake module path. --- CMakeLists.txt | 4 ++-- cmake/aws-c-cal-config.cmake | 2 +- cmake/modules/{FindLibCrypto.cmake => FindLibCryptoCAL.cmake} | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) rename cmake/modules/{FindLibCrypto.cmake => FindLibCryptoCAL.cmake} (97%) diff --git a/CMakeLists.txt b/CMakeLists.txt index ee822cfd..5b709eea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,7 +85,7 @@ else () file(GLOB AWS_CAL_OS_SRC "source/opensslcrypto/*.c" ) - find_package(LibCrypto REQUIRED) + find_package(LibCryptoCAL REQUIRED) set(PLATFORM_LIBS LibCrypto::Crypto dl) endif() endif() @@ -149,7 +149,7 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-config.cmake" COMPONENT Development) list(APPEND EXPORT_MODULES - "cmake/modules/FindLibCrypto.cmake" + "cmake/modules/FindLibCryptoCAL.cmake" ) install(FILES ${EXPORT_MODULES} diff --git a/cmake/aws-c-cal-config.cmake b/cmake/aws-c-cal-config.cmake index 22e8c779..8368fe63 100644 --- a/cmake/aws-c-cal-config.cmake +++ b/cmake/aws-c-cal-config.cmake @@ -1,7 +1,7 @@ include(CMakeFindDependencyMacro) if (NOT BYO_CRYPTO AND NOT WIN32 AND NOT APPLE) - find_dependency(LibCrypto) + find_dependency(LibCryptoCAL) endif() if (BUILD_SHARED_LIBS) diff --git a/cmake/modules/FindLibCrypto.cmake b/cmake/modules/FindLibCryptoCAL.cmake similarity index 97% rename from cmake/modules/FindLibCrypto.cmake rename to cmake/modules/FindLibCryptoCAL.cmake index bded5a22..eb22f629 100644 --- a/cmake/modules/FindLibCrypto.cmake +++ b/cmake/modules/FindLibCryptoCAL.cmake @@ -74,6 +74,9 @@ mark_as_advanced( if(LibCrypto_FOUND OR LIBCRYPTO_FOUND) set(LibCrypto_FOUND true) set(LIBCRYPTO_FOUND true) + set(LibCryptoCAL_FOUND true) + set(LIBCRYPTOCAL_FOUND true) + message(STATUS "LibCrypto Include Dir: ${LibCrypto_INCLUDE_DIR}") message(STATUS "LibCrypto Shared Lib: ${LibCrypto_SHARED_LIBRARY}") message(STATUS "LibCrypto Static Lib: ${LibCrypto_STATIC_LIBRARY}")