一、解决编译报错
undefined reference to `png_riffle_palette_neon 找到3rdparty/libpng/pngpriv.h文件,第129行将
# if (defined(ARM_NEON) || defined(__ARM_NEON)) && \
改成
# if defined(PNG_ARM_NEON) && (defined(ARM_NEON) || defined(__ARM_NEON)) && \
二、编译
cmake -DCMAKE_C_COMPILER=/opt/rv1126_toolchain/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc \
-DCMAKE_CXX_COMPILER=/opt/rv1126_toolchain/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ \
-DWITH_CUDA=OFF \
-DENABLE_PRECOMPILED_HEADERS=OFF \
-DCUDA_GENERATION=Kepler \
-DCMAKE_INSTALL_PREFIX=./install \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_ZLIB=ON \
-DWITH_ZLIB=ON \
-DBUILD_TIFF=ON \
-DWITH_TIFF=ON \
-DBUILD_JASPER=ON \
-DWITH_JASPER=ON \
-DBUILD_JPEG=ON \
-DWITH_JPEG=ON \
-DBUILD_PNG=ON \
-DWITH_PNG=ON \
-DACTUAL_3DPARTY_DIR=../3rdparty ..
make && make install