summaryrefslogtreecommitdiff
path: root/Modules/FindUnixCommands.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/FindUnixCommands.cmake')
-rw-r--r--Modules/FindUnixCommands.cmake93
1 files changed, 93 insertions, 0 deletions
diff --git a/Modules/FindUnixCommands.cmake b/Modules/FindUnixCommands.cmake
new file mode 100644
index 000000000..9c0264d22
--- /dev/null
+++ b/Modules/FindUnixCommands.cmake
@@ -0,0 +1,93 @@
+# - Find unix commands from cygwin
+# This module looks for some usual Unix commands.
+#
+
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+INCLUDE(FindCygwin)
+
+FIND_PROGRAM(BASH
+ bash
+ ${CYGWIN_INSTALL_PATH}/bin
+ /bin
+ /usr/bin
+ /usr/local/bin
+ /sbin
+)
+MARK_AS_ADVANCED(
+ BASH
+)
+
+FIND_PROGRAM(CP
+ cp
+ ${CYGWIN_INSTALL_PATH}/bin
+ /bin
+ /usr/bin
+ /usr/local/bin
+ /sbin
+)
+MARK_AS_ADVANCED(
+ CP
+)
+
+FIND_PROGRAM(GZIP
+ gzip
+ ${CYGWIN_INSTALL_PATH}/bin
+ /bin
+ /usr/bin
+ /usr/local/bin
+ /sbin
+)
+MARK_AS_ADVANCED(
+ GZIP
+)
+
+FIND_PROGRAM(MV
+ mv
+ ${CYGWIN_INSTALL_PATH}/bin
+ /bin
+ /usr/bin
+ /usr/local/bin
+ /sbin
+)
+MARK_AS_ADVANCED(
+ MV
+)
+
+FIND_PROGRAM(RM
+ rm
+ ${CYGWIN_INSTALL_PATH}/bin
+ /bin
+ /usr/bin
+ /usr/local/bin
+ /sbin
+)
+MARK_AS_ADVANCED(
+ RM
+)
+
+FIND_PROGRAM(TAR
+ NAMES
+ tar
+ gtar
+ PATH
+ ${CYGWIN_INSTALL_PATH}/bin
+ /bin
+ /usr/bin
+ /usr/local/bin
+ /sbin
+)
+MARK_AS_ADVANCED(
+ TAR
+)