Skip to content
Permalink
Browse files

[GRASS] cmake add check if version.h exists

  • Loading branch information
blazek committed Oct 20, 2015
1 parent d2564bb commit 898a7384519c2741220223c3ca9608925f5bd783
Showing with 2 additions and 2 deletions.
  1. +2 −2 cmake/FindGRASS.cmake
@@ -13,7 +13,7 @@ MACRO (CHECK_GRASS G_PREFIX)

#MESSAGE(STATUS "GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION} = ${GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION}}")

IF(GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION})
IF(GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION} AND EXISTS ${GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION}}/grass/version.h)
FILE(READ ${GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION}}/grass/version.h VERSIONFILE)
# We can avoid the following block using version_less version_equal and
# version_greater. Are there compatibility problems?
@@ -95,7 +95,7 @@ MACRO (CHECK_GRASS G_PREFIX)
ENDIF(GRASS_FIND_VERSION EQUAL 6)
ENDIF(GRASS_LIBRARIES_FOUND${GRASS_FIND_VERSION})
ENDIF(GRASS_MAJOR_VERSION${GRASS_FIND_VERSION} EQUAL GRASS_FIND_VERSION)
ENDIF(GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION})
ENDIF(GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION} AND EXISTS ${GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION}}/grass/version.h)

MARK_AS_ADVANCED ( GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION} )
ENDMACRO (CHECK_GRASS)

0 comments on commit 898a738

Please sign in to comment.
You can’t perform that action at this time.