Skip to content

Commit

Permalink
Merge pull request #18 from awslabs/be_nice_to_package_managers_and_t…
Browse files Browse the repository at this point in the history
…heyll_be_nice_to_you

Made the LibCrypto finder be specific to the package installing it so…
  • Loading branch information
JonathanHenson authored Sep 17, 2019
2 parents 556f4fc + 2fe50f2 commit 7e2e4f4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion cmake/aws-c-cal-config.cmake
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down

0 comments on commit 7e2e4f4

Please sign in to comment.