2007-01-09 02:39:15 +00:00
|
|
|
|
|
|
|
# CMake module to search for GEOS library
|
|
|
|
#
|
|
|
|
# If it's found it sets GEOS_FOUND to TRUE
|
|
|
|
# and following variables are set:
|
|
|
|
# GEOS_INCLUDE_DIR
|
|
|
|
# GEOS_LIBRARY
|
|
|
|
|
|
|
|
|
2008-05-07 04:57:13 +00:00
|
|
|
# FIND_PATH and FIND_LIBRARY normally search standard locations
|
|
|
|
# before the specified paths. To search non-standard paths first,
|
|
|
|
# FIND_* is invoked first with specified paths and NO_DEFAULT_PATH
|
|
|
|
# and then again with no specified paths to search the default
|
|
|
|
# locations. When an earlier FIND_* succeeds, subsequent FIND_*s
|
|
|
|
# searching for the same item do nothing.
|
2008-08-20 12:31:37 +00:00
|
|
|
FIND_PATH(GEOS_INCLUDE_DIR geos_c.h
|
2008-03-10 16:08:43 +00:00
|
|
|
"$ENV{LIB_DIR}/include"
|
2007-10-11 18:06:07 +00:00
|
|
|
#mingw
|
|
|
|
c:/msys/local/include
|
2008-03-10 16:08:43 +00:00
|
|
|
NO_DEFAULT_PATH
|
2007-10-01 00:13:34 +00:00
|
|
|
)
|
2008-08-20 12:31:37 +00:00
|
|
|
FIND_PATH(GEOS_INCLUDE_DIR geos_c.h)
|
2007-10-01 00:13:34 +00:00
|
|
|
|
2008-08-20 12:31:37 +00:00
|
|
|
FIND_LIBRARY(GEOS_LIBRARY NAMES geos_c PATHS
|
2008-03-10 16:08:43 +00:00
|
|
|
"$ENV{LIB_DIR}/lib"
|
2007-10-11 18:06:07 +00:00
|
|
|
#mingw
|
|
|
|
c:/msys/local/lib
|
2008-03-10 16:08:43 +00:00
|
|
|
NO_DEFAULT_PATH
|
2007-10-01 00:13:34 +00:00
|
|
|
)
|
2008-08-20 12:31:37 +00:00
|
|
|
FIND_LIBRARY(GEOS_LIBRARY NAMES geos_c)
|
2007-01-09 02:39:15 +00:00
|
|
|
|
|
|
|
IF (GEOS_INCLUDE_DIR AND GEOS_LIBRARY)
|
|
|
|
SET(GEOS_FOUND TRUE)
|
|
|
|
ENDIF (GEOS_INCLUDE_DIR AND GEOS_LIBRARY)
|
|
|
|
|
|
|
|
|
|
|
|
IF (GEOS_FOUND)
|
|
|
|
|
|
|
|
IF (NOT GEOS_FIND_QUIETLY)
|
|
|
|
MESSAGE(STATUS "Found GEOS: ${GEOS_LIBRARY}")
|
|
|
|
ENDIF (NOT GEOS_FIND_QUIETLY)
|
|
|
|
|
|
|
|
ELSE (GEOS_FOUND)
|
|
|
|
|
|
|
|
IF (GEOS_FIND_REQUIRED)
|
|
|
|
MESSAGE(FATAL_ERROR "Could not find GEOS")
|
|
|
|
ENDIF (GEOS_FIND_REQUIRED)
|
|
|
|
|
|
|
|
ENDIF (GEOS_FOUND)
|