From 1d514b5b39d59bc27dc3bd7e36b2301e0a9023d9 Mon Sep 17 00:00:00 2001 From: Majid Khan Date: Thu, 17 Aug 2017 18:55:52 +1000 Subject: [PATCH] removed static zlib --- CHANGELOG.md | 1 - CMakeLists.txt | 3 +- cmake/FindZLIB.cmake | 105 ------------------------------------------- 3 files changed, 1 insertion(+), 108 deletions(-) delete mode 100644 cmake/FindZLIB.cmake diff --git a/CHANGELOG.md b/CHANGELOG.md index 07e483c..4f97efc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,6 @@ ## [4.0.0] - 17-08-2017 ### Changes - All errors are throwing runtime exceptions instead of logging -- zlib linked statically ### Updated - All the compiler warnings are report as error diff --git a/CMakeLists.txt b/CMakeLists.txt index c7c431f..c178b73 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,6 @@ include_directories (${CMAKE_BINARY_DIR}) include_directories (${CMAKE_SOURCE_DIR}) include(FindPackageHandleStandardArgs) -include(FindZLIB) # We need C++11 macro(require_cpp11) @@ -117,7 +116,7 @@ set_target_properties(ripe PROPERTIES target_link_libraries(ripe ${CRYPTOPP_LIBRARIES} - ${ZLIB_STATIC_LIB} + ${ZLIB_LIBRARIES} ) target_compile_definitions(ripe PRIVATE diff --git a/cmake/FindZLIB.cmake b/cmake/FindZLIB.cmake deleted file mode 100644 index db6990d..0000000 --- a/cmake/FindZLIB.cmake +++ /dev/null @@ -1,105 +0,0 @@ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Tries to find ZLIB headers and libraries. -# -# Usage of this module as follows: -# -# find_package(ZLIB) -# -# Variables used by this module, they can change the default behaviour and need -# to be set before calling find_package: -# -# ZLIB_HOME - When set, this path is inspected instead of standard library -# locations as the root of the ZLIB installation. -# The environment variable ZLIB_HOME overrides this variable. -# -# - Find ZLIB (zlib.h, libz.a, libz.so, and libz.so.1) -# This module defines -# ZLIB_INCLUDE_DIR, directory containing headers -# ZLIB_LIBS, directory containing zlib libraries -# ZLIB_STATIC_LIB, path to libz.a -# ZLIB_SHARED_LIB, path to libz's shared library -# ZLIB_FOUND, whether zlib has been found - -if( NOT "${ZLIB_HOME}" STREQUAL "") - file( TO_CMAKE_PATH "${ZLIB_HOME}" _native_path ) - list( APPEND _zlib_roots ${_native_path} ) -elseif ( ZLIB_HOME ) - list( APPEND _zlib_roots ${ZLIB_HOME} ) -endif() - -# Try the parameterized roots, if they exist -if ( _zlib_roots ) - find_path( ZLIB_INCLUDE_DIR NAMES zlib.h - PATHS ${_zlib_roots} NO_DEFAULT_PATH - PATH_SUFFIXES "include" ) - find_library( ZLIB_LIBRARIES NAMES libz.a zlib - PATHS ${_zlib_roots} NO_DEFAULT_PATH - PATH_SUFFIXES "lib" ) -else () - find_path( ZLIB_INCLUDE_DIR NAMES zlib.h ) - # Only look for the static library - find_library( ZLIB_LIBRARIES NAMES libz.a zlib ) -endif () - - -if (ZLIB_INCLUDE_DIR AND (PARQUET_MINIMAL_DEPENDENCY OR ZLIB_LIBRARIES)) - set(ZLIB_FOUND TRUE) - get_filename_component( ZLIB_LIBS ${ZLIB_LIBRARIES} PATH ) - set(ZLIB_HEADER_NAME zlib.h) - set(ZLIB_HEADER ${ZLIB_INCLUDE_DIR}/${ZLIB_HEADER_NAME}) - set(ZLIB_LIB_NAME z) - if (MSVC) - if (NOT ZLIB_MSVC_STATIC_LIB_SUFFIX) - set(ZLIB_MSVC_STATIC_LIB_SUFFIX libstatic) - endif() - set(ZLIB_MSVC_SHARED_LIB_SUFFIX lib) - endif() - set(ZLIB_STATIC_LIB ${ZLIB_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${ZLIB_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}) - set(ZLIB_SHARED_LIB ${ZLIB_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${ZLIB_MSVC_SHARED_LIB_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}) -else () - set(ZLIB_FOUND FALSE) -endif () - -if (ZLIB_FOUND) - if (NOT ZLIB_FIND_QUIETLY) - if (PARQUET_MINIMAL_DEPENDENCY) - message(STATUS "Found the ZLIB header: ${ZLIB_HEADER}") - else() - message(STATUS "Found the ZLIB library: ${ZLIB_LIBRARIES}") - endif () - endif () -else () - if (NOT ZLIB_FIND_QUIETLY) - set(ZLIB_ERR_MSG "Could not find the ZLIB library. Looked in ") - if ( _zlib_roots ) - set(ZLIB_ERR_MSG "${ZLIB_ERR_MSG} in ${_zlib_roots}.") - else () - set(ZLIB_ERR_MSG "${ZLIB_ERR_MSG} system search paths.") - endif () - if (ZLIB_FIND_REQUIRED) - message(FATAL_ERROR "${ZLIB_ERR_MSG}") - else (ZLIB_FIND_REQUIRED) - message(STATUS "${ZLIB_ERR_MSG}") - endif (ZLIB_FIND_REQUIRED) - endif () -endif () - -mark_as_advanced( - ZLIB_INCLUDE_DIR - ZLIB_LIBS - ZLIB_LIBRARIES - ZLIB_STATIC_LIB - ZLIB_SHARED_LIB -) \ No newline at end of file