File: AddFileHashes.cmake

package info (click to toggle)
qtrvsim 0.9.8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,844 kB
  • sloc: cpp: 25,687; ansic: 7,754; makefile: 318; python: 303; sh: 278; asm: 268; xml: 9
file content (17 lines) | stat: -rw-r--r-- 662 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Add file hashes to placeholder location in a template file.
# Used for packaging.
#
# Example:
# cmake -DTEMPLATE=PKGBUILD.in -DOUTPUT=PKGBUILD -DFILE=qtrvsim_0.8.0.tar.xz -P AddFileHashes.cmake
#
# See extras/packaging/arch/PKGBUILD.in for template examples.
# Note that most files are configured (injected with information) twice:
# First, during configure phase, package information is added and FILE_*
# placeholders are left intact. Second, after source packing, FILE_*
# placeholders are resolved.

file(MD5 ${FILE} FILE_MD5)
file(SHA1 ${FILE} FILE_SHA1)
file(SHA256 ${FILE} FILE_SHA256)
file(SIZE ${FILE} FILE_SIZE)
configure_file(${TEMPLATE} ${OUTPUT})