forked from Eyescale/CMake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FindSpatialIndex.cmake
43 lines (38 loc) · 1.23 KB
/
FindSpatialIndex.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
# Find Spatialindex
# ~~~~~~~~
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
# Once run this will define:
#
# SPATIALINDEX_FOUND = system has Spatialindex lib
# SPATIALINDEX_LIBRARY = full path to the Spatialindex library
# SPATIALINDEX_INCLUDE_DIR = where to find headers
#
FIND_PATH(SPATIALINDEX_INCLUDE_DIR NAMES SpatialIndex.h PATHS
/usr/include
/usr/local/include
"$ENV{LIB_DIR}/include"
"$ENV{INCLUDE}"
"$ENV{OSGEO4W_ROOT}/include"
PATH_SUFFIXES spatialindex
)
FIND_LIBRARY(SPATIALINDEX_LIBRARY NAMES spatialindex_i spatialindex PATHS
/usr/lib
/usr/local/lib
"$ENV{LIB_DIR}/lib"
"$ENV{LIB}/lib"
"$ENV{OSGEO4W_ROOT}/lib"
)
IF (SPATIALINDEX_INCLUDE_DIR AND SPATIALINDEX_LIBRARY)
SET(SPATIALINDEX_FOUND TRUE)
ENDIF (SPATIALINDEX_INCLUDE_DIR AND SPATIALINDEX_LIBRARY)
IF (SPATIALINDEX_FOUND)
IF (NOT SPATIALINDEX_FIND_QUIETLY)
MESSAGE(STATUS "Found libSpatialIndex: ${SPATIALINDEX_LIBRARY}")
ENDIF (NOT SPATIALINDEX_FIND_QUIETLY)
ELSE (SPATIALINDEX_FOUND)
IF (SPATIALINDEX_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find libSpatialIndex")
ENDIF (SPATIALINDEX_FIND_REQUIRED)
ENDIF (SPATIALINDEX_FOUND)