I had a bit of trouble with this commit: I'm using git-svn and the
cmake subversion module doesn't handle that case; the build fails with
an svn error about 'not a working directory'.

Googling a bit gave me a partial solution, small patch below. (Checks
for a .svn directory before trying to use the cmake module.) This
fixes the build with git-svn, although it doesn't actually feed it a
correct revision number.

-Nicholas

diff --git a/build_files/cmake/buildinfo.cmake
b/build_files/cmake/buildinfo.cmake
index 6d19592..ec09d1a 100644
--- a/build_files/cmake/buildinfo.cmake
+++ b/build_files/cmake/buildinfo.cmake
@@ -4,10 +4,14 @@
 # the FindSubversion.cmake module is part of the standard distribution
 include(FindSubversion)
 # extract working copy information for SOURCE_DIR into MY_XXX variables
-if(Subversion_FOUND)
-       Subversion_WC_INFO(${SOURCE_DIR} MY)
-else()
-       set(MY_WC_REVISION "unknown")
+
+set(MY_WC_REVISION "unknown")
+
+# check that this is a working copy
+if(EXISTS ${CMAKE_SOURCE_DIR}/.svn/)
+       if(Subversion_FOUND)
+               Subversion_WC_INFO(${SOURCE_DIR} MY)
+       endif()
 endif()

 # BUILD_PLATFORM and BUILD_PLATFORM are taken from CMake
_______________________________________________
Bf-committers mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-committers

Reply via email to