Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

there are 3 folders involved here:

  1. the src folder
  2. the build folder (where all temporyry files are built)
  3. the install folder (final location for libs & headers, usually /usr/local on linux)

assuming, your src is in /home/xxx/opencv, and you would want to build in /home/yyy/opencv and finally install to /home/zzz/opencv, the cmdline would be:

mkdir /home/yyy/opencv cd /home/yyy/opencv

cmake -D CMAKE_INSTALL_PREFIX=/home/zzz/opencv /home/xxx/opencv

in other words: the src dir should be the last argument.

there are 3 folders involved here:

  1. the src folder
  2. the build folder (where all temporyry files are built)
  3. the install folder (final location for libs & headers, usually /usr/local on linux)

assuming, your src is in /home/xxx/opencv, and you would want to build in /home/yyy/opencv and finally install to /home/zzz/opencv, the cmdline would be:

mkdir /home/yyy/opencv
cd /home/yyy/opencv

/home/yyy/opencv

cmake -D CMAKE_INSTALL_PREFIX=/home/zzz/opencv /home/xxx/opencv

/home/xxx/opencv

in other words: the src dir should be the last argument.argument in the cmake cmdline.

there are 3 folders involved here:

  1. the src folder
  2. the build folder (where all temporyry temporary files are built)built, you may delete it after successfully installing !)
  3. the install folder (final location for libs & headers, usually /usr/local on linux)

assuming, your src is in /home/xxx/opencv, and you would want to build in /home/yyy/opencv and finally install to /home/zzz/opencv, the cmdline would be:

mkdir /home/yyy/opencv
cd /home/yyy/opencv

cmake -D CMAKE_INSTALL_PREFIX=/home/zzz/opencv  /home/xxx/opencv

in other words: the src dir should be the last argument in the cmake cmdline.