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\")"
以上、お疲れ様でしたー