Subversion Repositories Scribus

Rev

Rev 19172 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
19172 craig 1
# the FindSubversion.cmake module is part of the standard distribution
2
include(FindSubversion)
19226 craig 3
if(SUBVERSION_FOUND)
4
	# extract working copy information for SOURCE_DIR into MY_XXX variables
5
	Subversion_WC_INFO(${SOURCE_DIR} MY)
6
	# write a file with the SVNVERSION define
7
	file(WRITE svnversion.h.txt "#define SVNVERSION ${MY_WC_REVISION}\n")
8
	# copy the file to the final header only if the version changes
9
	# reduces needless rebuilds
10
	execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different svnversion.h.txt svnversion.h)
11
endif(SUBVERSION_FOUND)