Browse Source

Use SDK include dir for SDL to fix Direct3D MinGW build.
For Travis CI - Correct the DESTDIR for MinGW CI build because cross-compiling MinGW is rooted.

Yao Wei Tjong 姚伟忠 11 years ago
parent
commit
0c2e47a42d

+ 1 - 1
Rakefile

@@ -387,7 +387,7 @@ def makefile_ci
   system "export URHO3D_HOME=../.. && cd ../Build/generated/UsingBuildTree && echo '\nExternal project referencing Urho3D library in its build tree' && ./cmake_generic.sh . #{$build_options} -DURHO3D_LUA#{jit}=1 -DURHO3D_TESTING=#{$testing} -DCMAKE_BUILD_TYPE=#{$configuration} && make -j$NUMJOBS #{test}" or abort 'Failed to configure/build/test temporary project using Urho3D as external library' 
   system "export URHO3D_HOME=../.. && cd ../Build/generated/UsingBuildTree && echo '\nExternal project referencing Urho3D library in its build tree' && ./cmake_generic.sh . #{$build_options} -DURHO3D_LUA#{jit}=1 -DURHO3D_TESTING=#{$testing} -DCMAKE_BUILD_TYPE=#{$configuration} && make -j$NUMJOBS #{test}" or abort 'Failed to configure/build/test temporary project using Urho3D as external library' 
   puts "\nInstalling Urho3D SDK...\n"
   puts "\nInstalling Urho3D SDK...\n"
   # Create a new project on the fly that uses newly installed Urho3D SDK
   # Create a new project on the fly that uses newly installed Urho3D SDK
-  install_destination = ENV['LINUX'] || ENV['WINDOWS'] || ENV['OSX'] ? 'DESTDIR=~ && export URHO3D_HOME=~/usr/local' : ''
+  install_destination = ENV['LINUX'] || ENV['WINDOWS'] || ENV['OSX'] ? "DESTDIR=~ && export URHO3D_HOME=~#{ENV['WINDOWS'] ? '/usr/${MINGW_PREFIX}' : ''}/usr/local" : ''
   scaffolding "../Build/generated/UsingSDK"
   scaffolding "../Build/generated/UsingSDK"
   system "cd ../Build && make -j$NUMJOBS install >/dev/null #{install_destination} && cd ../Build/generated/UsingSDK && echo '\nExternal project referencing Urho3D SDK' && ./cmake_generic.sh . #{$build_options} -DURHO3D_LUA#{jit}=1 -DURHO3D_TESTING=#{$testing} -DCMAKE_BUILD_TYPE=#{$configuration} && make -j$NUMJOBS #{test}" or abort 'Failed to configure/build/test temporary project using Urho3D as external library'
   system "cd ../Build && make -j$NUMJOBS install >/dev/null #{install_destination} && cd ../Build/generated/UsingSDK && echo '\nExternal project referencing Urho3D SDK' && ./cmake_generic.sh . #{$build_options} -DURHO3D_LUA#{jit}=1 -DURHO3D_TESTING=#{$testing} -DCMAKE_BUILD_TYPE=#{$configuration} && make -j$NUMJOBS #{test}" or abort 'Failed to configure/build/test temporary project using Urho3D as external library'
   # Make, deploy, and test run Android APK in an Android (virtual) device
   # Make, deploy, and test run Android APK in an Android (virtual) device

+ 1 - 1
Source/Urho3D/Graphics/Direct3D9/D3D9Graphics.cpp

@@ -58,7 +58,7 @@
 #include "VertexDeclaration.h"
 #include "VertexDeclaration.h"
 #include "Zone.h"
 #include "Zone.h"
 
 
-#include <SDL_syswm.h>
+#include <SDL/SDL_syswm.h>
 
 
 #include "DebugNew.h"
 #include "DebugNew.h"
 
 

+ 1 - 1
Source/Urho3D/Graphics/Direct3D9/D3D9GraphicsImpl.h

@@ -25,7 +25,7 @@
 #include "Color.h"
 #include "Color.h"
 
 
 #include <d3d9.h>
 #include <d3d9.h>
-#include <SDL.h>
+#include <SDL/SDL.h>
 
 
 namespace Urho3D
 namespace Urho3D
 {
 {