]> git.siccegge.de Git - frida/frida.git/blob - cmake/Modules/FindQuaZip.cmake
Properly move Functionality into FunctionWidget
[frida/frida.git] / cmake / Modules / FindQuaZip.cmake
1 # QUAZIP_FOUND - QuaZip library was found
2 # QUAZIP_INCLUDE_DIR - Path to QuaZip include dir
3 # QUAZIP_INCLUDE_DIRS - Path to QuaZip and zlib include dir (combined from QUAZIP_INCLUDE_DIR + ZLIB_INCLUDE_DIR)
4 # QUAZIP_LIBRARIES - List of QuaZip libraries
5 # QUAZIP_ZLIB_INCLUDE_DIR - The include dir of zlib headers
6
7
8 IF (QUAZIP_INCLUDE_DIRS AND QUAZIP_LIBRARIES)
9 # in cache already
10 SET(QUAZIP_FOUND TRUE)
11 ELSE (QUAZIP_INCLUDE_DIRS AND QUAZIP_LIBRARIES)
12 IF (WIN32)
13 FIND_PATH(QUAZIP_LIBRARY_DIR
14 WIN32_DEBUG_POSTFIX d
15 NAMES libquazip.dll
16 HINTS "C:/Programme/" "C:/Program Files"
17 PATH_SUFFIXES QuaZip/lib
18 )
19 FIND_LIBRARY(QUAZIP_LIBRARIES NAMES libquazip.dll HINTS ${QUAZIP_LIBRARY_DIR})
20 FIND_PATH(QUAZIP_INCLUDE_DIR NAMES quazip.h HINTS ${QUAZIP_LIBRARY_DIR}/../ PATH_SUFFIXES include/quazip)
21 FIND_PATH(QUAZIP_ZLIB_INCLUDE_DIR NAMES zlib.h)
22 ELSE(WIN32)
23 FIND_PACKAGE(PkgConfig)
24 # pkg_check_modules(PC_QCA2 QUIET qca2)
25 pkg_check_modules(PC_QUAZIP quazip)
26 FIND_LIBRARY(QUAZIP_LIBRARIES
27 WIN32_DEBUG_POSTFIX d
28 NAMES quazip-qt5
29 HINTS /usr/lib /usr/lib64
30 )
31 FIND_PATH(QUAZIP_INCLUDE_DIR quazip.h
32 HINTS /usr/include /usr/local/include
33 PATH_SUFFIXES quazip
34 )
35 FIND_PATH(QUAZIP_ZLIB_INCLUDE_DIR zlib.h HINTS /usr/include /usr/local/include)
36 ENDIF (WIN32)
37 INCLUDE(FindPackageHandleStandardArgs)
38 SET(QUAZIP_INCLUDE_DIRS ${QUAZIP_INCLUDE_DIR} ${QUAZIP_ZLIB_INCLUDE_DIR})
39 find_package_handle_standard_args(QUAZIP DEFAULT_MSG QUAZIP_LIBRARIES QUAZIP_INCLUDE_DIR QUAZIP_ZLIB_INCLUDE_DIR QUAZIP_INCLUDE_DIRS)
40 ENDIF (QUAZIP_INCLUDE_DIRS AND QUAZIP_LIBRARIES)