[CMake] CMake2.5 - wrong default install location for mingw

Miguel A. Figueroa-Villanueva miguelf at ieee.org
Sat Oct 20 10:42:03 EDT 2007


Hello,

I just want to make a point here that usually the CMake developers
(Bill included) make every effort to tailor CMake to the users needs
and that this is simply something that, although controversial, is the
way it is supposed to be. That is, I would have to agree with Bill
here.

More below.

On 10/20/07, Bill Hoffman wrote:
> Gonzalo Garramuño wrote:
> > Andreas Pakulat wrote:
> >> But exactly that is not supposed to happen.
> >
> > Why not?  Maybe I was not clear:
> >
> > cmake2.5 has a "MSYS Makefile" generator.
> >
> > I did -G "MSYS Makefile" and I got an install on $PROGRAMFILES.  That's
> > not correct.
> >
> > If I wanted to install in $PROGRAMFILES, there's NMake Makefiles or many
> > of the other Windows specific generators.
> >
> > MSYS Makefile should install on /usr/local.  I already showed how you
> > can relatively safely figure out where /usr/local is as a win32 path.
> >

The "MSYS Makefile" generator is there to help users compile stuff
using the MSYS platform ("Minimal SYStem", emphasis on minimal) not to
help increasing the number of tools/applications in MSYS itself.

Quoting Bill in another thread: "The MSYS makefiles are for using make
and /bin/sh that comes with msys to do the build. The MinGW makefiles
are for using mingw32-make and the windows command shell."

Even if there was a cmake compiled for msys (i.e., to link with the
msys runtime... an msys version of cmake), I still don't think the
default should be to install in /usr/local. And if all the other
stuff, as Gonzalo points out, install in /usr/local its because they
are doing the wrong thing and have not been ported correctly.

Now all of this is of course arguing from a philosophical and general
point of view. In case you find yourself needing/wanting this then it
is trivial to make it work from the CMakeLists.txt itself as Bill
posted:

> Something like:
>
> if(CMAKE_GENERATOR MATCHES "MSYS")
>     SET(CMAKE_INSTALL_PREFIX  "/what/ever/you/want")
> ...

It doesn't even require a fork of the CMake source tree to handle it...

Just my 2 cents,
--Miguel


More information about the CMake mailing list