diff options
author | Jennifer Leech <jenn@lindenlab.com> | 2008-06-26 19:08:51 +0000 |
---|---|---|
committer | Jennifer Leech <jenn@lindenlab.com> | 2008-06-26 19:08:51 +0000 |
commit | d32c8825b63ca8dc9f1571aefea01cc89eba36e6 (patch) | |
tree | 6f888fc1110cc63b7ba46a5823eb8befd9419964 /indra/cmake/FindSCP.cmake | |
parent | 68edae3f801f633037cf5cee063f65abe081c912 (diff) |
svn merge -r89701:90677 svn+ssh://svn/svn/linden/branches/install-dev-binaries/s3-build -> release
Diffstat (limited to 'indra/cmake/FindSCP.cmake')
-rw-r--r-- | indra/cmake/FindSCP.cmake | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/indra/cmake/FindSCP.cmake b/indra/cmake/FindSCP.cmake new file mode 100644 index 0000000000..ee7e487663 --- /dev/null +++ b/indra/cmake/FindSCP.cmake @@ -0,0 +1,38 @@ +# -*- cmake -*- +# +# Find the OpenSSH scp ("secure copy") or Putty pscp command. +# +# Input variables: +# SCP_FIND_REQUIRED - set this if configuration should fail without scp +# +# Output variables: +# +# SCP_FOUND - set if scp was found +# SCP_EXECUTABLE - path to scp or pscp executable +# SCP_BATCH_FLAG - how to put scp/pscp into batch mode + +SET(SCP_EXECUTABLE) +FIND_PROGRAM(SCP_EXECUTABLE NAMES scp scp.exe pscp pscp.exe) + +IF (SCP_EXECUTABLE) + SET(SCP_FOUND ON) +ELSE (SCP_EXECUTABLE) + SET(SCP_FOUND OFF) +ENDIF (SCP_EXECUTABLE) + +IF (SCP_FOUND) + GET_FILENAME_COMPONENT(_scp_name ${SCP_EXECUTABLE} NAME_WE) + IF (_scp_name STREQUAL scp) + SET(SCP_BATCH_FLAG -B) + ELSE (_scp_name STREQUAL scp) + SET(SCP_BATCH_FLAG -batch) + ENDIF (_scp_name STREQUAL scp) +ELSE (SCP_FOUND) + IF (SCP_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find scp or pscp executable") + ELSE (SCP_FIND_REQUIRED) + MESSAGE(STATUS "Could not find scp or pscp executable") + ENDIF (SCP_FIND_REQUIRED) +ENDIF (SCP_FOUND) + +MARK_AS_ADVANCED(SCP_EXECUTABLE SCP_FOUND SCP_BATCH_FLAG) |