目录
编译环境
源码下载
bash
git clone --recursive --branch v0.6.3 https://github.com/osqp/osqp.git libosqp-0.6.3
本地编译
bash
cd libosqp-0.6.3
cmake -B build_amd64 \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_INSTALL_PREFIX=${HOME}/libs/amd64/libosqp-0.6.3
cmake --build build_amd64 --target install
交叉编译
bash
cd libosqp-0.6.3
cmake -B build_arm64 \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_INSTALL_PREFIX=${HOME}/libs/arm64/libosqp-0.6.3 \
-D CMAKE_TOOLCHAIN_FILE=${HOME}/arm-gnu-toolchain-13.3.rel1-x86_64-aarch64-none-linux-gnu/toolchain.cmake
cmake --build build_arm64 --target install