File: getsvn.cmake

package info (click to toggle)
scribus 1.5.8%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 179,080 kB
  • sloc: cpp: 483,300; python: 65,124; xml: 14,334; ansic: 2,484; sh: 192; perl: 95; makefile: 79
file content (11 lines) | stat: -rw-r--r-- 553 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
# the FindSubversion.cmake module is part of the standard distribution
include(FindSubversion)
if(SUBVERSION_FOUND)
	# extract working copy information for SOURCE_DIR into MY_XXX variables
	Subversion_WC_INFO(${SOURCE_DIR} MY)
	# write a file with the SVNVERSION define
	file(WRITE svnversion.h.txt "#define SVNVERSION ${MY_WC_REVISION}\n")
	# copy the file to the final header only if the version changes
	# reduces needless rebuilds
	execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different svnversion.h.txt svnversion.h)
endif(SUBVERSION_FOUND)