[CMake] Finding libs/headers on MSYS/MinGW

Kai Sterker kai.sterker at gmail.com
Wed Sep 27 17:04:32 EDT 2006


On 9/27/06, Brad King <brad.king at kitware.com> wrote:

> I'm not sure this is a bug.  The msys prefix has special meaning only
> for some native msys tools.  The fact that you have chosen to install
> other things there is no different than installing them in
> c:/my/random/path (I think, but I'm not an MSYS expert).

Neither am I. For me it acts as a cygwin replacement, so I did what I
would have done there. (Installing stuff to /usr/local). I don't know
whether that's common practice among MSYS users, as I discovered MSYS
just recently.


> For now you can solve this by setting up CMAKE_INCLUDE_PATH and
> CMAKE_LIBRARY_PATH in your MSYS shell's environment to point at
> c:/msys/1.0/usr/local/include and c:/msys/1.0/usr/local/lib.  Then CMake
> will be able to find everything.

Nice. That did the trick.  Even better, I can specifiy the path as
/usr/local/include and /usr/local/lib and cmake will convert it to the
proper Windows path all by itself.

In fact, configure based builds also required me to set CFLAGS and
LDFLAGS to point to these directories, so I don't think there is
anything wrong with cmake here. I just didn't know the proper spell to
make it work.

With that in mind, I don't think it would be appropriate to make a
feature request just now. If I run into more serious problems further
down the road I might reconsider, but at present I'm happy with this
solution :-). Thanks Brad!

Kai


More information about the CMake mailing list