From a576fe6a3b8c66fe292d02abbcbcd7a91d8d6358 Mon Sep 17 00:00:00 2001
From: open-license-manager <rillf@maildrop.cc>
Date: 摹曛, 16 10月 2014 04:53:49 +0800
Subject: [PATCH] zlib

---
 CMakeLists.txt |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 503ae24..e108a21 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -80,10 +80,13 @@
 	#find a static version of openssl crypto library
 	find_package(OpenSSL REQUIRED)
 	include_directories(${OPENSSL_INCLUDE_DIR})
-	#-lssl for backward compatibility with old openssl versions
-	list(APPEND EXTERNAL_LIBS ${OPENSSL_LIBRARIES})
 	list(APPEND EXTERNAL_LIBS ${OPENSSL_CRYPTO_LIBRARY})
 	MESSAGE(STATUS "Found openssl version ${OPENSSL_VERSION}")
+	
+	#Zlib required when openssl version < 1.0.1f
+	find_package(ZLIB REQUIRED)
+	list(APPEND EXTERNAL_LIBS ${ZLIB_LIBRARIES})
+	
 	if(USE_DBUS_IDENTIFIER)
 	    FIND_PACKAGE(Dbus REQUIRED)
 	    add_definitions(-DUSE_DBUS)
@@ -141,8 +144,6 @@
 add_subdirectory(test)
 
 #include(build/modules/CmakeDebugVariables.txt)
-
-message("")
 message( STATUS "C compiler: " ${CMAKE_C_COMPILER})
 message( STATUS "C compiler flags: " ${CMAKE_C_FLAGS})
 message( STATUS "CXX compiler: " ${CMAKE_CXX_COMPILER})

--
Gitblit v1.9.1