Skip to content
Permalink
Browse files
cmake: report geos version
  • Loading branch information
jef-n committed Jul 15, 2014
1 parent 21420c6 commit 0529f117d135beeca593c77009eef96288423698
Showing with 5 additions and 1 deletion.
  1. +5 −1 cmake/FindGEOS.cmake
@@ -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)
@@ -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)

0 comments on commit 0529f11

Please sign in to comment.