File: install_bash_completions.cmake.in

package info (click to toggle)
gdal 3.6.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 89,664 kB
  • sloc: cpp: 1,136,033; ansic: 197,355; python: 35,910; java: 5,511; xml: 4,011; sh: 3,950; cs: 2,443; yacc: 1,047; makefile: 288
file content (55 lines) | stat: -rw-r--r-- 1,392 bytes parent folder | download
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
55
# 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 ()
  file(APPEND @PROJECT_BINARY_DIR@/install_manifest_extra.txt "${INSTALL_DIR}/${program}\n")
endforeach ()