File: FindGEOS.cmake

package info (click to toggle)
mapserver 8.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,492 kB
  • sloc: ansic: 137,759; cpp: 124,149; python: 3,175; xml: 1,722; yacc: 1,114; cs: 1,001; sh: 836; lex: 778; java: 588; perl: 489; makefile: 383; tcl: 158; ruby: 55
file content (34 lines) | stat: -rw-r--r-- 1,094 bytes parent folder | download | duplicates (11)
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
# Find the native GEOS(Geometry Engine - Open Source) includes and libraries.
#
# This module defines:
#
# GEOS_INCLUDE_DIR, where to find geos.h, etc.
# GEOS_LIBRARY, libraries to link against to use GEOS, using the geos_c library
# GEOS_FOUND, True if found, false if one of the above are not found.

#---
# Find include path:
# Note: Version < 3.3.0 do not have geos.h in the geos sub directory; hence,
# the check for both "geos/geos.h" and "geos.h".
#---
find_path( GEOS_INCLUDE_DIR geos_c.h
           PATHS 
           /usr/include
           /usr/local/include
           SUFFIXES geos)

# Find GEOS C library:
find_library( GEOS_LIBRARY NAMES geos_c geos_c_i
              PATHS 
              /usr/lib64 
              /usr/lib 
              /usr/local/lib )

set(GEOS_INCLUDE_DIRS ${GEOS_INCLUDE_DIR})
set(GEOS_LIBRARIES ${GEOS_LIBRARY})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args( GEOS DEFAULT_MSG 
                                   GEOS_LIBRARY 
                                   GEOS_INCLUDE_DIR )

MARK_AS_ADVANCED(GEOS_LIBRARY GEOS_INCLUDE_DIR)