Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Cross compile OpenCV but failed to find 3rd party library

Hi,

I want to cross compile customized OpenCV for arm board in my Linux x86 host machine. I followed tutorial here http://processors.wiki.ti.com/index.php/Building_OpenCV_for_ARM_Cortex-A8

But set( CMAKE_FIND_ROOT_PATH "YOUR_LIB_PATH_LIST" ) can't find all my library listed in "YOUR_LIB_PATH_LIST".

I googled CMAKE about CMAKE_FIND_ROOT_PATH in (http://www.vtk.org/Wiki/CMake_Cross_Compiling). It says it will find "YOUR_LIB_PATH_LIST"/lib, "YOUR_LIB_PATH_LIST"/usr/lib, /lib and /usr/lib. The statement in cmake doc also implies that you can add additional path. But I tried. The additional path doesn't work.

I use NFS to mount library folder to my host machine. I can managed to make target machine /lib and /usr/lib accessible in CMAKE_FIND_ROOT_PATH by some tricks. But I can't make /usr/local/lib works.

Any comments will be appreciated.