Cross compiling OpenCV 3.4.0 on PDK 5.0.5.0

git clone https://github.com/opencv/opencv.git

cd opencv

git checkout tags/3.4.0

cd …

git clone https://github.com/opencv/opencv_extra.git

cd opencv_extra

git checkout tags/3.4.0

cd …

cd opencv

replace cmake/FindCUDA.cmake with the one from https://drive.google.com/open?id=1z88W__oDpGcOcmw6lQq8bT-OZQN2n-RB

cp /usr/local/driveworks/samples/cmake/FindCUDA/* <opencv_dir>/cmake/FindCUDA/

cp /usr/local/driveworks/samples/cmake/CMakeParseArguments.cmake <opencv_dir>/cmake/

cp /usr/local/driveworks/samples/cmake/FindPackageHandleStandardArgs.cmake <opencv_dir>/cmake/

cp /usr/local/driveworks/samples/cmake/FindPackageMessage.cmake <opencv_dir>/cmake/

mkdir build

cd build

cmake -DCMAKE_BUILD_TYPE=Release -DVIBRANTE_PDK:STRING= -DCMAKE_TOOLCHAIN_FILE=/usr/local/driveworks/samples/cmake/Toolchain-V4L.cmake -DCMAKE_INSTALL_PREFIX=./install -DBUILD_PNG=ON -DBUILD_TIFF=ON -DBUILD_TBB=OFF -DBUILD_JPEG=ON -DBUILD_JASPER=ON -DBUILD_ZLIB=ON -DBUILD_EXAMPLES=ON -DBUILD_FFMPEG=ON -DBUILD_opencv_java=OFF -DBUILD_opencv_python2=OFF -DBUILD_opencv_python3=OFF -DENABLE_NEON=ON -DWITH_OPENCL=OFF -DWITH_OPENMP=OFF -DWITH_FFMPEG=ON -DWITH_GSTREAMER=OFF -DWITH_GSTREAMER_0_10=OFF -DWITH_CUDA=ON -DWITH_GTK=OFF -DWITH_VTK=OFF -DWITH_TBB=OFF -DWITH_1394=OFF -DWITH_OPENEXR=OFF -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-9.0 -DCUDA_64_BIT_DEVICE_CODE=ON -DCUDA_ARCH_BIN=6.2 -DCUDA_ARCH_PTX="" -DINSTALL_C_EXAMPLES=ON -DINSTALL_TESTS=OFF -DVIBRANTE=TRUE VERBOSE=1 -DOPENCV_TEST_DATA_PATH=…/opencv_extra/testdata …

make -j8

make install