diff options
author | Nicky <nicky.dasmijn@gmail.com> | 2022-04-13 19:27:02 +0200 |
---|---|---|
committer | Nicky <nicky.dasmijn@gmail.com> | 2022-04-13 19:27:02 +0200 |
commit | 6417836e69aa9250b19955937fe9cd0965c4c8ba (patch) | |
tree | 3821f741462dc9717cf2b8eb11da14c8dca11fb9 /indra/cmake | |
parent | 241919e7f7986c11586a49bff53cf19c2c0e0ea6 (diff) |
FindSCP.cmake is used when INSTALL_PROPRIETARY is set. Not sure what the latter does, but I suppose
some internal logic on the LL build farm.
Diffstat (limited to 'indra/cmake')
-rw-r--r-- | indra/cmake/FindSCP.cmake | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/indra/cmake/FindSCP.cmake b/indra/cmake/FindSCP.cmake new file mode 100644 index 0000000000..ea02102908 --- /dev/null +++ b/indra/cmake/FindSCP.cmake @@ -0,0 +1,40 @@ +# -*- 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) +IF (WINDOWS) + FIND_PROGRAM(SCP_EXECUTABLE NAMES pscp pscp.exe) +ELSE (WINDOWS) + FIND_PROGRAM(SCP_EXECUTABLE NAMES scp scp.exe) +ENDIF (WINDOWS) + +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") + ENDIF (SCP_FIND_REQUIRED) +ENDIF (SCP_FOUND) + +MARK_AS_ADVANCED(SCP_EXECUTABLE SCP_FOUND SCP_BATCH_FLAG) |