PageRenderTime 19ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/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
Possible License(s): LGPL-2.1
  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. SET(SVN_EXECUTABLE)
  14. FIND_PROGRAM(SVN_EXECUTABLE NAMES svn svn.exe)
  15. IF (SVN_EXECUTABLE)
  16. SET(SVN_FOUND ON)
  17. ELSE (SVN_EXECUTABLE)
  18. SET(SVN_FOUND OFF)
  19. ENDIF (SVN_EXECUTABLE)
  20. IF (SVN_FOUND)
  21. GET_FILENAME_COMPONENT(_svn_name ${SVN_EXECUTABLE} NAME_WE)
  22. SET(SVN_BATCH_FLAG --non-interactive)
  23. ELSE (SVN_FOUND)
  24. IF (SVN_FIND_REQUIRED)
  25. MESSAGE(FATAL_ERROR "Could not find svn executable")
  26. ENDIF (SVN_FIND_REQUIRED)
  27. ENDIF (SVN_FOUND)
  28. MARK_AS_ADVANCED(SVN_EXECUTABLE SVN_FOUND SVN_BATCH_FLAG)