在arm平台交叉编译opencv

1.copy opencv install file  to arm equipemnt

2.configure cmakelists file of project

cmake_minimum_required(VERSION 3.1)

#set(LIBS ${OpenCV_LIBS} ${EIGEN3_LIBS} ${Pangolin_LIBRARIES} -lboost_system)


#set(OpenCV_DIR /home/nvidia/install_tx1)

set(OpenCV_DIR   /home/nvidia/install_tx1/)

set(Opencv_INCLUDE_DIRS /home/nvidia/install_tx1/include/opencv4/)
set(Opencv_LIBRARIES_DIRS /home/nvidia/install_tx1/lib)
find_package( OpenCV HINTS  /home/nvidia/install_tx1/)
include_directories(${Opencv_INCLUDE_DIRS})
link_directories(${Opencv_LIBRARIES_DIRS})
#find_package(OpenCV REQUIRED)
find_package(Threads)
#find_package(OpenCV REQUIRED core)

find_package(Threads)


add_compile_options(-std=c++11)

add_executable(testOpemcv main.cpp)
target_link_libraries( testOpemcv ${CMAKE_THREAD_LIBS_INIT})

target_link_libraries(testOpemcv ${OpenCV_LIBS} )
 

你可能感兴趣的:(在arm平台交叉编译opencv)