Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix logic for finding grass 8 on non-FreeBSD unix environments
  • Loading branch information
nyalldawson committed Apr 9, 2023
1 parent f0d31ed commit 31729cc
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions cmake/FindGRASS.cmake
Expand Up @@ -158,19 +158,19 @@ IF (WIN32)
ENDIF (WIN32)

IF (UNIX)
IF (GRASS_FIND_VERSION EQUAL 7)
IF (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
IF (GRASS_FIND_VERSION EQUAL 7)
FOREACH (VERSION_MINOR 9 8 7 6 5 4 3 2 1 0)
LIST (APPEND GRASS_PATHS /usr/local/grass${GRASS_FIND_VERSION}${VERSION_MINOR})
ENDFOREACH(VERSION_MINOR)
ENDIF (GRASS_FIND_VERSION EQUAL 7)
ELSE (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
FOREACH (VERSION_MINOR 9 8 7 6 5 4 3 2 1 0)
LIST (APPEND GRASS_PATHS /usr/local/grass${GRASS_FIND_VERSION}${VERSION_MINOR})
FOREACH (PATH /usr/lib64 /usr/lib)
LIST(APPEND GRASS_PATHS "${PATH}/grass${GRASS_FIND_VERSION}${VERSION_MINOR}")
ENDFOREACH (PATH)
ENDFOREACH(VERSION_MINOR)
ELSE (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
FOREACH (PATH /usr/lib64 /usr/lib)
FOREACH (VERSION grass76, grass74, grass72, grass70)
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 31729cc

Please sign in to comment.