diff --git a/CMakeLists.txt b/CMakeLists.txt index 74d63236..6d8e449d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -101,10 +101,14 @@ else () elseif(NOT USE_OPENSSL AND IN_SOURCE_BUILD) if (TARGET crypto) message(STATUS "Using libcrypto from AWS-LC") + set(PLATFORM_LIBS crypto) + elseif(AWSLC_PREBUILT) + message(STATUS "Using prebuilt libcrypto from AWS-LC") + find_package(crypto REQUIRED) + set(PLATFORM_LIBS AWS::crypto) else() message(FATAL_ERROR "Target crypto is not defined, failed to find libcrypto.") endif() - set(PLATFORM_LIBS crypto) else() # note aws_use_package() does this for you, except it appends to the public link targets # which we probably don't want for this case where we want the crypto dependency private