Commit d94f8516 authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'find-msys'

990b3704

 FindMsys: Add a module to find MSYS and some bundled packages
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !6057
parents e2ac9268 990b3704
......@@ -185,6 +185,7 @@ They are normally called through the :command:`find_package` command.
/module/FindMPEG
/module/FindMPEG2
/module/FindMPI
/module/FindMsys
/module/FindODBC
/module/FindOpenACC
/module/FindOpenAL
......
.. cmake-module:: ../../Modules/FindMsys.cmake
FindMsys
--------
* The :module:`FindMsys` module was added to find MSYS installations.
Like :module:`FindCygwin`, it is used automatically by some other
find modules to locate UNIX-style tools on Windows.
......@@ -23,6 +23,7 @@ GNUPLOT_VERSION_STRING will not work for old versions like 3.7.1.
#]=======================================================================]
include(${CMAKE_CURRENT_LIST_DIR}/FindCygwin.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/FindMsys.cmake)
find_program(GNUPLOT_EXECUTABLE
NAMES
......@@ -31,6 +32,7 @@ find_program(GNUPLOT_EXECUTABLE
wgnupl32
PATHS
${CYGWIN_INSTALL_PATH}/bin
${MSYS_INSTALL_PATH}/usr/bin
)
if (GNUPLOT_EXECUTABLE)
......
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
#[=======================================================================[.rst:
FindMsys
--------
.. versionadded:: 3.21
Find MSYS, a POSIX-compatible environment that runs natively
on Microsoft Windows
#]=======================================================================]
if (WIN32)
if(MSYS_INSTALL_PATH)
set(MSYS_CMD "${MSYS_INSTALL_PATH}/msys2_shell.cmd")
endif()
find_program(MSYS_CMD
NAMES msys2_shell.cmd
PATHS
"C:/msys64"
"C:/msys32"
"C:/MSYS"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MSYS\\setup;rootdir]"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Cygnus Solutions\\MSYS\\mounts v2\\/;native]"
)
get_filename_component(MSYS_INSTALL_PATH "${MSYS_CMD}" DIRECTORY)
mark_as_advanced(MSYS_CMD)
endif ()
......@@ -17,9 +17,11 @@ this module looks for Perl
#]=======================================================================]
include(${CMAKE_CURRENT_LIST_DIR}/FindCygwin.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/FindMsys.cmake)
set(PERL_POSSIBLE_BIN_PATHS
${CYGWIN_INSTALL_PATH}/bin
${MSYS_INSTALL_PATH}/usr/bin
)
if(WIN32)
......
......@@ -17,15 +17,18 @@ executables or shared libs. Examples:
#]=======================================================================]
include(${CMAKE_CURRENT_LIST_DIR}/FindCygwin.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/FindMsys.cmake)
find_program(SELF_PACKER_FOR_EXECUTABLE
upx
${CYGWIN_INSTALL_PATH}/bin
${MSYS_INSTALL_PATH}/usr/bin
)
find_program(SELF_PACKER_FOR_SHARED_LIB
upx
${CYGWIN_INSTALL_PATH}/bin
${MSYS_INSTALL_PATH}/usr/bin
)
mark_as_advanced(
......
......@@ -13,10 +13,12 @@ This module looks for the Unix commands ``bash``, ``cp``, ``gzip``,
#]=======================================================================]
include(${CMAKE_CURRENT_LIST_DIR}/FindCygwin.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/FindMsys.cmake)
find_program(BASH
bash
${CYGWIN_INSTALL_PATH}/bin
${MSYS_INSTALL_PATH}/usr/bin
)
mark_as_advanced(
BASH
......@@ -25,6 +27,7 @@ mark_as_advanced(
find_program(CP
cp
${CYGWIN_INSTALL_PATH}/bin
${MSYS_INSTALL_PATH}/usr/bin
)
mark_as_advanced(
CP
......@@ -33,6 +36,7 @@ mark_as_advanced(
find_program(GZIP
gzip
${CYGWIN_INSTALL_PATH}/bin
${MSYS_INSTALL_PATH}/usr/bin
)
mark_as_advanced(
GZIP
......@@ -41,6 +45,7 @@ mark_as_advanced(
find_program(MV
mv
${CYGWIN_INSTALL_PATH}/bin
${MSYS_INSTALL_PATH}/usr/bin
)
mark_as_advanced(
MV
......@@ -49,6 +54,7 @@ mark_as_advanced(
find_program(RM
rm
${CYGWIN_INSTALL_PATH}/bin
${MSYS_INSTALL_PATH}/usr/bin
)
mark_as_advanced(
RM
......@@ -60,6 +66,7 @@ find_program(TAR
gtar
PATH
${CYGWIN_INSTALL_PATH}/bin
${MSYS_INSTALL_PATH}/usr/bin
)
mark_as_advanced(
TAR
......
......@@ -16,10 +16,12 @@ This module looks for wget. This module defines the following values:
#]=======================================================================]
include(${CMAKE_CURRENT_LIST_DIR}/FindCygwin.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/FindMsys.cmake)
find_program(WGET_EXECUTABLE
wget
${CYGWIN_INSTALL_PATH}/bin
${MSYS_INSTALL_PATH}/usr/bin
)
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment