How to set the CMAKE_PREFIX_PATH?

2019-02-17 19:37发布

I have a problem with the global environmental variable CMAKE_PREFIX_PATH. I already set this and I can see it is set when I type env, but when I run cmake . to build HipHop, it tells me that the variable isn't set.

Is there a way I can hard-code this into the makefiles?

标签: cmake
2条回答
看我几分像从前
2楼-- · 2019-02-17 20:23

Try to run cmake -D CMAKE_PREFIX_PATH=/your/path .

查看更多
\"骚年 ilove
3楼-- · 2019-02-17 20:25

CMAKE_PREFIX_PATH is not an environment variable, but rather a build directive. Moreover, you may perform the build into a dedicated temporary directory (it's cleaner, because when done, you can remove that temporary directory and you get back a clean pristine source tree).

$ mkdir -p tmpbuild && cd tmpbuild
$ cmake -DCMAKE_PREFIX_PATH=~/deliveries/hiphop ..
$ make install
$ cd ..
查看更多
登录 后发表回答