Modules/FindHg.cmake cannot find Mercurial under MSYS/MinGW-W64
My environment (subversion added just for comparison):
$ uname -a
MINGW64_NT-10.0-19045 jdxpc 3.4.6.x86_64 2023-04-01 11:43 UTC x86_64 Msys
$ cmake --version
cmake version 3.26.3
CMake suite maintained and supported by Kitware (kitware.com/cmake).
$ which hg
/usr/bin/hg
$ which svn
/usr/bin/svn
$ hg --version
Mercurial Distributed SCM (version 6.3.3)
(see https://mercurial-scm.org for more information)
Copyright (C) 2005-2023 Olivia Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ svn --version
svn, version 1.14.2 (r1899510)
compiled Mar 16 2023, 17:32:52 on x86_64-pc-msys
Copyright (C) 2022 The Apache Software Foundation.
This software consists of contributions made by many people;
see the NOTICE file for more information.
Subversion is open source software, see http://subversion.apache.org/
The following repository access (RA) modules are available:
* ra_svn : Module for accessing a repository using the svn network protocol.
- with Cyrus SASL authentication
- handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
- handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
- using serf 1.3.9 (compiled with 1.3.9)
- handles 'http' scheme
- handles 'https' scheme
The following authentication credential caches are available:
* GPG-Agent
$
The following code:
find_program(MY_HG_EXECUTABLE NAMES hg)
message("MY_HG_EXECUTABLE: ${MY_HG_EXECUTABLE}")
find_package(Hg)
find_package(Subversion)
gives following messages:
MY_HG_EXECUTABLE: C:/Tools/MSYS/usr/bin/hg
-- Could NOT find Hg (missing: HG_EXECUTABLE)
-- Found Subversion: C:/Tools/MSYS/usr/bin/svn.exe (found version "1.14.2")