File: zlib.cmake

package info (click to toggle)
yubihsm-shell 2.7.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,020 kB
  • sloc: ansic: 41,745; sh: 2,030; cpp: 528; makefile: 18; xml: 16
file content (15 lines) | stat: -rw-r--r-- 635 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
macro(find_zlib)
    if(MSVC)
        if (NOT ZLIB_LIB_DIR AND NOT ZLIB_INCLUDE_DIR)
            message(FATAL_ERROR "Missing 'ZLIB_LIB_DIR' and 'ZLIB_INCLUDE_DIR' options to CMake command. Aborting...")
        else (NOT ZLIB_LIB_DIR AND NOT ZLIB_INCLUDE_DIR)
            find_library(ZLIB zlib PATHS ${ZLIB_LIB_DIR})
            set(ZLIB_LIBS ${ZLIB})
            include_directories(${ZLIB_INCLUDE_DIR})
        endif (NOT ZLIB_LIB_DIR AND NOT ZLIB_INCLUDE_DIR)
    else (MSVC)
        find_package(ZLIB REQUIRED)
        set(ZLIB_LIBS ${ZLIB_LIBRARIES})
        include_directories(${ZLIB_INCLUDE_DIRS})
    endif (MSVC)
endmacro()