-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFindDTCURL.cmake
More file actions
70 lines (61 loc) · 1.82 KB
/
FindDTCURL.cmake
File metadata and controls
70 lines (61 loc) · 1.82 KB
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
# - Find dtcurl
# Find the native DTCURL headers and libraries.
#
# DTCURL_INCLUDE_DIRS - where to find dtcurl/dtcurl_api.h, etc.
# DTCURL_LIBRARIES - List of libraries when using dtcurl.
# DTCURL_FOUND - True if dtcurl found.
# Look for the header file.
FIND_PATH(DTCURL_INCLUDE_DIR dtcurl/dtcurl_api.h
$ENV{INCLUDE}
"$ENV{LIB_DIR}/include"
/usr/local/include
/usr/include
#mingw
c:/msys/local/include
NO_DEFAULT_PATH
)
MARK_AS_ADVANCED(DTCURL_INCLUDE_DIR)
# Look for the library.
FIND_LIBRARY(DTCURL_LIBRARY NAMES dtcurl libdtcurl_imp PATHS
$ENV{LIB}
"$ENV{LIB_DIR}/lib"
/usr/local/lib
/usr/lib
c:/msys/local/lib
NO_DEFAULT_PATH
)
MARK_AS_ADVANCED(DTCURL_LIBRARY)
IF(DTCURL_INCLUDE_DIR)
MESSAGE(STATUS "dtcurl include was found")
ENDIF(DTCURL_INCLUDE_DIR)
IF(DTCURL_LIBRARY)
MESSAGE(STATUS "dtcurl lib was found")
ENDIF(DTCURL_LIBRARY)
# Copy the results to the output variables.
IF(DTCURL_INCLUDE_DIR AND DTCURL_LIBRARY)
SET(DTCURL_FOUND 1)
SET(DTCURL_LIBRARIES ${DTCURL_LIBRARY})
SET(DTCURL_INCLUDE_DIRS ${DTCURL_INCLUDE_DIR})
ELSE(DTCURL_INCLUDE_DIR AND DTCURL_LIBRARY)
SET(DTCURL_FOUND 0)
SET(DTCURL_LIBRARIES)
SET(DTCURL_INCLUDE_DIRS)
ENDIF(DTCURL_INCLUDE_DIR AND DTCURL_LIBRARY)
# Report the results.
IF(DTCURL_FOUND)
IF (NOT DTCURL_FIND_QUIETLY)
MESSAGE(STATUS "Found DTCURL: ${DTCURL_LIBRARY}")
ENDIF (NOT DTCURL_FIND_QUIETLY)
ELSE(DTCURL_FOUND)
SET(DTCURL_DIR_MESSAGE "DTCURL was not found.")
IF(DTCURL_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "${DTCURL_DIR_MESSAGE}")
ELSE(DTCURL_FIND_REQUIRED)
IF(NOT DTCURL_FIND_QUIETLY)
MESSAGE(STATUS "${DTCURL_DIR_MESSAGE}")
ENDIF(NOT DTCURL_FIND_QUIETLY)
# Avoid cmake complaints if DTCURL is not found
SET(DTCURL_INCLUDE_DIR "")
SET(DTCURL_LIBRARY "")
ENDIF(DTCURL_FIND_REQUIRED)
ENDIF(DTCURL_FOUND)