Revert "Remove zlib"
This reverts commit d874a1fd14bdf3df8ee232f539ac613adaae648c.
Conflicts:
* CMakeLists.txt:
* ENABLE_ZLIB_SUPPORT: there has been a change immediately after
where it was removed. Just re-add what was removed.
* tests/CMakeLists.txt:
* ENABLE_ZLIB_SUPPORT: there has been a change immediately after
where it was removed. Just re-add what was removed.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6d5332d..4d40eea 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,6 +8,8 @@
# Set the project root directory.
set(MBEDTLS_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+option(ENABLE_ZLIB_SUPPORT "Build mbed TLS with zlib library." OFF)
+
option(ENABLE_PROGRAMS "Build mbed TLS programs." ON)
option(UNSAFE_BUILD "Allow unsafe builds. These builds ARE NOT SECURE." OFF)
@@ -179,6 +181,14 @@
include_directories(include/)
include_directories(library/)
+if(ENABLE_ZLIB_SUPPORT)
+ find_package(ZLIB)
+
+ if(ZLIB_FOUND)
+ include_directories(${ZLIB_INCLUDE_DIR})
+ endif(ZLIB_FOUND)
+endif(ENABLE_ZLIB_SUPPORT)
+
add_subdirectory(include)
add_subdirectory(3rdparty)