Move usual Unix commands to FindUnixCommands, use FingCygwin in other modules

This commit is contained in:
Sebastien Barre 2001-11-02 16:44:00 -05:00
parent bc673070bc
commit 3714d9419c
5 changed files with 120 additions and 35 deletions

View File

@ -13,7 +13,7 @@ IF (BUILD_DOCUMENTATION)
# #
# Check for the tools # Check for the tools
# #
INCLUDE(${CMAKE_ROOT}/Modules/FindCygwin.cmake) INCLUDE(${CMAKE_ROOT}/Modules/FindUnixCommands.cmake)
INCLUDE(${CMAKE_ROOT}/Modules/FindDoxygen.cmake) INCLUDE(${CMAKE_ROOT}/Modules/FindDoxygen.cmake)
INCLUDE(${CMAKE_ROOT}/Modules/FindHhc.cmake) INCLUDE(${CMAKE_ROOT}/Modules/FindHhc.cmake)
INCLUDE(${CMAKE_ROOT}/Modules/FindPerl.cmake) INCLUDE(${CMAKE_ROOT}/Modules/FindPerl.cmake)
@ -29,6 +29,5 @@ IF (BUILD_DOCUMENTATION)
# The documentation process is controled by a batch file. # The documentation process is controled by a batch file.
# We will probably need bash to create the custom target # We will probably need bash to create the custom target
# #
FIND_PROGRAM(BASH bash)
ENDIF (BUILD_DOCUMENTATION) ENDIF (BUILD_DOCUMENTATION)

View File

@ -1,5 +1,5 @@
# #
# this module looks for Cygwin and some usual commands # this module looks for Cygwin
# #
FIND_PATH(CYGWIN_INSTALL_PATH FIND_PATH(CYGWIN_INSTALL_PATH
@ -7,27 +7,3 @@ FIND_PATH(CYGWIN_INSTALL_PATH
"C:/Cygwin" "C:/Cygwin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Cygnus Solutions\\Cygwin\\mounts v2\\/;native]" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Cygnus Solutions\\Cygwin\\mounts v2\\/;native]"
) )
FIND_PROGRAM(GZIP
gzip
${CYGWIN_INSTALL_PATH}/bin
)
FIND_PROGRAM(MV
mv
${CYGWIN_INSTALL_PATH}/bin
)
FIND_PROGRAM(RM
rm
${CYGWIN_INSTALL_PATH}/bin
)
FIND_PROGRAM(TAR
NAMES
tar
gtar
PATH
${CYGWIN_INSTALL_PATH}/bin
)

View File

@ -2,8 +2,23 @@
# this module looks for Perl # this module looks for Perl
# #
FIND_PROGRAM(PERL INCLUDE(${CMAKE_ROOT}/Modules/FindCygwin.cmake)
perl
"C:/Perl/bin" IF (CYGWIN_INSTALL_PATH)
[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActivePerl\\628]/bin
) FIND_PROGRAM(PERL
perl
"C:/Perl/bin"
[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActivePerl\\628]/bin
${CYGWIN_INSTALL_PATH}/bin
)
ELSE (CYGWIN_INSTALL_PATH)
FIND_PROGRAM(PERL
perl
"C:/Perl/bin"
[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActivePerl\\628]/bin
)
ENDIF (CYGWIN_INSTALL_PATH)

View File

@ -0,0 +1,82 @@
#
# this module looks for some usual Unix commands
#
INCLUDE(${CMAKE_ROOT}/Modules/FindCygwin.cmake)
IF (CYGWIN_INSTALL_PATH)
FIND_PROGRAM(BASH
bash
${CYGWIN_INSTALL_PATH}/bin
)
FIND_PROGRAM(GZIP
gzip
${CYGWIN_INSTALL_PATH}/bin
)
FIND_PROGRAM(MV
mv
${CYGWIN_INSTALL_PATH}/bin
)
FIND_PROGRAM(RM
rm
${CYGWIN_INSTALL_PATH}/bin
)
FIND_PROGRAM(TAR
NAMES
tar
gtar
PATH
${CYGWIN_INSTALL_PATH}/bin
)
ELSE (CYGWIN_INSTALL_PATH)
FIND_PROGRAM(BASH
bash
/bin
/usr/bin
/usr/local/bin
/sbin
)
FIND_PROGRAM(GZIP
gzip
/bin
/usr/bin
/usr/local/bin
/sbin
)
FIND_PROGRAM(MV
mv
/bin
/usr/bin
/usr/local/bin
/sbin
)
FIND_PROGRAM(RM
rm
/bin
/usr/bin
/usr/local/bin
/sbin
)
FIND_PROGRAM(TAR
NAMES
tar
gtar
PATH
/bin
/usr/bin
/usr/local/bin
/sbin
)
ENDIF (CYGWIN_INSTALL_PATH)

View File

@ -2,6 +2,19 @@
# this module looks for wget # this module looks for wget
# #
FIND_PROGRAM(WGET INCLUDE(${CMAKE_ROOT}/Modules/FindCygwin.cmake)
wget
) IF (CYGWIN_INSTALL_PATH)
FIND_PROGRAM(WGET
wget
${CYGWIN_INSTALL_PATH}/bin
)
ELSE (CYGWIN_INSTALL_PATH)
FIND_PROGRAM(WGET
wget
)
ENDIF (CYGWIN_INSTALL_PATH)