-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFindZipper.cmake
83 lines (71 loc) · 1.65 KB
/
FindZipper.cmake
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
SET(SEARCH_PATH_ZIPPER "" CACHE PATH "Additional Zipper search path")
SET(ZIPPER_DIR_SEARCH
$ENV{ZIPPER_ROOT}
${SEARCH_PATH_ZIPPER}
${ZIPPER_DIR_SEARCH}
)
if(CMAKE_SYSTEM MATCHES "Windows")
if (EXISTS "C:/")
SET(ZIPPER_DIR_SEARCH
${ZIPPER_DIR_SEARCH}
"C:/Development/SLEEK-TOOLS/zipper/dist/"
"C:/Development/Software/zipper/"
)
endif()
if (EXISTS "D:/")
SET(ZIPPER_DIR_SEARCH
${ZIPPER_DIR_SEARCH}
"D:/Development/SLEEK-TOOLS/zipper/dist/"
"D:/Development/Software/zipper/"
)
endif()
find_path(Zipper_INCLUDE_PATH zipper/zipper.h
PATH_SUFFIXES
include
PATHS
${ZIPPER_DIR_SEARCH}
)
find_library(Zipper_LIB_DEBUG libZipper-staticd
PATH_SUFFIXES
lib
PATHS
${ZIPPER_DIR_SEARCH}
)
find_library(Zipper_LIB_RELEASE libZipper-static
PATH_SUFFIXES
lib
PATHS
${ZIPPER_DIR_SEARCH}
)
set(Zipper_LIB
debug ${Zipper_LIB_DEBUG}
optimized ${Zipper_LIB_RELEASE}
CACHE STRING "Zipper library")
endif()
if (CMAKE_SYSTEM MATCHES "Linux" )
SET(ZIPPER_DIR_SEARCH
${ZIPPER_DIR_SEARCH}
/usr/local/
/usr/
)
find_path(Zipper_INCLUDE_PATH zipper/zipper.h
PATH_SUFFIXES
include
PATHS
${ZIPPER_DIR_SEARCH}
)
find_library(Zipper_LIB Zipper-static
PATH_SUFFIXES
lib
PATHS
${ZIPPER_DIR_SEARCH}
)
# set(Zipper_LIB
# ${Zipper_LIB_RELEASE}
# CACHE STRING "Zipper library")
endif(CMAKE_SYSTEM MATCHES "Linux")
# handle the QUIETLY and REQUIRED arguments and set ZIPPER_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Zipper DEFAULT_MSG Zipper_INCLUDE_PATH)
MARK_AS_ADVANCED(Zipper_INCLUDE_PATH)