-
Notifications
You must be signed in to change notification settings - Fork 0
/
FindSpatialindex.cmake
42 lines (37 loc) · 1.22 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
# 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 spatialindex/SpatialIndex.h PATHS
/usr/include
/usr/local/include
"$ENV{LIB_DIR}/include"
"$ENV{INCLUDE}"
"$ENV{OSGEO4W_ROOT}/include"
)
FIND_LIBRARY(SPATIALINDEX_LIBRARY NAMES spatialindex_i spatialindex spatialindex-64 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 Spatialindex: ${SPATIALINDEX_LIBRARY}")
ENDIF (NOT SPATIALINDEX_FIND_QUIETLY)
ELSE (SPATIALINDEX_FOUND)
IF (SPATIALINDEX_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find Spatialindex")
ENDIF (SPATIALINDEX_FIND_REQUIRED)
ENDIF (SPATIALINDEX_FOUND)