Skip to content

Commit

Permalink
Merge pull request planetbeing#1 from glandium/static-openssl
Browse files Browse the repository at this point in the history
dmg: Allow to statically link against OpenSSL
  • Loading branch information
indygreg authored Jan 5, 2018
2 parents ba04b00 + 2ee3277 commit a745334
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions dmg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@ INCLUDE(FindOpenSSL)
INCLUDE(FindZLIB)
INCLUDE(FindBZip2)

FIND_LIBRARY(CRYPTO_LIBRARIES crypto
PATHS
/usr/lib
/usr/local/lib
)

IF(NOT ZLIB_FOUND)
message(FATAL_ERROR "zlib is required for dmg!")
ENDIF(NOT ZLIB_FOUND)
Expand All @@ -27,7 +21,7 @@ add_library(dmg adc.c base64.c checksum.c dmgfile.c dmglib.c filevault.c io.c pa
IF(OPENSSL_FOUND)
add_definitions(-DHAVE_CRYPT)
include_directories(${OPENSSL_INCLUDE_DIR})
target_link_libraries(dmg ${CRYPTO_LIBRARIES})
target_link_libraries(dmg ${OPENSSL_CRYPTO_LIBRARY} $<$<BOOL:${OPENSSL_USE_STATIC_LIBS}>:${CMAKE_DL_LIBS}>)
IF(WIN32)
TARGET_LINK_LIBRARIES(dmg gdi32)
ENDIF(WIN32)
Expand Down

0 comments on commit a745334

Please sign in to comment.