Merge topic 'cpack-innosetup-linux'
[kiteware-cmake.git] / Modules / FindUnixCommands.cmake
blobd71518f2532c87556d45c8e4e9c66135703369ed
1 # Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
2 # file Copyright.txt or https://cmake.org/licensing for details.
4 #[=======================================================================[.rst:
5 FindUnixCommands
6 ----------------
8 .. deprecated:: 3.26
10   Use :option:`${CMAKE_COMMAND} -E <cmake -E>` subcommands instead.
12 Find Unix commands, including the ones from Cygwin
14 This module looks for the Unix commands ``bash``, ``cp``, ``gzip``,
15 ``mv``, ``rm``, and ``tar`` and stores the result in the variables
16 ``BASH``, ``CP``, ``GZIP``, ``MV``, ``RM``, and ``TAR``.
17 #]=======================================================================]
19 include(${CMAKE_CURRENT_LIST_DIR}/FindCygwin.cmake)
20 include(${CMAKE_CURRENT_LIST_DIR}/FindMsys.cmake)
22 find_program(BASH
23   bash
24   ${CYGWIN_INSTALL_PATH}/bin
25   ${MSYS_INSTALL_PATH}/usr/bin
27 mark_as_advanced(
28   BASH
31 find_program(CP
32   cp
33   ${CYGWIN_INSTALL_PATH}/bin
34   ${MSYS_INSTALL_PATH}/usr/bin
36 mark_as_advanced(
37   CP
40 find_program(GZIP
41   gzip
42   ${CYGWIN_INSTALL_PATH}/bin
43   ${MSYS_INSTALL_PATH}/usr/bin
45 mark_as_advanced(
46   GZIP
49 find_program(MV
50   mv
51   ${CYGWIN_INSTALL_PATH}/bin
52   ${MSYS_INSTALL_PATH}/usr/bin
54 mark_as_advanced(
55   MV
58 find_program(RM
59   rm
60   ${CYGWIN_INSTALL_PATH}/bin
61   ${MSYS_INSTALL_PATH}/usr/bin
63 mark_as_advanced(
64   RM
67 find_program(TAR
68   NAMES
69   tar
70   gtar
71   PATH
72   ${CYGWIN_INSTALL_PATH}/bin
73   ${MSYS_INSTALL_PATH}/usr/bin
75 mark_as_advanced(
76   TAR
79 include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
80 find_package_handle_standard_args(UnixCommands
81   REQUIRED_VARS BASH CP GZIP MV RM TAR