[CMake] ncurses.h compile problem

Bill Hoffman bill.hoffman at kitware.com
Wed May 8 17:04:09 EDT 2013


On 5/6/2013 7:04 PM, smu johnson wrote:
> Hi.
>
> Long story short, I am trying to compile cmake using my own compiled
> ncurses library, and it complains that it can't find ncurses/ncurses.h.
>
> I had no problem compiling tmux and telling it where ncurses libraries
> and includes where, though.  And the symlink definitely exists.
>
> sjohnson at li213-89:~$ ls -l "$HOME/local/include/ncurses/ncurses.h"
> lrwxrwxrwx 1 sjohnson sjohnson     8 May  6 19:48
> /home/sjohnson/local/include/ncurses/ncurses.h -> curses.h
>
> The configure strings I have tried:
>
> 1) CFLAGS="-I$HOME/local/include/ncurses" LDFLAGS="-L$HOME/local/lib"
> ./configure "--prefix=$HOME/local"
> 2) CFLAGS="-I$HOME/local/include" LDFLAGS="-L$HOME/local/lib"
> ./configure "--prefix=$HOME/local"
>
> ... but still the same error when that finishes and I type ''make'':
> "ncurses/ncurses.h: No such file or directory"
>
> Googling just simply that error message in quotes shows CMAKE as the
> first result, so it seems like I'm not the only one.
>
> Any help greatly appreciated.
>
You don't want to mess around with -I stuff.  You want to change the 
cmake cache to have CURSES_INCLUDE_DIR set correctly.   See 
FindCurses.cmake for more information.

-Bill



More information about the CMake mailing list