Преглед изворни кода

cmake: direct3d12 renderer needs d3d12.h and d3d12sdklayers.h

Older MinGW releases don't ship d3d12sdklayers.h
Anonymous Maarten пре 1 година
родитељ
комит
3af4f120d0
1 измењених фајлова са 6 додато и 1 уклоњено
  1. 6 1
      CMakeLists.txt

+ 6 - 1
CMakeLists.txt

@@ -1869,7 +1869,12 @@ elseif(WINDOWS)
 
 
     check_include_file(d3d9.h HAVE_D3D_H)
     check_include_file(d3d9.h HAVE_D3D_H)
     check_include_file(d3d11_1.h HAVE_D3D11_H)
     check_include_file(d3d11_1.h HAVE_D3D11_H)
-    check_include_file(d3d12.h HAVE_D3D12_H)
+    check_c_source_compiles("
+      #include <d3d12.h>
+      #include <d3d12sdklayers.h>
+      ID3D12Device1 *device;
+      int main(int argc, char **argv) { return 0; }
+      " HAVE_D3D12_H)
     check_include_file(ddraw.h HAVE_DDRAW_H)
     check_include_file(ddraw.h HAVE_DDRAW_H)
     check_include_file(dsound.h HAVE_DSOUND_H)
     check_include_file(dsound.h HAVE_DSOUND_H)
     check_include_file(dinput.h HAVE_DINPUT_H)
     check_include_file(dinput.h HAVE_DINPUT_H)