Adding new SETUP_SVNH macro to generate svn.h file for a specific project

This commit is contained in:
Damien Dupuis 2011-05-17 12:29:28 +00:00
parent 4120451990
commit 18aadd65c5
1 changed files with 11 additions and 0 deletions

View File

@ -36,6 +36,17 @@
message("-- Distribution is ${DISTRIBUTION}")
endmacro(check_distribution)
#
# Get the svn revision version and configure a svn.h.in file based on this version
# The include directory name is passed as argument
#
macro(SETUP_SVNH includedir)
find_package(Subversion REQUIRED)
Subversion_WC_INFO(${CMAKE_CURRENT_SOURCE_DIR} SVNREV)
set(SUBVERSION_REVISION ${SVNREV_WC_REVISION})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/svn.h.in ${CMAKE_CURRENT_SOURCE_DIR}/${includedir}/svn.h)
endmacro(SETUP_SVNH)
#
# Specific Apple OSX setup
#