When I try to bootstrap CMake (regardless of parameters for as far as I can see) it fails with the following error:
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CURSES_CURSES_H_PATH
used as include directory in directory /usr/src/cmake-2.8.6/Source/CursesDialog/form
used as include directory in directory /usr/src/cmake-2.8.6/Source
Although it can find libcurses...
-- Looking for wsyncup in /usr/lib/libcurses.so
-- Looking for wsyncup in /usr/lib/libcurses.so - found
The problem seems to lie in the fact that my curses.h header file is in /usr/include/ncursesw instead of in /usr/include. It would seem that CMake needs curses to build and cannot use ncurses... Strangely, I've compiled ncurses conform Linux From Scratch and which places the headers in that subfolder (ncursesw). Compiling non-wide versions didn't work either, as the headers are placed in /usr/include/ncurses. CMake is part of Beyond Linux From Scratch, but I don't see any workarounds there, so I'm puzzled why BLFS doesn't encounter the same problems...
I've come up with a workaround that works for my situation, but I don't know if this is a good solution or will cause problems in the future...
sed -i "s#FIND_FILE(CURSES_HAVE_CURSES_H curses.h )#FIND_FILE(CURSES_HAVE_CURSES_H curses.h HINTS /usr/include/ncursesw )#" Modules/FindCurses.cmake
sed -i "s#FIND_PATH(CURSES_CURSES_H_PATH curses.h )#FIND_PATH(CURSES_CURSES_H_PATH curses.h HINTS /usr/include/ncursesw )#" Modules/FindCurses.cmake
I've hinted the FindCurses script to look for curses.h in the /usr/include/ncursesw folder.
Hi,
ReplyDeleteAnother workaround is to make symlinks like this :
ln -s ncursesw/curses.h /usr/include/curses.h
ln -s ncursesw/ncurses.h /usr/include/ncurses.h
Cheers,
--
Eric