Forráskód Böngészése

Fix the XAudio2 detection logic on Windows platform.

Yao Wei Tjong 姚伟忠 9 éve
szülő
commit
650238cb0b
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      CMake/Modules/FindDirectX.cmake

+ 2 - 2
CMake/Modules/FindDirectX.cmake

@@ -212,7 +212,7 @@ endif ()
 
 
 # For now take shortcut for the other DirectX components by just checking on the headers and not the libraries
 # For now take shortcut for the other DirectX components by just checking on the headers and not the libraries
 include (CheckIncludeFiles)
 include (CheckIncludeFiles)
-include (CheckIncludeFile)
+include (CheckIncludeFileCXX)
 foreach (NAME ${DIRECTX_HEADERS})
 foreach (NAME ${DIRECTX_HEADERS})
     string (REPLACE . _ BASE_NAME ${NAME})
     string (REPLACE . _ BASE_NAME ${NAME})
     string (TOUPPER ${BASE_NAME} UPCASE_NAME)
     string (TOUPPER ${BASE_NAME} UPCASE_NAME)
@@ -220,7 +220,7 @@ foreach (NAME ${DIRECTX_HEADERS})
         # Workaround an issue in finding xinput.h using check_include_file() as it depends on windows.h but not included it by itself in WinSDK
         # Workaround an issue in finding xinput.h using check_include_file() as it depends on windows.h but not included it by itself in WinSDK
         check_include_files (windows.h\;${NAME} HAVE_${UPCASE_NAME})
         check_include_files (windows.h\;${NAME} HAVE_${UPCASE_NAME})
     else ()
     else ()
-        check_include_file (${NAME} HAVE_${UPCASE_NAME})
+        check_include_file_cxx (${NAME} HAVE_${UPCASE_NAME})
     endif ()
     endif ()
 endforeach ()
 endforeach ()
 if (HAVE_D3D9_H)
 if (HAVE_D3D9_H)