forked from dcoeurjo/QuasiAffineTransform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FindVol.cmake
59 lines (44 loc) · 1.12 KB
/
FindVol.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
#-*-cmake-*-
#
# Test for LibVol libraries
#
# Once loaded this will define
# VOL_FOUND - system has libvol
# VOL_INCLUDE_DIR - include directory
# VOL_LIBRARY_DIR - library directory
# VOL_LIBRARIES - libraries you need to link to
#
SET(VOL_FOUND "NO" )
FIND_PATH( VOL_INCLUDE_DIR vol.h
"$ENV{VOL_LOCATION}"
"$ENV{VOL_LOCATION}/include"
"$ENV{VOL_HOME}/include"
/usr/include/
/usr/local/include/
)
FIND_LIBRARY(Vol vol
PATHS
"$ENV{VOL_LOCATION}/"
"$ENV{VOL_LOCATION}/lib"
"$ENV{VOL_HOME}/lib"
DOC "libvol library"
)
SET(VOL_LIBRARIES ${Vol} )
IF (VOL_INCLUDE_DIR)
IF(VOL_LIBRARIES)
SET(VOL_FOUND "YES")
GET_FILENAME_COMPONENT(VOL_LIBRARY_DIR ${Vol} PATH)
ENDIF(VOL_LIBRARIES)
ENDIF(VOL_INCLUDE_DIR)
IF(NOT VOL_FOUND)
# make FIND_PACKAGE friendly
IF(NOT Vol_FIND_QUIETLY)
IF(Vol_FIND_REQUIRED)
MESSAGE(FATAL_ERROR
"libvol required, please specify it's location with VOL_HOME, VOL_LOCATION")
ELSE(Vol_FIND_REQUIRED)
MESSAGE(STATUS "libvol was not found.")
ENDIF(Vol_FIND_REQUIRED)
ENDIF(NOT Vol_FIND_QUIETLY)
ENDIF(NOT VOL_FOUND)
#####