diff options
-rw-r--r-- | Modules/Documentation.cmake (renamed from Modules/DocumentationVTK.cmake) | 3 | ||||
-rw-r--r-- | Modules/FindCygwin.cmake | 26 | ||||
-rw-r--r-- | Modules/FindPerl.cmake | 25 | ||||
-rw-r--r-- | Modules/FindUnixCommands.cmake | 82 | ||||
-rw-r--r-- | Modules/FindWget.cmake | 19 |
5 files changed, 120 insertions, 35 deletions
diff --git a/Modules/DocumentationVTK.cmake b/Modules/Documentation.cmake index 3e7b8fa..c86e704 100644 --- a/Modules/DocumentationVTK.cmake +++ b/Modules/Documentation.cmake @@ -13,7 +13,7 @@ IF (BUILD_DOCUMENTATION) # # 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/FindHhc.cmake) INCLUDE(${CMAKE_ROOT}/Modules/FindPerl.cmake) @@ -29,6 +29,5 @@ IF (BUILD_DOCUMENTATION) # The documentation process is controled by a batch file. # We will probably need bash to create the custom target # - FIND_PROGRAM(BASH bash) ENDIF (BUILD_DOCUMENTATION) diff --git a/Modules/FindCygwin.cmake b/Modules/FindCygwin.cmake index c93c7f2..7c4f8b1 100644 --- a/Modules/FindCygwin.cmake +++ b/Modules/FindCygwin.cmake @@ -1,5 +1,5 @@ # -# this module looks for Cygwin and some usual commands +# this module looks for Cygwin # FIND_PATH(CYGWIN_INSTALL_PATH @@ -7,27 +7,3 @@ FIND_PATH(CYGWIN_INSTALL_PATH "C:/Cygwin" "[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 -) - diff --git a/Modules/FindPerl.cmake b/Modules/FindPerl.cmake index 916fcf9..79a88a1 100644 --- a/Modules/FindPerl.cmake +++ b/Modules/FindPerl.cmake @@ -2,8 +2,23 @@ # this module looks for Perl # -FIND_PROGRAM(PERL - perl - "C:/Perl/bin" - [HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActivePerl\\628]/bin -) +INCLUDE(${CMAKE_ROOT}/Modules/FindCygwin.cmake) + +IF (CYGWIN_INSTALL_PATH) + + 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) diff --git a/Modules/FindUnixCommands.cmake b/Modules/FindUnixCommands.cmake new file mode 100644 index 0000000..4269983 --- /dev/null +++ b/Modules/FindUnixCommands.cmake @@ -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) diff --git a/Modules/FindWget.cmake b/Modules/FindWget.cmake index bd14eeb..5a2110c 100644 --- a/Modules/FindWget.cmake +++ b/Modules/FindWget.cmake @@ -2,6 +2,19 @@ # this module looks for wget # -FIND_PROGRAM(WGET - wget -) +INCLUDE(${CMAKE_ROOT}/Modules/FindCygwin.cmake) + +IF (CYGWIN_INSTALL_PATH) + + FIND_PROGRAM(WGET + wget + ${CYGWIN_INSTALL_PATH}/bin + ) + +ELSE (CYGWIN_INSTALL_PATH) + + FIND_PROGRAM(WGET + wget + ) + +ENDIF (CYGWIN_INSTALL_PATH) |