mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-01 01:10:34 +08:00
chore: devcontainer适配CMakePresets.json (#15606)
* build: 添加新的可在linux系统上使用的cmake预设 * chore: 将devcontainer中的部分cmake配置移除 * chore: devcontainer中使用kitware的apt源以安装最新版本cmake
This commit is contained in:
@@ -8,6 +8,17 @@ ARG CLANGD_VERSION=20
|
||||
ARG PYTHON_VERSION=3.12.11
|
||||
ARG NODEJS_VERSION=24
|
||||
|
||||
# Add kitware's apt repository (for cmake)
|
||||
RUN curl -fsSL https://apt.kitware.com/keys/kitware-archive-latest.asc | sudo gpg --dearmor -o /usr/share/keyrings/kitware-archive-keyring.gpg
|
||||
RUN cat <<EOF | sudo tee /etc/apt/sources.list.d/kitware.sources
|
||||
Types: deb
|
||||
URIs: https://apt.kitware.com/ubuntu
|
||||
Suites: $(lsb_release -cs)
|
||||
Components: main
|
||||
Architectures: $(dpkg --print-architecture)
|
||||
Signed-By: /usr/share/keyrings/kitware-archive-keyring.gpg
|
||||
EOF
|
||||
|
||||
# Install system dependencies
|
||||
RUN sudo apt update \
|
||||
&& sudo apt upgrade -y \
|
||||
|
||||
@@ -60,10 +60,6 @@
|
||||
"python.terminal.activateEnvironment": false,
|
||||
|
||||
// CMake settings
|
||||
"cmake.configureSettings": {
|
||||
"BUILD_DEBUG_DEMO": "ON",
|
||||
"CMAKE_TOOLCHAIN_FILE": "src/MaaUtils/MaaDeps/cmake/maa-x64-linux-toolchain.cmake"
|
||||
},
|
||||
"cmake.configureOnOpen": false,
|
||||
|
||||
// Performance optimizations
|
||||
|
||||
@@ -20,6 +20,21 @@
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux",
|
||||
"displayName": "Linux x64 (Unix Makefiles)",
|
||||
"generator": "Unix Makefiles",
|
||||
"binaryDir": "${sourceDir}/build",
|
||||
"cacheVariables": {
|
||||
"BUILD_DEBUG_DEMO": "ON",
|
||||
"CMAKE_TOOLCHAIN_FILE": "src/MaaUtils/MaaDeps/cmake/maa-x64-linux-toolchain.cmake"
|
||||
},
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Linux"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user