Skip to content

Commit e6072c9

Browse files
manisandronyalldawson
authored andcommittedJan 31, 2022
Add support for grass8
1 parent 6cb2f64 commit e6072c9

File tree

8 files changed

+17
-7
lines changed

8 files changed

+17
-7
lines changed
 

‎CMakeLists.txt‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,8 @@ set (WITH_CORE TRUE CACHE BOOL "Determines whether QGIS core should be built.")
119119
mark_as_advanced(WITH_CORE)
120120

121121
if(WITH_CORE)
122-
# Only GRASS 7 is currently supported but we keep dual version support in cmake for possible future switch to GRASS 8.
123122
# Try to configure and build GRASS plugin by default
124-
foreach (GRASS_SEARCH_VERSION 7)
123+
foreach (GRASS_SEARCH_VERSION 7 8)
125124
# Legacy note:
126125
# For GRASS 6 there were used cached variables without version suffix so that existing caches didn't have to be reconfigured.
127126
# Cached variables were: WITH_GRASS, WITH_GRASS7, GRASS_PREFIX, GRASS_PREFIX7, GRASS_INCLUDE_DIR, GRASS_INCLUDE_DIR7

‎src/plugins/grass/8/CMakeLists.txt‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include_directories(${GRASS_INCLUDE_DIR8} ${CMAKE_CURRENT_BINARY_DIR})
2+
ADD_GRASSPLUGIN(8)

‎src/plugins/grass/CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ if(NOT WIN32)
251251
install(DIRECTORY qtermwidget/color-schemes/ DESTINATION "${COLORSCHEMES_DIR}" FILES_MATCHING PATTERN "*.*schem*")
252252
endif()
253253

254-
foreach(GRASS_BUILD_VERSION 6 7) # GRASS 6 and GRASS 7
254+
foreach(GRASS_BUILD_VERSION 6 7 8)
255255
if(GRASS_FOUND${GRASS_BUILD_VERSION})
256256
add_subdirectory(${GRASS_BUILD_VERSION})
257257
endif()

‎src/providers/CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ if (NOT FORCE_STATIC_LIBS)
4040
add_subdirectory(pdal)
4141
endif()
4242

43-
if (WITH_GRASS OR WITH_GRASS7)
43+
if (WITH_GRASS OR WITH_GRASS7 OR WITH_GRASS8)
4444
add_subdirectory(grass)
4545
endif()
4646
endif()
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
include_directories( SYSTEM
2+
${GRASS_INCLUDE_DIR8}
3+
)
4+
include_directories(
5+
${CMAKE_CURRENT_BINARY_DIR}
6+
)
7+
ADD_GRASSLIB(8)

‎src/providers/grass/CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ macro(ADD_GRASSLIB GRASS_BUILD_VERSION)
319319
)
320320
endmacro(ADD_GRASSLIB)
321321

322-
foreach(GRASS_BUILD_VERSION 6 7) # GRASS 6 and GRASS 7
322+
foreach(GRASS_BUILD_VERSION 6 7 8)
323323
if(GRASS_FOUND${GRASS_BUILD_VERSION})
324324
add_subdirectory(${GRASS_BUILD_VERSION})
325325
endif()
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include_directories(${GRASS_INCLUDE_DIR8} ${CMAKE_CURRENT_BINARY_DIR})
2+
ADD_QGIS_GRASS_TESTS(8)

‎tests/src/providers/grass/CMakeLists.txt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ macro (ADD_QGIS_GRASS_TESTS version)
8686
endif()
8787
endmacro (ADD_QGIS_GRASS_TESTS)
8888

89-
foreach(GRASS_BUILD_VERSION 6 7)
89+
foreach(GRASS_BUILD_VERSION 6 7 8)
9090
if(GRASS_FOUND${GRASS_BUILD_VERSION})
9191
add_subdirectory(${GRASS_BUILD_VERSION})
9292
endif()
93-
endforeach(GRASS_BUILD_VERSION 6 7)
93+
endforeach(GRASS_BUILD_VERSION 6 7 8)

0 commit comments

Comments
 (0)
Please sign in to comment.