Procházet zdrojové kódy

Search for DirectX SDK also on OpenGL build to fix build failure on old Visual Studio (2008/2010) if the SDK is not set as a VS default include directory.

Conflicts:
	CMake/Modules/FindDirect3D.cmake
Lasse Öörni před 10 roky
rodič
revize
b7f76ea711

+ 1 - 1
CMake/Modules/FindDirect3D.cmake

@@ -75,7 +75,7 @@ else ()
     if (MSVC)
         message (STATUS "DirectX SDK not found. This is not fatal if a recent Windows SDK is installed")
     else ()
-        message (STATUS "DirectX SDK is not being searched for MinGW. It is assumed that MinGW itself comes with the necessary headers & libraries for Direct3D")
+        message (STATUS "DirectX SDK search skipped for MinGW. It is assumed that MinGW itself comes with the necessary headers & libraries")
     endif ()
 endif ()
 

+ 4 - 1
CMake/Modules/Urho3D-CMake-common.cmake

@@ -334,7 +334,10 @@ endif ()
 # Find DirectX SDK include & library directories for Visual Studio. It is also possible to compile
 # without if a recent Windows SDK is installed. The SDK is not searched for with MinGW as it is
 # incompatible; rather, it is assumed that MinGW itself comes with the necessary headers & libraries.
-if (WIN32 AND NOT URHO3D_OPENGL)
+# Note that when building for OpenGL, any libraries are not used, but the include directory may
+# be necessary for DirectInput & DirectSound headers, if those are not present in the compiler's own
+# default includes.
+if (WIN32)
     find_package (Direct3D)
     if (DIRECT3D_FOUND)
         include_directories (${DIRECT3D_INCLUDE_DIRS})