CMake找不到诅咒 [英] CMake can't find Curses
问题描述
I am trying to compile the openlase library from www.marcansoft.com and have been running into problems with CMake. CMake is returning an error stating that it cannot find Curses, and after a lot of looking I am still stumped as to what the issue is. I have checked that I have the various ncurses packages installed but still the error persists. Im not very familiar with CMake but I was able to resolve other dependency issues that arose before this one. The following is the output in terminal.
tom@SILVER:~/dev/openlase$ cmake ./
-- Found JACK
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:70 (MESSAGE):
Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/FindCurses.cmake:159 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
examples/27c3_slides/CMakeLists.txt:3 (find_package)
-- Configuring incomplete, errors occurred!
任何帮助将不胜感激.
- 汤姆
推荐答案
以下是解决我在Ubuntu 12.04 x86_64 (64位)(感谢syslogic)
Here is what fixed my problems on Ubuntu 12.04 x86_64 (64 bit) (Thanks syslogic )
无论出于什么原因(也许是凌晨1:00),将CURSES_USE_NCURSES设置为TRUE似乎都不起作用.因此,我从事了黑客工作.
For whatever reason (1:00 am maybe?) setting CURSES_USE_NCURSES TRUE didn't seem to work. So I went with a hack job.
验证已安装:
$ sudo apt-get install libncurses5-dev
您会看到一些效果:libncurses5-dev is already the newest version.
因此找到该库并包含.
$ locate libncurses.so
注意位置,我的是:/usr/lib/x86_64-linux-gnu/libncurses.so
$ locate curses.h
再次注意位置,我的:
/usr/include
Note location again, mine:
/usr/include
在:<cmake source dir>/Modules/FindCurses.cmake
在评论后紧随其后添加在顶部
add at the top, right after the comments
set( CMAKE_INCLUDE_PATH "/usr/include")
set( CMAKE_LIBRARY_PATH "/usr/lib/x86_64-linux-gnu/libncurses.so")
然后冲洗重复构建过程
./bootstrap
make
sudo make install
ccmake现在应该已安装.
ccmake should now be installed.
您的朋友
这篇关于CMake找不到诅咒的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!