aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/cmake/FindSCP.cmake
diff options
context:
space:
mode:
authorJacek Antonelli2008-09-06 18:24:57 -0500
committerJacek Antonelli2008-09-06 18:25:07 -0500
commit798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch)
tree1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/cmake/FindSCP.cmake
parentSecond Life viewer sources 1.20.15 (diff)
downloadmeta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/cmake/FindSCP.cmake')
-rw-r--r--linden/indra/cmake/FindSCP.cmake40
1 files changed, 40 insertions, 0 deletions
diff --git a/linden/indra/cmake/FindSCP.cmake b/linden/indra/cmake/FindSCP.cmake
new file mode 100644
index 0000000..ea02102
--- /dev/null
+++ b/linden/indra/cmake/FindSCP.cmake
@@ -0,0 +1,40 @@
1# -*- cmake -*-
2#
3# Find the OpenSSH scp ("secure copy") or Putty pscp command.
4#
5# Input variables:
6# SCP_FIND_REQUIRED - set this if configuration should fail without scp
7#
8# Output variables:
9#
10# SCP_FOUND - set if scp was found
11# SCP_EXECUTABLE - path to scp or pscp executable
12# SCP_BATCH_FLAG - how to put scp/pscp into batch mode
13
14SET(SCP_EXECUTABLE)
15IF (WINDOWS)
16 FIND_PROGRAM(SCP_EXECUTABLE NAMES pscp pscp.exe)
17ELSE (WINDOWS)
18 FIND_PROGRAM(SCP_EXECUTABLE NAMES scp scp.exe)
19ENDIF (WINDOWS)
20
21IF (SCP_EXECUTABLE)
22 SET(SCP_FOUND ON)
23ELSE (SCP_EXECUTABLE)
24 SET(SCP_FOUND OFF)
25ENDIF (SCP_EXECUTABLE)
26
27IF (SCP_FOUND)
28 GET_FILENAME_COMPONENT(_scp_name ${SCP_EXECUTABLE} NAME_WE)
29 IF (_scp_name STREQUAL scp)
30 SET(SCP_BATCH_FLAG -B)
31 ELSE (_scp_name STREQUAL scp)
32 SET(SCP_BATCH_FLAG -batch)
33 ENDIF (_scp_name STREQUAL scp)
34ELSE (SCP_FOUND)
35 IF (SCP_FIND_REQUIRED)
36 MESSAGE(FATAL_ERROR "Could not find scp or pscp executable")
37 ENDIF (SCP_FIND_REQUIRED)
38ENDIF (SCP_FOUND)
39
40MARK_AS_ADVANCED(SCP_EXECUTABLE SCP_FOUND SCP_BATCH_FLAG)