I have successfully Done Cmake with following option.
$cmake -DGCC_COMPILER_VERSION="4.5" -DSOFTFP=ON -DUSE_NEON=ON -DCMAKE_SKIP_RPATH=ON -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-5.0 -DCUDA_ARCH_BIN="2.1(2.0)" -DCUDA_ARCH_PTX="" -DWITH_CUDA=ON -DWITH_CUBLAS=ON -DWITH_TBB=ON -DBUILD_opencv_python=OFF -DBUILD_TBB=ON -DBUILD_ZLIB=ON -DBUILD_TIFF=ON -DBUILD_JASPER=ON -DBUILD_JPEG=ON -DBUILD_PNG=ON -DBUILD_OPENEXR=ON -DCMAKE_TOOLCHAIN_FILE=/home/intecore/carma/opencv-2.4.5/platforms/linux/arm-gnueabi.toolchain.cmake /home/intecore/carma/opencv-2.4.5
But problem is occurred in make after 23% that is
[ 23%] Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_matrix_operations.cu.o
cc1plus: error: unrecognized command line option ‘-mthumb’
cc1plus: error: unrecognized command line option ‘-mfpu=neon’
CMake Error at cuda_compile_generated_matrix_operations.cu.o.cmake:198 (message):
Error generating
/home/intecore/carma/opencv-2.4.5/platforms/linux/carma_build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_matrix_operations.cu.o
make[2]: *** [modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_matrix_operations.cu.o] Error 1
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
make: *** [all] Error 2
I am not understanding where I made made mistake please give me solution.
It seems like you are using old version of CMake.
Cross-compilation with CUDA requires at least 2.8.10 CMake version. It is not available in Ubuntu repository.
Please download the latest CMake from their website: http://www.cmake.org/cmake/resources/software.html
Here is instruction for CARMA compilation: http://code.opencv.org/projects/opencv/wiki/CARMA_platform_compilation_and_testing
GTK Support
OpenCV can be compiled with UI support using GTK back-end.
Install GTK on target device.
apt-get install libgtk2.0-dev
Install GTK on host (for required header files).
apt-get install libgtk2.0-dev
Copy
/lib/arm-linux-gnueabi
and/usr/lib/arm-linux-gnueabi
folders from target to host to the same location.In addition to the two directories above, copy all files from
/usr/lib
on target to the/usr/lib/arm-linux-gnueabi
on host machine.Install
pkg-config-arm-linux-gnueabi
package on host.apt-get install pkg-config-arm-linux-gnueabi
Add next parameters to cmake command line:
-DPKG_CONFIG_EXECUTABLE=/usr/bin/arm-linux-gnueabi-pkg-config -DWITH_GTK=ON