PageRenderTime 8ms CodeModel.GetById 2ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

/indra/cmake/FindSVN.cmake

https://bitbucket.org/lindenlab/viewer-beta/
CMake | 34 lines | 16 code | 6 blank | 12 comment | 0 complexity | e8eb83abd994a853d3347277d1a25eb7 MD5 | raw file
 1# -*- cmake -*-
 2#
 3# Find the svn executable for exporting old svn:externals.
 4#
 5# Input variables:
 6#   SVN_FIND_REQUIRED - set this if configuration should fail without scp
 7#
 8# Output variables:
 9#
10#   SVN_FOUND - set if svn was found
11#   SVN_EXECUTABLE - path to svn executable
12#   SVN_BATCH_FLAG - how to put svn into batch mode
13
14
15SET(SVN_EXECUTABLE)
16FIND_PROGRAM(SVN_EXECUTABLE NAMES svn svn.exe)
17
18IF (SVN_EXECUTABLE)
19  SET(SVN_FOUND ON)
20ELSE (SVN_EXECUTABLE)
21  SET(SVN_FOUND OFF)
22ENDIF (SVN_EXECUTABLE)
23
24IF (SVN_FOUND)
25  GET_FILENAME_COMPONENT(_svn_name ${SVN_EXECUTABLE} NAME_WE)
26  SET(SVN_BATCH_FLAG --non-interactive)
27ELSE (SVN_FOUND)
28  IF (SVN_FIND_REQUIRED)
29    MESSAGE(FATAL_ERROR "Could not find svn executable")
30  ENDIF (SVN_FIND_REQUIRED)
31ENDIF (SVN_FOUND)
32
33MARK_AS_ADVANCED(SVN_EXECUTABLE SVN_FOUND SVN_BATCH_FLAG)
34