Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set the CMAKE_PREFIX_PATH?

Tags:

cmake

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?

like image 485
Alasdair Avatar asked Nov 05 '11 10:11

Alasdair


People also ask

What is the CMAKE_PREFIX_PATH?

CMAKE_PREFIX_PATH works as a build directive, rather than as an environment variable. 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).

How do I change my path in cmake?

CMake will use whatever path the running CMake executable is in. Furthermore, it may get confused if you switch paths between runs without clearing the cache. So what you have to do is simply instead of running cmake <path_to_src> from the command line, run ~/usr/cmake-path/bin/cmake <path_to_src> .


1 Answers

Try to run cmake -DCMAKE_PREFIX_PATH=/your/path .

like image 123
arrowd Avatar answered Oct 06 '22 00:10

arrowd