OpenCV CMake configuration option: INSTALL_TO_MANGLED_PATHS

Viewed 202

I'm kind of new to OpenCV, and I am having trouble finding information about the INSTALL_TO_MANGLED_PATHS option, in CMake, for OpenCV configuration. Can anyone help me understand the purpose of this option? Thanks!

1 Answers

The INSTALL_TO_MANGLED_PATHS configuration option can be provided in the cmake command line to allow OpenCV to use non-standard ("mangled") paths during installation, which is useful when you want to install two versions of OpenCV side-by-side.

cmake -G "Unix Makefiles" \
  -D CMAKE_INSTALL_PREFIX=/usr/local \
  -D ENABLE_NEON=ON \
  -D ENABLE_FAST_MATH=ON \
  -D INSTALL_TO_MANGLED_PATHS=ON \ 
  ...

CMake will append the OpenCV version to the install path names, to allow two separate versions to co-exist happily on the same machine.

See the description of this option in the OpenCV CMake code:

OCV_OPTION(INSTALL_TO_MANGLED_PATHS "Enables mangled install paths, that help with side by side installs." OFF ...
Related