Skip to content

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed
 

‎cmake/FindGRASS.cmake

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ ENDMACRO (CHECK_GRASS)
3939
# search for grass installations
4040

4141
# list of paths which to search - user's choice as first
42-
SET (GRASS_PATHS ${GRASS_PREFIX} /usr/lib/grass c:/msys/local/grass-6.3.cvs)
42+
SET (GRASS_PATHS ${GRASS_PREFIX} /usr/lib/grass c:/msys/local)
4343

4444
# mac-specific path
4545
IF (APPLE)
@@ -60,9 +60,14 @@ ENDIF (WITH_GRASS)
6060

6161
IF (GRASS_FOUND)
6262

63-
# read grass version number and remove trailing newline
64-
FILE (READ ${GRASS_PREFIX}/etc/VERSIONNUMBER GRASS_VERSION)
65-
STRING(REPLACE "\n" "" GRASS_VERSION ${GRASS_VERSION})
63+
IF (NOT WIN32)
64+
# read grass version number and remove trailing newline
65+
FILE (READ ${GRASS_PREFIX}/etc/VERSIONNUMBER GRASS_VERSION)
66+
STRING(REPLACE "\n" "" GRASS_VERSION ${GRASS_VERSION})
67+
ELSE (NOT WIN32)
68+
# TODO: how to find out grass version on win?
69+
SET(GRASS_VERSION "?")
70+
ENDIF (NOT WIN32)
6671

6772
IF (NOT GRASS_FIND_QUIETLY)
6873
MESSAGE(STATUS "Found GRASS: ${GRASS_PREFIX} (${GRASS_VERSION})")

0 commit comments

Comments
 (0)
Please sign in to comment.