File: FindQuaZip.cmake

package info (click to toggle)
ckb-next 0.4.3%2Bdfsg.1-0.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 4,428 kB
  • sloc: cpp: 16,823; ansic: 10,448; sh: 205; xml: 121; python: 21; makefile: 9
file content (51 lines) | stat: -rw-r--r-- 2,436 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#   Copyright (C) 2005-2012 Sergey A. Tachenov
#   
#   This program is free software; you can redistribute it and/or modify it
#   under the terms of the GNU Lesser General Public License as published by
#   the Free Software Foundation; either version 2 of the License, or (at
#   your option) any later version.
#   
#   This program is distributed in the hope that it will be useful, but
#   WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
#   General Public License for more details.
#   
#   You should have received a copy of the GNU Lesser General Public License
#   along with this program; if not, write to the Free Software Foundation,
#   Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

# QuaZip_FOUND               - QuaZip library was found
# QuaZip_INCLUDE_DIR         - Path to QuaZip include dir
# QuaZip_INCLUDE_DIRS        - Path to QuaZip and zlib include dir (combined from QuaZip_INCLUDE_DIR + ZLIB_INCLUDE_DIR)
# QuaZip_LIBRARIES           - List of QuaZip libraries
# QuaZip_ZLIB_INCLUDE_DIR    - The include dir of zlib headers


IF (QuaZip_LIBRARIES)
    # in cache already
    SET(QuaZip_FOUND TRUE)
ELSE (QuaZip_LIBRARIES)
    # First try to find QuaZip 1.0
    find_package(QuaZip-Qt5 QUIET)
    IF(QuaZip-Qt5_FOUND)
        message("-- Found QuaZip: QuaZip::QuaZip")
        SET(QuaZip_FOUND TRUE)
        SET(QuaZip_LIBRARIES "QuaZip::QuaZip" CACHE INTERNAL "")
    ELSE ()
        set(QuaZip_LIB_VERSION_SUFFIX 5)
        FIND_LIBRARY(QuaZip_LIBRARIES
                WIN32_DEBUG_POSTFIX d
                NAMES quazip${QuaZip_LIB_VERSION_SUFFIX} libquazip.dylib
                HINTS /usr/lib /usr/lib64 /usr/local/opt/lib
                PATH_SUFFIXES quazip
                )
        FIND_PATH(QuaZip_INCLUDE_DIR quazip.h
                HINTS /usr/include /usr/local/include /usr/local/bin /usr/local/opt/include
                PATH_SUFFIXES quazip quazip${QuaZip_LIB_VERSION_SUFFIX}
                )
        FIND_PATH(QuaZip_ZLIB_INCLUDE_DIR zlib.h HINTS /usr/include /usr/local/include)
        INCLUDE(FindPackageHandleStandardArgs)
        SET(QuaZip_INCLUDE_DIRS ${QuaZip_INCLUDE_DIR} ${QuaZip_ZLIB_INCLUDE_DIR})
        find_package_handle_standard_args(QuaZip DEFAULT_MSG QuaZip_LIBRARIES QuaZip_INCLUDE_DIR QuaZip_ZLIB_INCLUDE_DIR QuaZip_INCLUDE_DIRS)
    ENDIF ()
ENDIF (QuaZip_LIBRARIES)