diff --git a/crt/CMakeLists.txt b/crt/CMakeLists.txt index 6dc50883..875068d3 100644 --- a/crt/CMakeLists.txt +++ b/crt/CMakeLists.txt @@ -30,9 +30,9 @@ include(CTest) # (On Windows and Apple we use the default OS libraries) if(UNIX AND NOT APPLE) option(USE_OPENSSL "Set this if you want to use your system's OpenSSL compatible libcrypto" OFF) + include(AwsPrebuildDependency) if(NOT USE_OPENSSL) - include(AwsPrebuildDependency) set(AWSLC_CMAKE_ARGUMENTS -DDISABLE_GO=ON # Build without using Go, we don't want the extra dependency @@ -54,8 +54,14 @@ if(UNIX AND NOT APPLE) ) endif() - set(UNSAFE_TREAT_WARNINGS_AS_ERRORS OFF CACHE BOOL "") - add_subdirectory(s2n) + # prebuild s2n-tls. + aws_prebuild_dependency( + DEPENDENCY_NAME S2N + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/s2n + CMAKE_ARGUMENTS + -DUNSAFE_TREAT_WARNINGS_AS_ERRORS=OFF + -DBUILD_TESTING=OFF + ) endif() add_subdirectory(aws-c-common)