当有多种不同路径头文件和库时,使用 pkgconfig来统一配置交叉编译
arm-opencv.pc
#Package Information for pkg-config prefix = /usr/local/arm/opencv exec_prefix = ${prefix} libdir = ${exec_prefix}/lib libjpng = /home/work/tools/libjpeg-turbo-1.2.1/tmp/lib includedir_old = ${prefix}/include/opencv includedir_new = ${prefix}/include include_jpng = /home/work/tools/libjpeg-turbo-1.2.1/tmp/include Name: arm-opencv Description: Open Source Computer Vision Library for ARM Version: 2.4.9 Cflags: -I${includedir_old} -I${includedir_new} -I${include_jpng} Libs:-L${libjpng} -ljpeg -L${exec_prefix}/lib -lopencv_calib3d -lopencv_contrib -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_gpu -lopencv_highgui -lopencv_imgproc -lopencv_legacy -lopencv_ml -lopencv_nonfree -lopencv_objdetect -lopencv_ocl -lopencv_photo -lopencv_stitching -lopencv_ts -lopencv_video -lopencv_videostab