Skip to content

MinGW: Search for packages in standard MSYSTEM environment prefixes

Brad King requested to merge brad.king/cmake:mingw-search-prefixes into master

MSYS2 and similar MinGW/MSYS distributions define development environments with a MSYSTEM environment variable. Each such environment has a documented installation prefix for its packages, often provided by a MSYSTEM_PREFIX environment variable. Since !8788 (merged) we can look up this prefix.

Add $MSYSTEM_PREFIX/local and $MSYSTEM_PREFIX to our system search prefixes when targeting MinGW under MSYSTEM environments. This is their equivalent to /usr/local and /usr, which we search by default on UNIX systems.

Issue: #24216 (closed)

Merge request reports