summaryrefslogtreecommitdiff
path: root/indra/cmake/FindSVN.cmake
diff options
context:
space:
mode:
authorpalange <palange@lindenlab.com>2009-10-12 19:03:52 -0400
committerpalange <palange@lindenlab.com>2009-10-12 19:03:52 -0400
commitdbe7135cc4694e906a7d95a935df70f20514c962 (patch)
tree227ed3c9bc717171aeb009067e0f07335bcee8c3 /indra/cmake/FindSVN.cmake
parentd4b2897700c66354413af42ab055bd1aaa47f91c (diff)
parente3a4e3dc10a96b0822674cea262f41774e55a660 (diff)
merge of login-api
Diffstat (limited to 'indra/cmake/FindSVN.cmake')
-rw-r--r--indra/cmake/FindSVN.cmake34
1 files changed, 34 insertions, 0 deletions
diff --git a/indra/cmake/FindSVN.cmake b/indra/cmake/FindSVN.cmake
new file mode 100644
index 0000000000..3322be4ca9
--- /dev/null
+++ b/indra/cmake/FindSVN.cmake
@@ -0,0 +1,34 @@
+# -*- cmake -*-
+#
+# Find the svn executable for exporting old svn:externals.
+#
+# Input variables:
+# SVN_FIND_REQUIRED - set this if configuration should fail without scp
+#
+# Output variables:
+#
+# SVN_FOUND - set if svn was found
+# SVN_EXECUTABLE - path to svn executable
+# SVN_BATCH_FLAG - how to put svn into batch mode
+
+
+SET(SVN_EXECUTABLE)
+FIND_PROGRAM(SVN_EXECUTABLE NAMES svn svn.exe)
+
+IF (SVN_EXECUTABLE)
+ SET(SVN_FOUND ON)
+ELSE (SVN_EXECUTABLE)
+ SET(SVN_FOUND OFF)
+ENDIF (SVN_EXECUTABLE)
+
+IF (SVN_FOUND)
+ GET_FILENAME_COMPONENT(_svn_name ${SVN_EXECUTABLE} NAME_WE)
+ SET(SVN_BATCH_FLAG --non-interactive)
+ELSE (SVN_FOUND)
+ IF (SVN_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "Could not find svn executable")
+ ENDIF (SVN_FIND_REQUIRED)
+ENDIF (SVN_FOUND)
+
+MARK_AS_ADVANCED(SVN_EXECUTABLE SVN_FOUND SVN_BATCH_FLAG)
+