源码:libjpeg-turbo-3.0.0.tar.gz
Step 1:解压源码
tar -xvzf libjpeg-turbo-3.0.0.tar.gz
cd libjpeg-turbo-3.0.0/
Step 2:新建安装目录
mkdir arm_libjpeg
Step 3:CMake 生成 makefile
创建编译目录
mkdir build
cd build/
新建文件 aarch64.cmake,添加如下内容
SET(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR aarch64)
SET(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)
SET(CMAKE_C_COMPILER aarch64-linux-gnu-gcc)
CMake 生成 makefile
cmake ../ -DCMAKE_TOOLCHAIN_FILE=./aarch64.cmake -DCMAKE_INSTALL_PREFIX=/home/xxx/share/3rdparty/libjpeg-turbo-3.0.0/arm_libjpeg
Step 4:编译安装
make
make install