cmake 命令
cmake .. \
-D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_SYSTEM_NAME=Linux \
-D CMAKE_SYSTEM_VERSION=1 \
-D CMAKE_SYSTEM_PROCESSOR=aarch64 \
-D CMAKE_C_COMPILER=aarch64-ca53-linux-gnu-gcc \
-D CMAKE_CXX_COMPILER=aarch64-ca53-linux-gnu-g++ \
-D BUILD_PNG=ON \
-D BUILD_JPEG=ON \
-D BUILD_TIFF=ON \
-D BUILD_WEBP=ON \
-D WITH_GSTREAMER=ON \
-D OpenJPEG=ON \
-D WITH_FREETYPE=ON \
-DFREETYPE_FOUND=ON \
-DFREETYPE_LIBRARIES=/home/yxh/dev_env/hikvision_dockerApp/aarch64-ca53-linux-gnueabihf/ffmpeg_env/freetype/bulid/__install/lib/libfreetype.so.6.17.0 \
-DFREETYPE_INCLUDE_DIRS=/home/yxh/dev_env/hikvision_dockerApp/aarch64-ca53-linux-gnueabihf/ffmpeg_env/freetype/bulid/__install/include/freetype2 \
-DHARFBUZZ_FOUND=ON \
-DHARFBUZZ_LIBRARIES=/home/yxh/dev_env/hikvision_dockerApp/aarch64-ca53-linux-gnueabihf/opencv_env/harfbuzz/build/_install/lib/libharfbuzz.so.0.10501.0 \
-DHARFBUZZ_INCLUDE_DIRS=/home/yxh/dev_env/hikvision_dockerApp/aarch64-ca53-linux-gnueabihf/opencv_env/harfbuzz/build/_install/include/harfbuzz \
-D OPENCV_ENABLE_NONFREE=ON \
-D CMAKE_INSTALL_PREFIX=/home/yxh/dev_env/hikvision_dockerApp/aarch64-ca53-linux-gnueabihf/opencv_env/opencv-4.5/build/_install \
-D OPENCV_EXTRA_MODULES_PATH=/home/yxh/dev_env/hikvision_dockerApp/aarch64-ca53-linux-gnueabihf/opencv_env/opencv-4.5.5/opencv_contrib-4.5.5/modules
参考:aarch64-linux 交叉 freetype模块失败 · Issue #3553 · opencv/opencv_contrib (github.com)
网友评论