LoginSignup
1
0

More than 5 years have passed since last update.

DirectX Shader Compilerをビルドするまでにやったことのメモ

Posted at

Visual Studio 2017 15.8.4,CMake 3.12.0,Windows 10 Pro 1803,Python 3.6.6 (anaconda)でDirectX Shader Compilerをビルドしようとした際の手順のメモ.

  • Windows Driver Kitをインストール

  • utils\hct\hctstart.cmd に 手元のCMakeのバージョンを追加

次の最後の行のようにCMake 3.12.0で警告が出ないように調整.

cmake --version | findstr 3.4.3 1>nul 2>nul
if "0"=="%ERRORLEVEL%" exit /b 0
cmake --version | findstr 3.7.2 1>nul 2>nul
if "0"=="%ERRORLEVEL%" exit /b 0
cmake --version | findstr 3.9.0-MSVC 1>nul 2>nul
if "0"=="%ERRORLEVEL%" exit /b 0
cmake --version | findstr 3.11.2 1>nul 2>nul
if "0"=="%ERRORLEVEL%" exit /b 0
cmake --version | findstr 3.12.0 1>nul 2>nul
if "0"=="%ERRORLEVEL%" exit /b 0
  • CMakeLists.txtにC++14を利用するよう指定を追加.
add_compile_options("/std:c++14")

std::unary_functionがC++17からは削除されているため,それを使っている部分がビルドが通らない.

これで,あとは公式にある手順通り,utils\hct\hctshortcut.jsをダブルクリックし,デスクトップにできているHLSL Consoleでhctbuildを実行すれば良い.

1
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
1
0