下に書いているように,vcpkg を利用してインストールすることができる. 特に問題がない場合には vcpkg の利用してのインストールを検討しよう. vcpkg を使わずにインストールする必要がある場合は,このページの手順によりインストールを行うことができる.
Windows での Build Tools for Visual Studio 2022 (ビルドツール for Visual Studio 2022) のインストール: 別ページ »で説明している.
次のコマンドを実行
if not exist c:\vcpkg ( cd c:\ rmdir /s /q vcpkg git clone https://github.com/microsoft/vcpkg cd c:\vcpkg git pull .\bootstrap-vcpkg.bat .\vcpkg update .\vcpkg integrate install 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\")" )
次のコマンドを実行
c:\vcpkg\vcpkg search glew c:\vcpkg\vcpkg install --triplet x64-windows glew powershell -command "[System.Environment]::SetEnvironmentVariable(\"GLEW_ROOT\", \"C:\vcpkg\installed\x64-windows\", \"Machine\")"
コマンドプロンプトを管理者として実行: 別ページ »で説明
cd c:\ mkdir glew cd glew curl -L -O https://sourceforge.net/projects/glew/files/glew/2.2.0/glew-2.2.0-win32.zip powershell -command "Expand-Archive -Path glew-2.2.0-win32.zip ."
次のコマンドを実行
powershell -command "$oldpath = [System.Environment]::GetEnvironmentVariable(\"Path\", \"Machine\"); $oldpath += \";c:\glew\glew-2.2.0\bin\"; [System.Environment]::SetEnvironmentVariable(\"Path\", $oldpath, \"Machine\")"
次のコマンドを実行
powershell -command "[System.Environment]::SetEnvironmentVariable(\"GLEW_ROOT\", \"c:\glew\glew-2.2.0\", \"Machine\")"