forked from OSGeo/gdal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_bash_completions.cmake.in
54 lines (51 loc) · 1.27 KB
/
install_bash_completions.cmake.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# All but gdalinfo
set(PROGRAMS
gdal2tiles.py
gdal2xyz.py
gdaladdo
gdalbuildvrt
gdal_calc.py
gdalchksum.py
gdalcompare.py
gdal-config
gdal_contour
gdaldem
gdal_edit.py
gdalenhance
gdal_fillnodata.py
gdal_grid
gdalident.py
gdalimport.py
gdallocationinfo
gdalmanage
gdal_merge.py
gdalmove.py
gdal_polygonize.py
gdal_proximity.py
gdal_rasterize
gdal_retile.py
gdal_sieve.py
gdalsrsinfo
gdaltindex
gdaltransform
gdal_translate
gdalwarp
ogr2ogr
ogrinfo
ogrlineref
ogrmerge.py
ogrtindex
gdal_viewshed
gdal_create)
set(INSTALL_DIR "$ENV{DESTDIR}@CMAKE_INSTALL_PREFIX@/@BASH_COMPLETIONS_DIR@")
file(MAKE_DIRECTORY "${INSTALL_DIR}")
message(STATUS "Installing ${INSTALL_DIR}/gdalinfo")
configure_file("@CMAKE_CURRENT_SOURCE_DIR@/gdal-bash-completion.sh" "${INSTALL_DIR}/gdalinfo" COPYONLY)
foreach (program IN LISTS PROGRAMS)
message(STATUS "Installing ${INSTALL_DIR}/${program}")
if (NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "gdalinfo" "${INSTALL_DIR}/${program}")
else ()
configure_file("${INSTALL_DIR}/gdalinfo" "${INSTALL_DIR}/${program}" COPYONLY)
endif ()
endforeach ()