编译时提示
CMake Error at CMakeLists.txt:24 (cmake_minimum_required):
CMake 3.22 or higher is required. You are running version 3.10.2
-- Configuring incomplete, errors occurred!
大概意思就是编译使用cmake的最低版本是 3.22,我自己的是3.10.2。这里记录的是编译cmake替换成3.22的步骤。(以下注意是在root下操作的,或者每次执行前多加个 sudo )
1、下载 cmake 3.22
2、解压编译
:~/lichang/android#tar zxvf cmake-3.22.0.tar.gz
:~/lichang/android#cd cmake-3.22.0
:~/lichang/android/cmake-3.22.0#./configure
:~/lichang/android/cmake-3.22.0#make
:~/lichang/android/cmake-3.22.0#make install
:~/lichang/android/cmake-3.22.0# cmake --version
cmake version 3.22.0
CMake suite maintained and supported by Kitware (kitware.com/cmake).
下载版本的地址如下: