Skip to content

Commit

Permalink
cmake: report geos version with c-api header only (followup 0529f11)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jul 15, 2014
1 parent 0837945 commit 1692cc3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmake/FindGEOS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1692cc3

Please sign in to comment.