PageRenderTime 6ms CodeModel.GetById 2ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/CMakeModules/FindQuaZip.cmake

http://github.com/tomahawk-player/tomahawk
CMake | 40 lines | 31 code | 2 blank | 7 comment | 0 complexity | 045b5c654c8d35c1b83e66edfae339ef MD5 | raw file
 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
 8IF (QUAZIP_INCLUDE_DIRS AND QUAZIP_LIBRARIES)
 9	# in cache already
10	SET(QUAZIP_FOUND TRUE)
11ELSE (QUAZIP_INCLUDE_DIRS AND QUAZIP_LIBRARIES)
12	IF (WIN32)
13		FIND_PATH(QUAZIP_LIBRARY_DIR
14			WIN32_DEBUG_POSTFIX d
15            NAMES libquazip5.dll
16			HINTS "C:/Programme/" "C:/Program Files"
17			PATH_SUFFIXES QuaZip/lib
18		)
19        FIND_LIBRARY(QUAZIP_LIBRARIES NAMES libquazip5.dll HINTS ${QUAZIP_LIBRARY_DIR})
20		FIND_PATH(QUAZIP_INCLUDE_DIR NAMES quazip.h HINTS ${QUAZIP_LIBRARY_DIR}/../ PATH_SUFFIXES include/quazip5)
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 quazip5
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 quazip5
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)
40ENDIF (QUAZIP_INCLUDE_DIRS AND QUAZIP_LIBRARIES)