-
Notifications
You must be signed in to change notification settings - Fork 88
/
Copy pathFindSISL.cmake
74 lines (60 loc) · 1.67 KB
/
FindSISL.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
# - Find SISL
# Find the SISL includes and library
#
# SISL_INCLUDE_DIR - Where to find SISL includes
# SISL_LIBRARIES - List of libraries when using SISL
# SISL_FOUND - True if SISL was found
IF(SISL_INCLUDE_DIR)
SET(SISL_FIND_QUIETLY TRUE)
ENDIF(SISL_INCLUDE_DIR)
FIND_PATH(SISL_INCLUDE_DIR "sisl.h"
PATHS
$ENV{SISL_HOME}/include
~/Library/Frameworks/include
/Library/Frameworks/include
/usr/local/include
/usr/include
/sw/include # Fink
/opt/local/include # DarwinPorts
/opt/csw/include # Blastwave
/opt/include
DOC "SISL - Headers"
)
SET(SISL_NAMES sisl)
SET(SISL_DBG_NAMES sisl)
FIND_LIBRARY(SISL_LIBRARY NAMES ${SISL_NAMES}
PATHS
$ENV{SISL_HOME}
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
PATH_SUFFIXES lib lib64
DOC "SISL - Library"
)
INCLUDE(FindPackageHandleStandardArgs)
IF(MSVC)
# VisualStudio needs a debug version
FIND_LIBRARY(SISL_LIBRARY_DEBUG NAMES ${SISL_DBG_NAMES}
PATHS
$ENV{SISL_HOME}/lib
DOC "SISL - Library (Debug)"
)
IF(SISL_LIBRARY_DEBUG AND SISL_LIBRARY)
SET(SISL_LIBRARIES optimized ${SISL_LIBRARY} debug ${SISL_LIBRARY_DEBUG})
ENDIF(SISL_LIBRARY_DEBUG AND SISL_LIBRARY)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SISL DEFAULT_MSG SISL_LIBRARY SISL_LIBRARY_DEBUG SISL_INCLUDE_DIR)
MARK_AS_ADVANCED(SISL_LIBRARY SISL_LIBRARY_DEBUG SISL_INCLUDE_DIR)
ELSE(MSVC)
# rest of the world
SET(SISL_LIBRARIES ${SISL_LIBRARY})
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SISL DEFAULT_MSG SISL_LIBRARY SISL_INCLUDE_DIR)
MARK_AS_ADVANCED(SISL_LIBRARY SISL_INCLUDE_DIR)
ENDIF(MSVC)
IF(SISL_FOUND)
SET(SISL_INCLUDE_DIRS ${SISL_INCLUDE_DIR})
ENDIF(SISL_FOUND)