Skip to content
Permalink
Browse files
cmake: report geos version with c-api header only (followup 0529f11)
  • Loading branch information
jef-n committed Jul 15, 2014
1 parent 0837945 commit 1692cc36b915e19f87a88109bca2b2cf365b2aa2
Showing with 3 additions and 2 deletions.
  1. +3 −2 cmake/FindGEOS.cmake
@@ -157,8 +157,9 @@ ELSE(WIN32)
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})
FILE(READ ${GEOS_INCLUDE_DIR}/geos_c.h VERSIONFILE)
STRING(REGEX MATCH "#define GEOS_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]+\"" GEOS_VERSION ${VERSIONFILE})
STRING(REGEX MATCH "[0-9]+\\.[0-9]\\.[0-9]+" GEOS_VERSION ${GEOS_VERSION})
ENDIF(GEOS_INCLUDE_DIR AND NOT GEOS_VERSION)

IF (GEOS_INCLUDE_DIR AND GEOS_LIBRARY)

0 comments on commit 1692cc3

Please sign in to comment.