Synopsis
- 建置系統整合
vcpkg integrate [options] install
vcpkg integrate [options] remove
vcpkg integrate [options] project
- 殼層整合
vcpkg integrate [options] powershell
vcpkg integrate [options] bash
vcpkg integrate [options] zsh
vcpkg integrate [options] x-fish
Description
將 vcpkg 與 shell 及建置系統整合。
vcpkg integrate install
可整合 Visual Studio(僅限 Windows)、設定使用者範圍的 vcpkg 實例,並顯示 CMake 整合說明。
為了設定使用者範圍的 vcpkg 實例,vcpkg 會在使用者的全體設定位置建立幾個短檔案,包含通往 vcpkg 實例的絕對路徑:
-
%LOCALAPPDATA%\vcpkg或%APPDATA%\Local\vcpkgWindows - 非Windows< /> 或
顯示 CMake 工具鏈檔案的完整路徑。 執行此指令並非使用 toolchain 檔案的必要條件。
vcpkg integrate remove
移除了使用者範圍的 vcpkg 實例設定。
此指令會從由 建立 vcpkg integrate install的使用者全配置位置刪除連結檔案。
vcpkg integrate project
建立一個連結的 NuGet 套件用於 MSBuild 整合。
更多資訊請參見 MSBuild Per-Project Integration。
vcpkg integrate powershell
- 僅限 Windows
為目前使用者的 Powershell 設定檔新增 vcpkg 分頁補全功能。
vcpkg integrate bash
- 非Windows
新增 vcpkg 分頁補全功能,支援現有使用者 .bashrc (.bash_profile 在 macOS 上)。
vcpkg integrate zsh
- 非Windows
為目前使用者 .zshrc的 . 新增 vcpkg 分頁補全支援。
vcpkg integrate x-fish
- 非Windows
新增 vcpkg 分頁補全功能至目前使用者的魚殼補全目錄。
範例
$ vcpkg integrate install
Applied user-wide integration for this vcpkg root.
CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=/workspaces/vcpkg/scripts/buildsystems/vcpkg.cmake"
選項
所有 vcpkg 命令都支援一組 常見的選項。