- apt安装
1
2
3sudo apt install -y cmake
# check for version
cmake --version - 指定版本安装
1
2
3wget -q -O cmake-linux.sh https://github.com/Kitware/CMake/releases/download/v3.19.6/cmake-3.19.6-Linux-x86_64.sh
sh cmake-linux.sh -- --skip-license --prefix=$MY_INSTALL_DIR
rm cmake-linux.sh
CMakeLists.txt windows
window下使用Qt cmake工程,使用的代码中有lf结尾的文件,编译是的头文件和源文件链接失败问题,在cmake文件中添加:
1 | if (MSVC) |