Skip to content

Commit

Permalink
Statically link libcrypto on s2n platforms (#66)
Browse files Browse the repository at this point in the history
* Statically link libcrypto on s2n platforms

* manual find_library, we need the static lib always
  • Loading branch information
Justin Boswell authored Jun 20, 2019
1 parent 0cf31dc commit a505d4a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -189,3 +189,12 @@ target_link_libraries(${CMAKE_PROJECT_NAME} AWS::aws-c-mqtt)

find_package(aws-c-http REQUIRED)
target_link_libraries(${CMAKE_PROJECT_NAME} AWS::aws-c-http)

if (UNIX AND NOT APPLE)
find_library(LIBCRYPTO_STATIC
NAMES libcrypto.a
PATHS ${AWS_DEPS_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}
NO_DEFAULT_PATH)
message(STATUS "LIBCRYPTO_STATIC: ${LIBCRYPTO_STATIC}")
target_link_libraries(${CMAKE_PROJECT_NAME} ${LIBCRYPTO_STATIC})
endif()

0 comments on commit a505d4a

Please sign in to comment.