[CMake] MSYS FIND_LIBRARY problem

Brandon J. Van Every bvanevery at gmail.com
Tue Nov 29 21:45:55 EST 2005


I am trying to build CMake-2.2.2 from sources on MSYS using CMake.  It 
turns out there's a binary of pdcurses available for MinGW / MSYS, so I 
installed it.  I verified that as far as my MSYS shell is concerned, the 
libraries are in the right places:

vanevery at VANGOGH ~/mingw/cmake-2.2.2
$ ls /usr/local/lib
libpanel.a  libpdcurses.a

vanevery at VANGOGH ~/mingw/cmake-2.2.2
$ ls /usr/local/include
curses.h  panel.h

The following code is in cmake-2.2.2/Modules/FindCurses.cmake

FIND_LIBRARY(CURSES_LIBRARY
  NAMES curses ncurses
  PATHS
    /usr/local/lib
    /usr/lib
    /lib
)

So, I thought it would be straightforward to add pdcurses to it:

FIND_LIBRARY(CURSES_LIBRARY
  NAMES curses ncurses pdcurses
  PATHS
    /usr/local/lib
    /usr/lib
    /lib
)

but when I run 'cmake -G "Unix Makefiles"' to build CMake, this doesn't 
work.  I always delete CMakeCache.txt before trying this, just for 
paranoia, so that's not the problem.  Here's what *does* work:

FIND_LIBRARY(CURSES_LIBRARY
  NAMES curses ncurses pdcurses
  PATHS
    /usr/local/lib
    /usr/lib
    /lib
    D:/app/msys/1.0/local/lib
)

FIND_PATH(CURSES_INCLUDE_PATH
  curses.h
  /usr/local/include
  /usr/include
  D:/app/msys/1.0/local/include
)

which is a very non-MSYS way to do things.  What gives?  Also, the check 
for curses is silent.  i.e. I don't get a "-- Checking for blah blah 
blah" message, nor any verification of success, only an error message if 
the check fails.


Cheers,
Brandon Van Every




More information about the CMake mailing list