zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

Findzlib.cmake (1432B)


      1 # - Find zlib
      2 # Find the native ZLIB includes and library
      3 #
      4 #  ZLIB_INCLUDE_DIRS - where to find zlib.h, etc.
      5 #  ZLIB_LIBRARIES    - List of libraries when using zlib.
      6 #  ZLIB_FOUND        - True if zlib found.
      7 
      8 #=============================================================================
      9 # Copyright 2001-2009 Kitware, Inc.
     10 #
     11 # Distributed under the OSI-approved BSD License (the "License");
     12 # see accompanying file Copyright.txt for details.
     13 #
     14 # This software is distributed WITHOUT ANY WARRANTY; without even the
     15 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     16 # See the License for more information.
     17 #=============================================================================
     18 # (To distributed this file outside of CMake, substitute the full
     19 #  License text for the above reference.)
     20 
     21 IF (ZLIB_INCLUDE_DIR)
     22   # Already in cache, be silent
     23   SET(ZLIB_FIND_QUIETLY TRUE)
     24 ENDIF (ZLIB_INCLUDE_DIR)
     25 
     26 FIND_PATH(ZLIB_INCLUDE_DIR zlib.h)
     27 
     28 SET(ZLIB_NAMES z zlib zdll)
     29 FIND_LIBRARY(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} )
     30 MARK_AS_ADVANCED( ZLIB_LIBRARY ZLIB_INCLUDE_DIR )
     31 
     32 # Per-recommendation
     33 SET(ZLIB_INCLUDE_DIRS "${ZLIB_INCLUDE_DIR}")
     34 SET(ZLIB_LIBRARIES    "${ZLIB_LIBRARY}")
     35 
     36 # handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if
     37 # all listed variables are TRUE
     38 INCLUDE(FindPackageHandleStandardArgs)
     39 FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB DEFAULT_MSG ZLIB_LIBRARIES ZLIB_INCLUDE_DIRS)