-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6d033e0
commit 541993c
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FIND_PACKAGE(ZLIB) | ||
|
||
IF(MINIZIP_DIR) | ||
FIND_PATH(MINIZIP_INCLUDE_DIR_zh NAMES minizip/zip.h NO_DEFAULT_PATH PATHS ${MINIZIP_DIR}/include ${MINIZIP_DIR}) | ||
FIND_PATH(MINIZIP_INCLUDE_DIR_unzh NAMES minizip/unzip.h NO_DEFAULT_PATH PATHS ${MINIZIP_DIR}/include ${MINIZIP_DIR}) | ||
FIND_LIBRARY(MINIZIP_LIBRARY NAMES minizip NO_DEFAULT_PATH PATHS ${MINIZIP_DIR}/lib ${MINIZIP_DIR}) | ||
ELSE() | ||
FIND_PATH(MINIZIP_INCLUDE_DIR_zh NAMES minizip/zip.h PATHS /include /usr/include /usr/local/include /opt/local/include) | ||
FIND_PATH(MINIZIP_INCLUDE_DIR_unzh NAMES minizip/unzip.h PATHS /include /usr/include /usr/local/include /opt/local/include) | ||
FIND_LIBRARY(MINIZIP_LIBRARY NAMES minizip) | ||
ENDIF() | ||
|
||
IF (MINIZIP_INCLUDE_DIR_unzh AND MINIZIP_INCLUDE_DIR_zh AND MINIZIP_LIBRARY) | ||
SET(MINIZIP_INCLUDE_DIRS "${MINIZIP_INCLUDE_DIR_unzh};${MINIZIP_INCLUDE_DIR_zh};${ZLIB_INCLUDE_DIRS}") | ||
SET(MINIZIP_LIBRARIES ${MINIZIP_LIBRARY} ${ZLIB_LIBRARIES}) | ||
SET(MINIZIP_FOUND true) | ||
ENDIF() | ||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Minizip DEFAULT_MSG MINIZIP_LIBRARIES MINIZIP_INCLUDE_DIRS) |