0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

vcpkgのインストール

Posted at

vcpkgはWindowsの(あんまり便利じゃない)パッケージ管理プログラムです。

コマンド

C:\に移動し管理者権限で以下のコマンドを実行する。

.bat
git clone https://github.com/microsoft/vcpkg
cd c:\vcpkg
git pull
.\bootstrap-vcpkg.bat
cd c:\
c:\vcpkg\vcpkg update
c:\vcpkg\vcpkg integrate install 

環境変数

システムの環境変数に以下の環境変数を追加してください。

環境変数名 パス
VCPKG_ROOT c:\vcpkg
VCPKG_DEFAULT_TRIPLET x64-windows
CMAKE_TOOLCHAIN_FILE c:/vcpkg/scripts/buildsystems/vcpkg.cmake
LIB c:/vcpkg/installed/x64-windows/lib
INCLUDE c:/vcpkg/installed/x64-windows/include
Path c:/vcpkg
Path c:/vcpkg/installed/x64-windows/bin
.bat
powershell -command "[System.Environment]::SetEnvironmentVariable(\"VCPKG_ROOT\", \"c:\vcpkg\", \"Machine\")"
powershell -command "[System.Environment]::SetEnvironmentVariable(\"VCPKG_DEFAULT_TRIPLET\", \"x64-windows\", \"Machine\")"
powershell -command "[System.Environment]::SetEnvironmentVariable(\"CMAKE_TOOLCHAIN_FILE\", \"c:/vcpkg/scripts/buildsystems/vcpkg.cmake\", \"Machine\")"
powershell -command "$oldpath = [System.Environment]::GetEnvironmentVariable(\"LIB\", \"Machine\"); $oldpath += \";c:\vcpkg\installed\x64-windows\lib\"; [System.Environment]::SetEnvironmentVariable(\"LIB\", $oldpath, \"Machine\")"
powershell -command "$oldpath = [System.Environment]::GetEnvironmentVariable(\"INCLUDE\", \"Machine\"); $oldpath += \";c:\vcpkg\installed\x64-windows\include\"; [System.Environment]::SetEnvironmentVariable(\"INCLUDE\", $oldpath, \"Machine\")"
powershell -command "$oldpath = [System.Environment]::GetEnvironmentVariable(\"Path\", \"Machine\"); $oldpath += \";c:\vcpkg\"; [System.Environment]::SetEnvironmentVariable(\"Path\", $oldpath, \"Machine\")"
powershell -command "$oldpath = [System.Environment]::GetEnvironmentVariable(\"Path\", \"Machine\"); $oldpath += \";c:\vcpkg\installed\x64-windows\bin\"; [System.Environment]::SetEnvironmentVariable(\"Path\", $oldpath, \"Machine\")"

以上、お疲れ様でしたー

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?