Skip to content

Commit

Permalink
cmake: report geos version
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jul 15, 2014
1 parent 21420c6 commit 0529f11
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmake/FindGEOS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ ELSE(WIN32)
ENDIF(UNIX)
ENDIF(WIN32)

IF(GEOS_INCLUDE_DIR AND NOT GEOS_VERSION)
FILE(READ ${GEOS_INCLUDE_DIR}/geos/version.h VERSIONFILE)
STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" GEOS_VERSION ${VERSIONFILE})
ENDIF(GEOS_INCLUDE_DIR AND NOT GEOS_VERSION)

IF (GEOS_INCLUDE_DIR AND GEOS_LIBRARY)
SET(GEOS_FOUND TRUE)
Expand All @@ -164,7 +168,7 @@ ENDIF (GEOS_INCLUDE_DIR AND GEOS_LIBRARY)
IF (GEOS_FOUND)

IF (NOT GEOS_FIND_QUIETLY)
MESSAGE(STATUS "Found GEOS: ${GEOS_LIBRARY}")
MESSAGE(STATUS "Found GEOS: ${GEOS_LIBRARY} (${GEOS_VERSION})")
ENDIF (NOT GEOS_FIND_QUIETLY)

ELSE (GEOS_FOUND)
Expand Down

0 comments on commit 0529f11

Please sign in to comment.