浏览代码

Applied CMakeLists.txt patches from skaiware.

Lasse Öörni 13 年之前
父节点
当前提交
71cf37c257
共有 4 个文件被更改,包括 15 次插入5 次删除
  1. 8 4
      CMakeLists.txt
  2. 1 0
      Docs/Urho3D.dox
  3. 1 0
      Readme.txt
  4. 5 1
      ThirdParty/SDL/CMakeLists.txt

+ 8 - 4
CMakeLists.txt

@@ -38,12 +38,16 @@ add_definitions (-DENABLE_FILEWATCHER)
 # instantiated.
 # instantiated.
 add_definitions (-DENABLE_PROFILING)
 add_definitions (-DENABLE_PROFILING)
 
 
-# If not on Windows, enable use of OpenGL instead of Direct3D9 (so called "Turso3D" mode.) Setting
-# this on Windows is not recommended, as graphics card drivers are usually better optimized for
-# Direct3D.
-if (NOT WIN32)
+# If not on MSVC, enable use of OpenGL instead of Direct3D9 (either not compiling on Windows or
+# with a compiler that may not have an up-to-date DirectX SDK). This can also be unconditionally
+# set, but Windows graphics card drivers are usually better optimized for Direct3D.
+if (NOT MSVC)
     set (USE_OPENGL 1)
     set (USE_OPENGL 1)
     add_definitions (-DUSE_OPENGL)
     add_definitions (-DUSE_OPENGL)
+endif ()
+
+# If not on Windows, enable Unix mode for kNet library.
+if (NOT WIN32)
     add_definitions (-DUNIX)
     add_definitions (-DUNIX)
 endif ()
 endif ()
 
 

+ 1 - 0
Docs/Urho3D.dox

@@ -80,6 +80,7 @@ Contributions and bugfixes from:
 
 
 - Miika Santala
 - Miika Santala
 - Magic.Lixin
 - Magic.Lixin
+- skaiware
 
 
 DXT / ETC1 / PVRTC decompression code based on the Squish library and the Oolong %Engine.
 DXT / ETC1 / PVRTC decompression code based on the Squish library and the Oolong %Engine.
 
 

+ 1 - 0
Readme.txt

@@ -53,6 +53,7 @@ Urho3D uses the following third-party libraries:
 Contributions and bugfixes from:
 Contributions and bugfixes from:
 - Miika Santala
 - Miika Santala
 - Magic.Lixin
 - Magic.Lixin
+- skaiware
 
 
 DXT / ETC1 / PVRTC decompression code based on the Squish library and the Oolong
 DXT / ETC1 / PVRTC decompression code based on the Squish library and the Oolong
 Engine.
 Engine.

+ 5 - 1
ThirdParty/SDL/CMakeLists.txt

@@ -19,7 +19,7 @@ elseif (APPLE)
         src/audio/coreaudio/*.c src/joystick/darwin/*.c src/loadso/dlopen/*.c src/thread/pthread/*.c src/timer/unix/*.c src/video/cocoa/*.m
         src/audio/coreaudio/*.c src/joystick/darwin/*.c src/loadso/dlopen/*.c src/thread/pthread/*.c src/timer/unix/*.c src/video/cocoa/*.m
     )
     )
 else ()
 else ()
-    # On Linux, make sure development libraries exist 
+    # On Linux, make sure development libraries exist, and use their include file directories  
     find_package (OpenGL REQUIRED)
     find_package (OpenGL REQUIRED)
     find_package (X11 REQUIRED)
     find_package (X11 REQUIRED)
     if (NOT X11_Xrandr_FOUND)
     if (NOT X11_Xrandr_FOUND)
@@ -27,6 +27,10 @@ else ()
     endif ()
     endif ()
     find_package (ALSA REQUIRED)
     find_package (ALSA REQUIRED)
 
 
+    include_directories (${OpenGL_INCLUDE_DIRS})
+    include_directories (${X11_INCLUDE_DIRS})  
+    include_directories (${ALSA_INCLUDE_DIRS}) 
+
     file (GLOB SYS_C_FILES
     file (GLOB SYS_C_FILES
         src/audio/alsa/*.c src/audio/dma/*.c src/audio/dsp/*.c src/joystick/linux/*.c src/loadso/dlopen/*.c src/thread/pthread/*.c src/timer/unix/*.c src/video/x11/*.c
         src/audio/alsa/*.c src/audio/dma/*.c src/audio/dsp/*.c src/joystick/linux/*.c src/loadso/dlopen/*.c src/thread/pthread/*.c src/timer/unix/*.c src/video/x11/*.c
     )
     )