Skip to content
Permalink
Browse files

Ensure GRASS plugin CMake extra includes macro works for all versions

  • Loading branch information
dakcarto committed Nov 25, 2016
1 parent 3f50e83 commit 8c8db0eb517ed5d4d16082f085eafff6a4b52a17
Showing with 2 additions and 1 deletion.
  1. +2 −1 cmake/FindGRASS.cmake
@@ -18,7 +18,8 @@ MACRO (CHECK_GRASS_EXTRA_INCLUDE_DIRS GRASS_VERSION)
AND "${GRASS${GRASS_VERSION}_EXTRA_INCLUDE_DIRS}" STREQUAL "")

FILE(READ ${GRASS_INCLUDE_DIR${GRASS_VERSION}}/Make/Platform.make _platformfile)
STRING(REGEX MATCH "INCLUDE_DIRS *= [^\n]*" _config_includes "${_platformfile}")
STRING(REGEX MATCH "INCLUDE_DIRS *= *[^\n]*" _config_includes "${_platformfile}")
SET(_extra_includes "")
IF(NOT "${_config_includes}" STREQUAL "")
STRING(REGEX REPLACE "INCLUDE_DIRS *= *([^\n]*)" "\\1" _extra_includes "${_config_includes}")
ENDIF()

0 comments on commit 8c8db0e

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