Cross Compiling For Jetson - OpenCV + CUDA

All, I am trying to cross compile a test program that uses OpenCV with Cuda, and I’m having trouble finalizing the linking with OpenCV. It’s requiring me link to every single opencv_library, and next up is “cvShowImage” . I don’t want to cross link to opencv_highgui and deal with the absurd amount of gtk links.

How can I get around linking opencv_highgui?

Host: Ubuntu 12.04 64 bit
Build: CMake + toolchain file

Steps So Far:

  1. Installed OpenCV and CUDA on Jetson
  2. Installed Cross Compile CUDA on host
  3. Succesfully Created Jetson Toolchain CMake
  4. Tested CUDA only cross compile - Successful compile/link/run
  5. Copied OpenCV libraries from Jetson Board to my own toolchain directory
  6. Copied from Jetson Board to my own toolchain directory

Current Link Line:

/usr/bin/arm-linux-gnueabihf-g++-4.6    -mthumb -fdata-sections -Wa,--noexecstack -fsigned-char -Wno-psabi -mfpu=vfpv3-d16  -Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,-z,nocopyreloc -Wl,-rpath-link,/usr/local/cuda/targets/armv7-linux-gnueabihf/lib CMakeFiles/test_cuda_opencv_functions.dir/src/test_cuda_opencv_functions.cpp.o  -o test_cuda_opencv_functions -rdynamic -L/home/constantin/workspace/jetson_work/toolchain/lib -L/usr/local/cuda/targets/armv7-linux-gnueabihf/lib -lm -lz -lrt -lcudart -lcublas -lcufft -lopencv_core -lopencv_imgproc -lopencv_objdetect -lopencv_calib3d -lopencv_flann -lopencv_gpu

I think the main problem here is that libopencv_gpu links to highgui. This is so bad…