- Modified CMakeLists to support zlib

This commit is contained in:
Paul Bakker 2012-07-03 15:10:33 +00:00
parent 2770fbd651
commit 92eeea4627
5 changed files with 26 additions and 0 deletions

View file

@ -17,6 +17,8 @@ endif(CMAKE_BUILD_TYPE STREQUAL "Coverage")
option(USE_PKCS11_HELPER_LIBRARY "Build PolarSSL with the pkcs11-helper library." OFF)
option(ENABLE_ZLIB_SUPPORT "Build PolarSSL with zlib library." OFF)
if(LIB_INSTALL_DIR)
else()
set(LIB_INSTALL_DIR lib)
@ -24,6 +26,14 @@ endif()
include_directories(include/)
if(ENABLE_ZLIB_SUPPORT)
find_package(ZLIB)
if(ZLIB_FOUND)
include_directories(ZLIB_INCLUDE_DIR)
endif(ZLIB_FOUND)
endif(ENABLE_ZLIB_SUPPORT)
add_subdirectory(library)
add_subdirectory(include)

View file

@ -6,6 +6,10 @@ if(USE_PKCS11_HELPER_LIBRARY)
set(libs ${libs} pkcs11-helper)
endif(USE_PKCS11_HELPER_LIBRARY)
if(ENABLE_ZLIB_SUPPORT)
set(libs ${libs} ${ZLIB_LIBRARIES})
endif(ENABLE_ZLIB_SUPPORT)
add_executable(ssl_client1 ssl_client1.c)
target_link_libraries(ssl_client1 ${libs})

View file

@ -8,6 +8,10 @@ if(USE_PKCS11_HELPER_LIBRARY)
set(libs ${libs} pkcs11-helper)
endif(USE_PKCS11_HELPER_LIBRARY)
if(ENABLE_ZLIB_SUPPORT)
set(libs ${libs} ${ZLIB_LIBRARIES})
endif(ENABLE_ZLIB_SUPPORT)
add_executable(selftest selftest.c)
target_link_libraries(selftest ${libs})

View file

@ -6,6 +6,10 @@ if(USE_PKCS11_HELPER_LIBRARY)
set(libs ${libs} pkcs11-helper)
endif(USE_PKCS11_HELPER_LIBRARY)
if(ENABLE_ZLIB_SUPPORT)
set(libs ${libs} ${ZLIB_LIBRARIES})
endif(ENABLE_ZLIB_SUPPORT)
add_executable(cert_app cert_app.c)
target_link_libraries(cert_app ${libs})

View file

@ -6,6 +6,10 @@ if(USE_PKCS11_HELPER_LIBRARY)
set(libs ${libs} pkcs11-helper)
endif(USE_PKCS11_HELPER_LIBRARY)
if(ENABLE_ZLIB_SUPPORT)
set(libs ${libs} ${ZLIB_LIBRARIES})
endif(ENABLE_ZLIB_SUPPORT)
function(add_test_suite suite_name)
if(ARGV1)
set(data_name ${ARGV1})