如何让 CMake 找到我的替代 Boost 安装? [英] How can I get CMake to find my alternative Boost installation?
问题描述
我已经在 /usr/local
中安装了最新版本的 Boost(包含在 /usr/local/include/boost
和库在 /usr/local/lib/boost
),我现在正尝试从源代码安装 Wt,但 CMake(2.6 版)似乎找不到 Boost 安装.它试图提供有关设置 BOOST_DIR 和 Boost_LIBRARYDIR 的有用建议,但我无法通过调整这些变量来使其工作.
I have installed the most recent version of Boost in /usr/local
(with includes in /usr/local/include/boost
and libraries in /usr/local/lib/boost
) and I am now attempting to install Wt from source, but CMake (version 2.6) can't seem to find the Boost installation. It tries to give helpful suggestions about setting BOOST_DIR and Boost_LIBRARYDIR, but I haven't been able to get it to work by tweaking these variables.
我收到的最新错误消息是它找不到库,但它似乎表明它正在使用/usr/local/include"作为包含路径,这是不正确的(并且我似乎无法修复它).是否有解决方案可以解决这个问题,还是我需要在 CMake 内部四处走动才能弄清楚?
The most recent error message that I get is that it can't find the libraries, but it seems to indicate that it is using "/usr/local/include" for the include path, which isn't correct (and I can't seem to fix it). Is there a solution for this off the top of their head, or do I need to go mucking around inside CMake to figure it out?
推荐答案
在 CMake 中挖掘和试验后,我确定 CMake 对我所有的 Boost 库都包含在 /usr/local 中这一事实感到不满/lib/boost
而不是 /usr/local/lib
.一旦我将它们软链接回来,构建就成功了.
After digging around in CMake and experimenting, I determined that CMake was unhappy with the fact that all of my Boost libraries were contained in /usr/local/lib/boost
and not /usr/local/lib
. Once I soft-linked them back out, the build worked.
这篇关于如何让 CMake 找到我的替代 Boost 安装?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!