@@ -38,19 +38,16 @@ SET (WITH_CORE TRUE CACHE BOOL "Determines whether QGIS core should be built.")
3838MARK_AS_ADVANCED (WITH_CORE)
3939
4040IF (WITH_CORE)
41- # try to configure and build GRASS plugin by default
42- FOREACH (GRASS_SEARCH_VERSION 6 7)
43- # For GRASS 6 are used cached variables without version suffix so that existing caches don't have to be reconfigured.
44- # Cached variables: WITH_GRASS, WITH_GRASS7, GRASS_PREFIX, GRASS_PREFIX7, GRASS_INCLUDE_DIR, GRASS_INCLUDE_DIR7
41+ # Only GRASS 7 is currently supported but we keep dual version support in cmake for possible future switch to GRASS 8.
42+ # Try to configure and build GRASS plugin by default
43+ FOREACH (GRASS_SEARCH_VERSION 7)
44+ # Legacy note:
45+ # For GRASS 6 there were used cached variables without version suffix so that existing caches didn't have to be reconfigured.
46+ # Cached variables were: WITH_GRASS, WITH_GRASS7, GRASS_PREFIX, GRASS_PREFIX7, GRASS_INCLUDE_DIR, GRASS_INCLUDE_DIR7
4547 # Everywhere else each variable has version major appended.
46- # Normal variables: GRASS_FOUND6, GRASS_FOUND7, GRASS_MAJOR_VERSION6, GRASS_MAJOR_VERSION7, etc.
48+ # Normal variables were : GRASS_FOUND6, GRASS_FOUND7, GRASS_MAJOR_VERSION6, GRASS_MAJOR_VERSION7, etc.
4749 # In addition there is also GRASS_FOUND, which is TRUE if at least one version of GRASS was found
48- IF (GRASS_SEARCH_VERSION EQUAL 6)
49- SET (GRASS_CACHE_VERSION "" )
50- ELSE (GRASS_SEARCH_VERSION EQUAL 6)
51- SET (GRASS_CACHE_VERSION ${GRASS_SEARCH_VERSION} )
52- ENDIF (GRASS_SEARCH_VERSION EQUAL 6)
53-
50+ SET (GRASS_CACHE_VERSION ${GRASS_SEARCH_VERSION} )
5451 SET (WITH_GRASS${GRASS_CACHE_VERSION} TRUE CACHE BOOL "Determines whether GRASS ${GRASS_SEARCH_VERSION} plugin should be built" )
5552 IF (WITH_GRASS${GRASS_CACHE_VERSION} )
5653 FIND_PACKAGE (GRASS ${GRASS_SEARCH_VERSION} )
0 commit comments