[CMake] CMake2.5 - wrong default install location for mingw
Bill Hoffman
bill.hoffman at kitware.com
Sun Oct 21 10:31:46 EDT 2007
Gonzalo Garramuño wrote:
> Bill Hoffman wrote:
>>
>> Looks like a nice patch that you can put in your cmakelist files. I
>> still do not think it should go in CMake. I don't think that things
>> built by cmake that are native windows things belong in the /usr/local
>> mount point of msys. If you do, it is easy enough to change your
>> project to install by default in anywhere you want.
>>
> Okay, I looked at the C++ code of MSYS generator. And surprise,
> surprise. It does EXACTLY what I said to do of searching the path (but
> looks for make.exe instead of sh.exe). Also it uselessly (and somewhat
> potentially incorrectly) parses /etc/fstab to find where mingw's bin
> directory is (and does not cache any of the other paths, which could
> indeed potentially allow FIND_PATH() and others to work with mingw paths
> eventually).
>
> The C++ code just forgets to set CMAKE_INSTALL_PREFIX to MSYS proper
> values. I'll revert this .cmake patch and I'll give you a C++ patch of
> it instead, as the code is much cleaner that way. And to be honest, I
> find the C++ code to be much more readable than the .cmake code (which
> is somewhat disturbing).
>
The C++ code did not "forget" anything. I intentionally do not set the
CMAKE_INSTALL_PREFIX to the equivalent of /usr/local in a windows PATH
because I think it is the wrong default. I still think that it is
correct to install into program files. The only case where I would
accept /usr/local as the default for make install for msys, is if
someone made a native msys version of cmake that linked to the msys run
time. That would be a cmake used for creating other msys applications
that would install into /usr/local for msys. If cmake is creating a
native windows application that uses the microsoft run time, then it is
a native windows application and it belongs in program files. Native
windows applications do not belong in /usr/local (since they don't even
know what /usr/local is).
Perhaps it would help if you explained your use case. Your original
email said that the install overwrote your MSVC version of your
software. Why would you want to build MSVC and an MSYS version of your
software on the same machine? Do they behave differently? Or, are you
just testing to make sure your stuff can be built by both MSVC and MSYS?
If they do not behave differently, why would you want one installed in
program files and one in /usr/local?
-Bill
More information about the CMake
mailing list