From 6c1f69b879685af0ddbd2d2f63050195dfdca3f6 Mon Sep 17 00:00:00 2001
From: Paul Bakker
Date: Mon, 17 Mar 2014 15:11:13 +0100
Subject: [PATCH] MinGW32 static build should link to windows libs and libz
---
library/CMakeLists.txt | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
index 6f7089bfe..cbcfd6953 100644
--- a/library/CMakeLists.txt
+++ b/library/CMakeLists.txt
@@ -94,6 +94,12 @@ endif()
if(USE_STATIC_POLARSSL_LIBRARY)
add_library(${polarssl_static_target} STATIC ${src})
set_target_properties(${polarssl_static_target} PROPERTIES OUTPUT_NAME polarssl)
+ target_link_libraries(${polarssl_static_target} ${libs})
+
+ if(ZLIB_FOUND)
+ target_link_libraries(${polarssl_static_target} ${ZLIB_LIBRARIES})
+ endif(ZLIB_FOUND)
+
install(TARGETS ${polarssl_static_target}
DESTINATION ${LIB_INSTALL_DIR}