From 18aadd65c56ed63fb101c1fc94c937ab05185079 Mon Sep 17 00:00:00 2001 From: Damien Dupuis Date: Tue, 17 May 2011 12:29:28 +0000 Subject: [PATCH] Adding new SETUP_SVNH macro to generate svn.h file for a specific project --- bootstrap/cmake_modules/FindBootstrap.cmake | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bootstrap/cmake_modules/FindBootstrap.cmake b/bootstrap/cmake_modules/FindBootstrap.cmake index 83044158..d0fee69b 100644 --- a/bootstrap/cmake_modules/FindBootstrap.cmake +++ b/bootstrap/cmake_modules/FindBootstrap.cmake @@ -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 #