Skip to content

Commit c0090d8

Browse files
committed
Also let CMake find grass libs in default system location
1 parent 853e913 commit c0090d8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cmake/FindGRASS.cmake

+7
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,14 @@ MACRO (CHECK_GRASS G_PREFIX)
4141
MARK_AS_ADVANCED ( GRASS_LIBRARY${GRASS_FIND_VERSION}_${LIB} )
4242

4343
SET(LIB_PATH NOTFOUND)
44+
# FIND_PATH and FIND_LIBRARY normally search standard locations
45+
# before the specified paths. To search non-standard paths first,
46+
# FIND_* is invoked first with specified paths and NO_DEFAULT_PATH
47+
# and then again with no specified paths to search the default
48+
# locations. When an earlier FIND_* succeeds, subsequent FIND_*s
49+
# searching for the same item do nothing.
4450
FIND_LIBRARY(LIB_PATH NAMES grass_${LIB} PATHS ${G_PREFIX}/lib NO_DEFAULT_PATH)
51+
FIND_LIBRARY(LIB_PATH NAMES grass_${LIB} PATHS ${G_PREFIX}/lib)
4552

4653
IF(LIB_PATH)
4754
SET(GRASS_LIBRARY${GRASS_FIND_VERSION}_${LIB} ${LIB_PATH})

0 commit comments

Comments
 (0)