From c245834bc4e6749751a7c217360a332b4994f0ca Mon Sep 17 00:00:00 2001 From: Steffan Karger Date: Thu, 14 Nov 2013 10:34:46 +0100 Subject: [PATCH] Link against ZLIB when zlib is used Signed-off-by: Paul Bakker --- library/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index baaf822b4..c4060d1a5 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -82,6 +82,10 @@ endif(NOT USE_SHARED_POLARSSL_LIBRARY) target_link_libraries(polarssl ${libs}) +if(ZLIB_FOUND) +target_link_libraries(polarssl ${ZLIB_LIBRARIES}) +endif(ZLIB_FOUND) + install(TARGETS polarssl DESTINATION ${LIB_INSTALL_DIR} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)