Skip to content

Commit 76a26c6

Browse files
authored
cmake: Added build support for r.stream toolbox and other hydrology tools (#1632)
1 parent a1cd058 commit 76a26c6

File tree

11 files changed

+347
-0
lines changed

11 files changed

+347
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
cmake_minimum_required(VERSION 3.22)
2+
project(r.accumulate)
3+
4+
include(build_addon)
5+
6+
find_OpenMP()
7+
find_M()
8+
9+
set(sources
10+
accumulate_iterative.c
11+
accumulate_recursive.c
12+
calculate_lfp_iterative.c
13+
calculate_lfp_recursive.c
14+
delineate_streams.c
15+
delineate_subwatersheds_iterative.c
16+
delineate_subwatersheds_recursive.c
17+
global.h
18+
line_list.c
19+
point_list.c
20+
main.c
21+
raster.c
22+
subaccumulate.c)
23+
24+
set(doc_files
25+
r.accumulate.html
26+
r.accumulate.md
27+
r_accumulate_formats.png
28+
r_accumulate_nc_comparison.png
29+
r_accumulate_nc_example.png
30+
r_accumulate_nc_lfp_example_multiple.png
31+
r_accumulate_nc_lfp_example_single.png
32+
r_accumulate_nc_lfp_example_subwatersheds.png
33+
r_accumulate_nc_stream_comparison.png
34+
r_accumulate_nc_stream_example.png
35+
r_accumulate_nc_subwatersheds_example.png
36+
r_accumulate_nc_watershed_example.png
37+
r_accumulate_r_watershed_nc_example.png)
38+
39+
build_addon(
40+
${PROJECT_NAME}
41+
GRASSLIBS
42+
dbmibase
43+
dbmiclient
44+
gis
45+
raster
46+
vector
47+
DEPENDS
48+
LIBM
49+
OPTIONAL_DEPENDS
50+
OpenMP::OpenMP_C
51+
SOURCES ${sources}
52+
DOCFILES ${doc_files})
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
cmake_minimum_required(VERSION 3.22)
2+
project(r.curvenumber)
3+
4+
include(build_addon)
5+
6+
find_M()
7+
8+
set(sources
9+
global.h
10+
lut.c
11+
main.c)
12+
13+
set(doc_files
14+
r.curvenumber.html
15+
r.curvenumber.md
16+
r_curvenumber_output.png)
17+
18+
build_addon(
19+
${PROJECT_NAME}
20+
GRASSLIBS
21+
gis
22+
raster
23+
DEPENDS
24+
LIBM
25+
SOURCES ${sources}
26+
DOCFILES ${doc_files})
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
cmake_minimum_required(VERSION 3.22)
2+
project(r.hydrobasin)
3+
4+
include(build_addon)
5+
6+
find_OpenMP()
7+
find_M()
8+
9+
set(sources
10+
delineate_funcs.h
11+
delineate.c
12+
delineate_lessmem.c
13+
delineate_moremem.c
14+
gettimeofday.c
15+
global.h
16+
main.c
17+
outlet_list.c
18+
raster_map.c
19+
timeval_diff.c)
20+
21+
set(doc_files
22+
r.hydrobasin.html
23+
r.hydrobasin.md
24+
r_hydrobasin_bridge_wsheds.png
25+
r_hydrobasin_formats.png
26+
r_hydrobasin_wsheds.png)
27+
28+
build_addon(
29+
${PROJECT_NAME}
30+
GRASSLIBS
31+
dbmibase
32+
dbmiclient
33+
gis
34+
raster
35+
vector
36+
DEPENDS
37+
LIBM
38+
OPTIONAL_DEPENDS
39+
OpenMP::OpenMP_C
40+
SOURCES ${sources}
41+
DOCFILES ${doc_files})

src/raster/r.runoff/CMakeLists.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
cmake_minimum_required(VERSION 3.22)
2+
project(r.runoff LANGUAGES NONE))
3+
4+
include(build_addon)
5+
6+
set(doc_files
7+
r.runoff.html
8+
r.runoff.md
9+
us_ro_vol.png)
10+
11+
build_addon(
12+
${PROJECT_NAME}
13+
SOURCES
14+
r.runoff.py
15+
DOCFILES ${doc_files})
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
cmake_minimum_required(VERSION 3.22)
2+
3+
project(r.stream.basins)
4+
5+
include(build_addon)
6+
7+
find_M()
8+
9+
set(sources
10+
basins_fill.c
11+
basins_inputs.c
12+
io.c
13+
local_proto.h
14+
local_vars.h
15+
main.c
16+
main.c)
17+
18+
set(doc_files
19+
r.stream.basins.html
20+
r.stream.basins.md)
21+
22+
build_addon(
23+
${PROJECT_NAME}
24+
GRASSLIBS
25+
dbmibase
26+
dbmiclient
27+
gis
28+
raster
29+
segment
30+
vector
31+
DEPENDS
32+
LIBM
33+
SOURCES ${sources}
34+
DOCFILES ${doc_files})
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
cmake_minimum_required(VERSION 3.22)
2+
3+
project(r.stream.order)
4+
5+
include(build_addon)
6+
7+
find_M()
8+
9+
set(sources
10+
io.c
11+
io.h
12+
local_proto.h
13+
local_vars.h
14+
main.c
15+
stream_init.c
16+
stream_order.c
17+
stream_raster_close.c
18+
stream_topology.c
19+
stream_vector.c)
20+
21+
set(doc_files
22+
r.stream.order.html
23+
r.stream.order.md
24+
orders.png)
25+
26+
build_addon(
27+
${PROJECT_NAME}
28+
GRASSLIBS
29+
dbmibase
30+
dbmiclient
31+
gis
32+
raster
33+
segment
34+
vector
35+
DEPENDS
36+
LIBM
37+
SOURCES ${sources}
38+
DOCFILES ${doc_files})
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
cmake_minimum_required(VERSION 3.22)
2+
3+
project(r.stream.segment)
4+
5+
include(build_addon)
6+
7+
find_M()
8+
9+
set(sources
10+
io.c
11+
io.h
12+
local_proto.h
13+
local_vars.h
14+
main.c
15+
stream_segment.c
16+
stream_topology.c
17+
stream_vector.c
18+
)
19+
20+
set(doc_files
21+
r.stream.segment.html
22+
r.stream.segment.md
23+
dirs.png
24+
sectors.png)
25+
26+
build_addon(
27+
${PROJECT_NAME}
28+
GRASSLIBS
29+
dbmibase
30+
dbmiclient
31+
gis
32+
raster
33+
segment
34+
vector
35+
DEPENDS
36+
LIBM
37+
SOURCES ${sources}
38+
DOCFILES ${doc_files})
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
cmake_minimum_required(VERSION 3.22)
2+
3+
project(r.stream.slope)
4+
5+
include(build_addon)
6+
7+
find_M()
8+
9+
set(doc_files
10+
r.stream.slope.html
11+
r.stream.slope.md)
12+
13+
build_addon(
14+
${PROJECT_NAME}
15+
GRASSLIBS
16+
gis
17+
raster
18+
DEPENDS
19+
LIBM
20+
SOURCES main.c
21+
DOCFILES ${doc_files})
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
cmake_minimum_required(VERSION 3.22)
2+
3+
project(r.stream.snap)
4+
5+
include(build_addon)
6+
7+
find_M()
8+
9+
set(sources
10+
io.c
11+
io.h
12+
local_proto.h
13+
local_vars.h
14+
main.c
15+
points_io.c
16+
snap.c
17+
)
18+
19+
set(doc_files
20+
r.stream.snap.html
21+
r.stream.snap.md)
22+
23+
build_addon(
24+
${PROJECT_NAME}
25+
GRASSLIBS
26+
dbmibase
27+
dbmiclient
28+
gis
29+
raster
30+
segment
31+
vector
32+
DEPENDS
33+
LIBM
34+
SOURCES ${sources}
35+
DOCFILES ${doc_files})
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
cmake_minimum_required(VERSION 3.22)
2+
3+
project(r.stream.stats)
4+
5+
include(build_addon)
6+
7+
find_M()
8+
9+
set(sources
10+
io.c
11+
io.h
12+
local_proto.h
13+
local_vars.h
14+
main.c
15+
stats_calculate.c
16+
stats_prepare.c
17+
stats_print.c)
18+
19+
set(doc_files
20+
r.stream.stats.html
21+
r.stream.stats.md)
22+
23+
build_addon(
24+
${PROJECT_NAME}
25+
GRASSLIBS
26+
gis
27+
raster
28+
segment
29+
DEPENDS
30+
LIBM
31+
SOURCES ${sources}
32+
DOCFILES ${doc_files})

0 commit comments

Comments
 (0)