Skip to content

Commit

Permalink
Improve find of grass on FreeBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
lbartoletti authored and 3nids committed Jan 29, 2018
1 parent 378191d commit 998c67d
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions cmake/FindGRASS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,20 @@ ENDIF (WIN32)

IF (UNIX)
IF (GRASS_FIND_VERSION EQUAL 7)
FOREACH (PATH /usr/lib64 /usr/lib /usr/local)
FOREACH (VERSION grass70, grass71, grass72)
LIST(APPEND GRASS_PATHS "${PATH}/${VERSION}")
ENDFOREACH (VERSION)
ENDFOREACH (PATH)
ENDIF ()
IF (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
FOREACH (VERSION_MINOR 0 1 2 3 4)
FOREACH (VERSION_BUILD 0 1 2 3 4 5)
LIST (APPEND GRASS_PATHS /usr/local/grass-${GRASS_FIND_VERSION}.${VERSION_MINOR}.${VERSION_BUILD})
ENDFOREACH (VERSION_BUILD)
ENDFOREACH(VERSION_MINOR)
ELSE (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
FOREACH (PATH /usr/lib64 /usr/lib)
FOREACH (VERSION grass70, grass71, grass72)
LIST(APPEND GRASS_PATHS "${PATH}/${VERSION}")
ENDFOREACH (VERSION)
ENDFOREACH (PATH)
ENDIF (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
ENDIF (GRASS_FIND_VERSION EQUAL 7)
ENDIF (UNIX)

IF (APPLE)
Expand Down

0 comments on commit 998c67d

Please sign in to comment.