Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Ensure GRASS plugin CMake extra includes macro works for all versions
  • Loading branch information
dakcarto committed Nov 25, 2016
1 parent 3f50e83 commit 8c8db0e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmake/FindGRASS.cmake
Expand Up @@ -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()
Expand Down

0 comments on commit 8c8db0e

Please sign in to comment.