Prechádzať zdrojové kódy

Set CMake minimum version to 3.2.3 for Windows platform.
This is in preparation to use optional components feature of find_package() command for FindDirectX.cmake module (was FindDirect3D).

Yao Wei Tjong 姚伟忠 9 rokov pred
rodič
commit
f5fcfc48f1

+ 2 - 2
.travis.yml

@@ -25,7 +25,7 @@
 language: cpp
 language: cpp
 cache: ccache
 cache: ccache
 sudo: false
 sudo: false
-addons: {apt: {sources: &default_sources george-edison55-precise-backports, packages: &default_packages [doxygen, graphviz]}}
+addons: {apt: {sources: &default_sources [george-edison55-precise-backports, kubuntu-backports], packages: &default_packages [doxygen, graphviz, cmake]}}
 env:
 env:
   global:
   global:
     - secure: SLJCjkjDsTMbCIV9Wecz5JATnhk0fuzlnLMeZdvvFDv+8NL8cXyutkU0VfyRSLf3HSD1Js79a6fRMROyVGWj/w/BRrjqGnZzsB6+ZeJNnadiVIF5Gh+w90We5ccvSp2G4DyYgwkNnkKlJK7zNEWGu/K+bHL1EOCA+EIVrFMyA44=
     - secure: SLJCjkjDsTMbCIV9Wecz5JATnhk0fuzlnLMeZdvvFDv+8NL8cXyutkU0VfyRSLf3HSD1Js79a6fRMROyVGWj/w/BRrjqGnZzsB6+ZeJNnadiVIF5Gh+w90We5ccvSp2G4DyYgwkNnkKlJK7zNEWGu/K+bHL1EOCA+EIVrFMyA44=
@@ -40,7 +40,7 @@ matrix:
   fast_finish: true
   fast_finish: true
   include:
   include:
     - &Linux-64bit
     - &Linux-64bit
-      addons: {apt: {sources: [*default_sources, kubuntu-backports, ubuntu-toolchain-r-test], packages: [cmake, g++-4.9, &linux_packages [*default_packages, libasound2-dev, libpulse-dev, rpm]]}}
+      addons: {apt: {sources: [*default_sources, ubuntu-toolchain-r-test], packages: [g++-4.9, &linux_packages [*default_packages, libasound2-dev, libpulse-dev, rpm]]}}
       compiler: gcc-64bit-static
       compiler: gcc-64bit-static
       env: LINUX=1 URHO3D_LIB_TYPE=STATIC URHO3D_UPDATE_SOURCE_TREE=1 COVERITY_SCAN_THRESHOLD=100 SF_DEFAULT=linux:Linux-64bit-STATIC.tar.gz
       env: LINUX=1 URHO3D_LIB_TYPE=STATIC URHO3D_UPDATE_SOURCE_TREE=1 COVERITY_SCAN_THRESHOLD=100 SF_DEFAULT=linux:Linux-64bit-STATIC.tar.gz
     - &Linux-64bit-shared
     - &Linux-64bit-shared

+ 3 - 3
CMake/Modules/FindDirect3D.cmake → CMake/Modules/FindDirectX.cmake

@@ -20,7 +20,7 @@
 # THE SOFTWARE.
 # THE SOFTWARE.
 #
 #
 
 
-# For MSVC compiler, find Microsoft Direct3D installation in Windows SDK or in June 2010 DirectX SDK or later
+# For MSVC compiler, find Microsoft DirectX installation in Windows SDK or in June 2010 DirectX SDK or later
 # For MinGW compiler, assume MinGW not only comes with the necessary headers & libraries but also has the headers & libraries directories in its default search path
 # For MinGW compiler, assume MinGW not only comes with the necessary headers & libraries but also has the headers & libraries directories in its default search path
 # (use 'echo |$MINGW_PREFIX-gcc -v -E -' and '$MINGW_PREFIX-gcc -print-search-dirs', respectively, to double check)
 # (use 'echo |$MINGW_PREFIX-gcc -v -E -' and '$MINGW_PREFIX-gcc -print-search-dirs', respectively, to double check)
 #
 #
@@ -106,8 +106,8 @@ else ()
     set (FAIL_MESSAGE "Could NOT find Direct3D using DirectX SDK search paths")
     set (FAIL_MESSAGE "Could NOT find Direct3D using DirectX SDK search paths")
 endif ()
 endif ()
 
 
-# DIRECT3D_INCLUDE_DIRS is not required for Windows SDK, it is required for DirectX SDK but it is implied when DIRECT3D_LIBRARIES can be set
+# DIRECT3D_INCLUDE_DIRS is not required for Windows SDK, it is required for DirectX SDK but it is implied when DIRECT3D_LIBRARIES can be set, so we just check on DIRECT3D_LIBRARIES variable
 include (FindPackageHandleStandardArgs)
 include (FindPackageHandleStandardArgs)
-find_package_handle_standard_args (Direct3D REQUIRED_VARS DIRECT3D_LIBRARIES FAIL_MESSAGE ${FAIL_MESSAGE})
+find_package_handle_standard_args (DirectX REQUIRED_VARS DIRECT3D_LIBRARIES FAIL_MESSAGE ${FAIL_MESSAGE})
 
 
 mark_as_advanced (DIRECT3D_INCLUDE_DIRS DIRECT3D_LIBRARIES)
 mark_as_advanced (DIRECT3D_INCLUDE_DIRS DIRECT3D_LIBRARIES)

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

@@ -459,12 +459,12 @@ if (URHO3D_DATABASE_SQLITE OR URHO3D_DATABASE_ODBC)
 endif ()
 endif ()
 
 
 if (WIN32)
 if (WIN32)
-    # Find Direct3D include & library directories in MS Windows SDK or DirectX SDK. They may also be required by SDL
-    # even if using OpenGL instead of Direct3D, but do not make Direct3D REQUIRED in that case
+    # Find DirectX include & library directories in MS Windows SDK or DirectX SDK. They may also be required by SDL
+    # even if using OpenGL instead of Direct3D, but do not make DirectX REQUIRED in that case
     if (NOT URHO3D_OPENGL)
     if (NOT URHO3D_OPENGL)
-        find_package (Direct3D REQUIRED)
+        find_package (DirectX REQUIRED)
     else ()
     else ()
-        find_package (Direct3D)
+        find_package (DirectX)
     endif ()
     endif ()
     if (DIRECT3D_INCLUDE_DIRS)
     if (DIRECT3D_INCLUDE_DIRS)
         include_directories (${DIRECT3D_INCLUDE_DIRS})
         include_directories (${DIRECT3D_INCLUDE_DIRS})

+ 5 - 1
CMakeLists.txt

@@ -21,7 +21,11 @@
 #
 #
 
 
 # Set CMake minimum version and CMake policy required by Urho3D-CMake-common module
 # Set CMake minimum version and CMake policy required by Urho3D-CMake-common module
-cmake_minimum_required (VERSION 2.8.6)
+if (WIN32)
+    cmake_minimum_required (VERSION 3.2.3)      # Going forward all platforms will use this as minimum version
+else ()
+    cmake_minimum_required (VERSION 2.8.6)
+endif ()
 if (COMMAND cmake_policy)
 if (COMMAND cmake_policy)
     cmake_policy (SET CMP0003 NEW)
     cmake_policy (SET CMP0003 NEW)
     if (CMAKE_VERSION VERSION_GREATER 2.8.12 OR CMAKE_VERSION VERSION_EQUAL 2.8.12)
     if (CMAKE_VERSION VERSION_GREATER 2.8.12 OR CMAKE_VERSION VERSION_EQUAL 2.8.12)

+ 16 - 10
Docs/GettingStarted.dox

@@ -12,25 +12,27 @@ Although all required third-party libraries are included as source code, there a
 
 
 - For Windows, the June 2010 DirectX SDK needs to be installed. This is not necessary if building on Visual Studio 2012 or newer, which install the Windows SDK with the necessary DirectX files.
 - For Windows, the June 2010 DirectX SDK needs to be installed. This is not necessary if building on Visual Studio 2012 or newer, which install the Windows SDK with the necessary DirectX files.
 
 
-- For Linux, the following development packages need to be installed: libx11-dev, libxrandr-dev, libasound2-dev on Debian-based distros; libX11-devel, libXrandr-devel, alsa-lib-devel on RedHat-based distros. Building as 32-bit on a 64-bit system requires installing also the 32-bit versions of the development libraries. Optionally install the following development libraries to enable support for the corresponding software components:
+- For Linux, install one or more of the development packages from each software component category below. Building as 32-bit on a 64-bit system requires installing also the 32-bit versions of the development libraries.
   + %Database server (disabled by default even when installed, use URHO3D_DATABASE_ODBC build option to enable):
   + %Database server (disabled by default even when installed, use URHO3D_DATABASE_ODBC build option to enable):
-    - libiodbc2-dev (Debian-based) or libiodbc-devel (RedHat-based) for iODBC driver manager.
-    - unixodbc-dev (Debian-based) unixODBC-devel (RedHat-based) for ODBC driver manager. *Recommended*
+    - libiodbc2-dev (Debian-based) or libiodbc-devel (RedHat-based) for iODBC driver manager. Mutually exclusive with ODBC driver manager.
+    - unixodbc-dev (Debian-based) or unixODBC-devel (RedHat-based) for ODBC driver manager. Mutually exclusive with iODBC driver manager. *Recommended but optional*
   + Display server:
   + Display server:
-    - libdirectfb-dev (DB-based only) for direct frame buffer (DirectFB).
+    - libdirectfb-dev (Debian-based only) for Direct Frame Buffer (DirectFB).
     - mir-client-platform-mesa-dev and mircommon-dev (Ubuntu only) for Mir.
     - mir-client-platform-mesa-dev and mircommon-dev (Ubuntu only) for Mir.
     - libwayland-client-devel, libwayland-cursor-devel, and mesa-libwayland-egl-devel (RedHat-based only, pre-installed on Fedora 22+) for Wayland.
     - libwayland-client-devel, libwayland-cursor-devel, and mesa-libwayland-egl-devel (RedHat-based only, pre-installed on Fedora 22+) for Wayland.
+    - libx11-dev and libxrandr-dev (Debian-based) or libX11-devel and libXrandr-devel (RedHat-based) for X11. *Recommended*
   + %Sound server:
   + %Sound server:
-    - arts-devel (RedHat-based only) for analog real time synthesizer (aRts).
-    - libaudio-dev (Debian-based only) for network audio system (NAS).
-    - libesd0-dev (Debian-based) or esound-devel (RedHat-based) for enlightened sound daemon (ESounD).
+    - libasound2-dev (Debian-based) or  alsa-lib-devel (RedHat-based) for Advanced Linux Sound Architecture (ALSA).
+    - arts-devel (RedHat-based only) for Analog Real Time Synthesizer (aRts).
+    - libaudio-dev (Debian-based only) for Network Audio System (NAS).
+    - libesd0-dev (Debian-based) or esound-devel (RedHat-based) for Enlightened Sound Eaemon (ESounD).
     - libfusionsound-dev (DB-based only, not available on Ubuntu) for FusionSound. Disabled by default even when installed, use SDL_OPT_FUSIONSOUND(_SHARED) build option to enable.
     - libfusionsound-dev (DB-based only, not available on Ubuntu) for FusionSound. Disabled by default even when installed, use SDL_OPT_FUSIONSOUND(_SHARED) build option to enable.
     - libpulse-dev (Debian-based) or pulseaudio-libs-devel (RedHat-based) for PulseAudio. *Recommended*
     - libpulse-dev (Debian-based) or pulseaudio-libs-devel (RedHat-based) for PulseAudio. *Recommended*
     - libroar-dev (Debian-based only) for RoarAudio (SNDIO).
     - libroar-dev (Debian-based only) for RoarAudio (SNDIO).
   + Misc.:
   + Misc.:
-    - libts-dev (Debian-based) or tslib-devel (RedHat-based) for touchscreen input.
+    - libts-dev (Debian-based) or tslib-devel (RedHat-based) for touchscreen input. *Optional*
 
 
-- For Raspberry Pi, the following development packages need to be installed. On Raspbian: libevdev2, libasound2-dev, and libudev-dev. On Pidora: libevdev, alsa-lib-devel, and systemd-devel. The same list of optional development libraries listed above for Linux can also be installed on Raspberry Pi system to enable support for the corresponding software components.
+- For Raspberry Pi, the following development packages need to be installed. On Raspbian: libevdev2 and libudev-dev. On Pidora: libevdev and systemd-devel. The same list of optional development libraries listed above for Linux can also be installed on Raspberry Pi system to enable support for the corresponding software components. However, for display server the recommendation is to use Broadcom Video Core that comes preinstalled with Raspbian or Pidora.
 
 
 - For Mac OS X, the Xcode developer tools package should include everything necessary. Make sure that the Xcode command line tools are also installed.
 - For Mac OS X, the Xcode developer tools package should include everything necessary. Make sure that the Xcode command line tools are also installed.
 
 
@@ -523,7 +525,11 @@ In your own project root directory, create a main CMakeLists.txt file and add th
 
 
 \code
 \code
 # Set CMake minimum version and CMake policy required by Urho3D-CMake-common module
 # Set CMake minimum version and CMake policy required by Urho3D-CMake-common module
-cmake_minimum_required (VERSION 2.8.6)
+if (WIN32)
+    cmake_minimum_required (VERSION 3.2.3)      # Going forward all platforms will use this as minimum version
+else ()
+    cmake_minimum_required (VERSION 2.8.6)
+endif ()
 if (COMMAND cmake_policy)
 if (COMMAND cmake_policy)
     cmake_policy (SET CMP0003 NEW)
     cmake_policy (SET CMP0003 NEW)
     if (CMAKE_VERSION VERSION_GREATER 2.8.12 OR CMAKE_VERSION VERSION_EQUAL 2.8.12)
     if (CMAKE_VERSION VERSION_GREATER 2.8.12 OR CMAKE_VERSION VERSION_EQUAL 2.8.12)

+ 5 - 1
Rakefile

@@ -655,7 +655,11 @@ def scaffolding dir, project = 'Scaffolding', target = 'Main'
   dir.gsub!(/\//, '\\') if ENV['OS']
   dir.gsub!(/\//, '\\') if ENV['OS']
   build_script = <<EOF
   build_script = <<EOF
 # Set CMake minimum version and CMake policy required by Urho3D-CMake-common module
 # Set CMake minimum version and CMake policy required by Urho3D-CMake-common module
-cmake_minimum_required (VERSION 2.8.6)
+if (WIN32)
+    cmake_minimum_required (VERSION 3.2.3)      # Going forward all platforms will use this as minimum version
+else ()
+    cmake_minimum_required (VERSION 2.8.6)
+endif ()
 if (COMMAND cmake_policy)
 if (COMMAND cmake_policy)
     cmake_policy (SET CMP0003 NEW)
     cmake_policy (SET CMP0003 NEW)
     if (CMAKE_VERSION VERSION_GREATER 2.8.12 OR CMAKE_VERSION VERSION_EQUAL 2.8.12)
     if (CMAKE_VERSION VERSION_GREATER 2.8.12 OR CMAKE_VERSION VERSION_EQUAL 2.8.12)

+ 5 - 1
Source/Clang-Tools/CMakeLists.txt

@@ -28,7 +28,11 @@ if (CMAKE_PROJECT_NAME STREQUAL Urho3D)
     set_output_directories (${CMAKE_BINARY_DIR}/bin/tool/clang RUNTIME PDB)
     set_output_directories (${CMAKE_BINARY_DIR}/bin/tool/clang RUNTIME PDB)
 else ()
 else ()
     # Set CMake minimum version and CMake policy required by Urho3D-CMake-common module
     # Set CMake minimum version and CMake policy required by Urho3D-CMake-common module
-    cmake_minimum_required (VERSION 2.8.6)
+    if (WIN32)
+        cmake_minimum_required (VERSION 3.2.3)      # Going forward all platforms will use this as minimum version
+    else ()
+        cmake_minimum_required (VERSION 2.8.6)
+    endif ()
     if (COMMAND cmake_policy)
     if (COMMAND cmake_policy)
         cmake_policy (SET CMP0003 NEW)
         cmake_policy (SET CMP0003 NEW)
         if (CMAKE_VERSION VERSION_GREATER 2.8.12 OR CMAKE_VERSION VERSION_EQUAL 2.8.12)
         if (CMAKE_VERSION VERSION_GREATER 2.8.12 OR CMAKE_VERSION VERSION_EQUAL 2.8.12)

+ 2 - 0
Source/ThirdParty/LuaJIT/CMakeLists.txt

@@ -27,6 +27,8 @@ if (NOT CMAKE_PROJECT_NAME STREQUAL Urho3D)
     # Set CMake minimum version and CMake policy required by Urho3D-CMake-common module
     # Set CMake minimum version and CMake policy required by Urho3D-CMake-common module
     if (APPLE)
     if (APPLE)
         cmake_minimum_required (VERSION 3.4.1)
         cmake_minimum_required (VERSION 3.4.1)
+    elseif (WIN32)
+        cmake_minimum_required (VERSION 3.2.3)
     else ()
     else ()
         cmake_minimum_required (VERSION 2.8.6)
         cmake_minimum_required (VERSION 2.8.6)
     endif ()
     endif ()

+ 2 - 0
Source/ThirdParty/LuaJIT/src/host/CMakeLists.txt

@@ -24,6 +24,8 @@ if (NOT CMAKE_PROJECT_NAME STREQUAL Urho3D)
     # Set CMake minimum version and CMake policy required by Urho3D-CMake-common module
     # Set CMake minimum version and CMake policy required by Urho3D-CMake-common module
     if (APPLE)
     if (APPLE)
         cmake_minimum_required (VERSION 3.4.1)
         cmake_minimum_required (VERSION 3.4.1)
+    elseif (WIN32)
+        cmake_minimum_required (VERSION 3.2.3)
     else ()
     else ()
         cmake_minimum_required (VERSION 2.8.6)
         cmake_minimum_required (VERSION 2.8.6)
     endif ()
     endif ()

+ 19 - 13
Source/ThirdParty/SDL/CMakeLists.txt

@@ -277,28 +277,26 @@ set_option(FUSIONSOUND         "Use FusionSound audio driver" OFF)
 dep_option(FUSIONSOUND_SHARED  "Dynamically load fusionsound audio support" ON "FUSIONSOUND" OFF)
 dep_option(FUSIONSOUND_SHARED  "Dynamically load fusionsound audio support" ON "FUSIONSOUND" OFF)
 set_option(VIDEO_DUMMY         "Use dummy video driver" ON)
 set_option(VIDEO_DUMMY         "Use dummy video driver" ON)
 set_option(VIDEO_OPENGL        "Include OpenGL support" ON)
 set_option(VIDEO_OPENGL        "Include OpenGL support" ON)
-# Urho3D - hide OpenGLES option for MinGW platform because it does not have the necessary header file to build OpenGLES video driver
+# Urho3D - hide OpenGLES option from MinGW platform because it does not have the necessary header file to build OpenGLES video driver
 dep_option(VIDEO_OPENGLES      "Include OpenGL ES support" ON "NOT MINGW" OFF)
 dep_option(VIDEO_OPENGLES      "Include OpenGL ES support" ON "NOT MINGW" OFF)
 set_option(PTHREADS            "Use POSIX threads for multi-threading" ${SDL_PTHREADS_ENABLED_BY_DEFAULT})
 set_option(PTHREADS            "Use POSIX threads for multi-threading" ${SDL_PTHREADS_ENABLED_BY_DEFAULT})
 dep_option(PTHREADS_SEM        "Use pthread semaphores" ON "PTHREADS" OFF)
 dep_option(PTHREADS_SEM        "Use pthread semaphores" ON "PTHREADS" OFF)
 set_option(SDL_DLOPEN          "Use dlopen for shared object loading" ${SDL_DLOPEN_ENABLED_BY_DEFAULT})
 set_option(SDL_DLOPEN          "Use dlopen for shared object loading" ${SDL_DLOPEN_ENABLED_BY_DEFAULT})
-set_option(OSS                 "Support the OSS audio API" ${UNIX_SYS})
-# Urho3D - hide ALSA option for Android platform (TODO: probably can consider to use external/tinyalsa implementation for Android)
+# Urho3D - hide Linux-specific audio driver options from Android platform
+dep_option(OSS                 "Support the OSS audio API" ON "${UNIX_SYS} AND NOT ANDROID" OFF)
 dep_option(ALSA                "Support the ALSA audio API" ON "UNIX_SYS AND NOT ANDROID" OFF)
 dep_option(ALSA                "Support the ALSA audio API" ON "UNIX_SYS AND NOT ANDROID" OFF)
 dep_option(ALSA_SHARED         "Dynamically load ALSA audio support" ON "ALSA" OFF)
 dep_option(ALSA_SHARED         "Dynamically load ALSA audio support" ON "ALSA" OFF)
-# Urho3D - hide ESD option for Android platform
 dep_option(ESD                 "Support the Enlightened Sound Daemon" ON "UNIX_SYS AND NOT ANDROID" OFF)
 dep_option(ESD                 "Support the Enlightened Sound Daemon" ON "UNIX_SYS AND NOT ANDROID" OFF)
 dep_option(ESD_SHARED          "Dynamically load ESD audio support" ON "ESD" OFF)
 dep_option(ESD_SHARED          "Dynamically load ESD audio support" ON "ESD" OFF)
-# Urho3D - hide PulseAudio option for Android platform
 dep_option(PULSEAUDIO          "Use PulseAudio" ON "UNIX_SYS AND NOT ANDROID" OFF)
 dep_option(PULSEAUDIO          "Use PulseAudio" ON "UNIX_SYS AND NOT ANDROID" OFF)
 dep_option(PULSEAUDIO_SHARED   "Dynamically load PulseAudio support" ON "PULSEAUDIO" OFF)
 dep_option(PULSEAUDIO_SHARED   "Dynamically load PulseAudio support" ON "PULSEAUDIO" OFF)
-# Urho3D - hide aRts option for Android platform
 dep_option(ARTS                "Support the Analog Real Time Synthesizer" ON "UNIX_SYS AND NOT ANDROID" OFF)
 dep_option(ARTS                "Support the Analog Real Time Synthesizer" ON "UNIX_SYS AND NOT ANDROID" OFF)
 dep_option(ARTS_SHARED         "Dynamically load aRts audio support" ON "ARTS" OFF)
 dep_option(ARTS_SHARED         "Dynamically load aRts audio support" ON "ARTS" OFF)
-set_option(NAS                 "Support the NAS audio API" ${UNIX_SYS})
-set_option(NAS_SHARED          "Dynamically load NAS audio API" ${UNIX_SYS})
-set_option(SNDIO               "Support the sndio audio API" ${UNIX_SYS})
-set_option(RPATH               "Use an rpath when linking SDL" ${UNIX_SYS})
+dep_option(NAS                 "Support the NAS audio API" ON "UNIX_SYS AND NOT ANDROID" OFF)
+dep_option(NAS_SHARED          "Dynamically load NAS audio API" ON NAS OFF)
+dep_option(SNDIO               "Support the Roar audio API" ON "${UNIX_SYS} AND NOT ANDROID" OFF)
+# Urho3D - commented out RPATH as an option because Urho3D is configured to always use RPATH, so init the variable to always TRUE
+set (RPATH TRUE)
 set_option(CLOCK_GETTIME       "Use clock_gettime() instead of gettimeofday()" OFF)
 set_option(CLOCK_GETTIME       "Use clock_gettime() instead of gettimeofday()" OFF)
 set_option(INPUT_TSLIB         "Use the Touchscreen library for input" ${UNIX_SYS})
 set_option(INPUT_TSLIB         "Use the Touchscreen library for input" ${UNIX_SYS})
 set_option(VIDEO_X11           "Use X11 video driver" ${UNIX_SYS})
 set_option(VIDEO_X11           "Use X11 video driver" ${UNIX_SYS})
@@ -307,7 +305,7 @@ dep_option(WAYLAND_SHARED      "Dynamically load Wayland support" ON "VIDEO_WAYL
 dep_option(VIDEO_WAYLAND_QT_TOUCH  "QtWayland server support for Wayland video driver" ON "VIDEO_WAYLAND" OFF)
 dep_option(VIDEO_WAYLAND_QT_TOUCH  "QtWayland server support for Wayland video driver" ON "VIDEO_WAYLAND" OFF)
 dep_option(VIDEO_MIR           "Use Mir video driver" ON UNIX_SYS OFF)
 dep_option(VIDEO_MIR           "Use Mir video driver" ON UNIX_SYS OFF)
 dep_option(MIR_SHARED          "Dynamically load Mir support" ON "VIDEO_MIR" OFF)
 dep_option(MIR_SHARED          "Dynamically load Mir support" ON "VIDEO_MIR" OFF)
-# Urho3D - only enable VIDEO_RPI on Raspberry-Pi platform
+# Urho3D - only make VIDEO_RPI option available on Raspberry-Pi platform
 dep_option(VIDEO_RPI           "Use Raspberry Pi video driver" ON RPI OFF)
 dep_option(VIDEO_RPI           "Use Raspberry Pi video driver" ON RPI OFF)
 dep_option(X11_SHARED          "Dynamically load X11 support" ON "VIDEO_X11" OFF)
 dep_option(X11_SHARED          "Dynamically load X11 support" ON "VIDEO_X11" OFF)
 set(SDL_X11_OPTIONS Xcursor Xinerama XInput Xrandr Xscrnsaver XShape Xvm)
 set(SDL_X11_OPTIONS Xcursor Xinerama XInput Xrandr Xscrnsaver XShape Xvm)
@@ -317,7 +315,15 @@ foreach(_SUB ${SDL_X11_OPTIONS})
 endforeach()
 endforeach()
 set_option(VIDEO_COCOA         "Use Cocoa video driver" ${APPLE})
 set_option(VIDEO_COCOA         "Use Cocoa video driver" ${APPLE})
 set_option(DIRECTX             "Use DirectX for Windows audio/video" ${WINDOWS})
 set_option(DIRECTX             "Use DirectX for Windows audio/video" ${WINDOWS})
-set_option(RENDER_D3D          "Enable the Direct3D render driver" ${WINDOWS})
+# Urho3D - commented out RENDER_D3D as an option to avoid potential conflict with our URHO3D_OPENGL and URHO3D_D3D11 build options on Windows platform
+#          Instead just initialize the variable according to our build options
+if (WINDOWS)
+  if (URHO3D_OPENGL)
+    set (RENDER_D3D FALSE)
+  else ()
+    set (RENDER_D3D TRUE)
+  endif ()
+endif ()
 set_option(VIDEO_VIVANTE       "Use Vivante EGL video driver" ${UNIX_SYS})
 set_option(VIDEO_VIVANTE       "Use Vivante EGL video driver" ${UNIX_SYS})
 
 
 # TODO: We should (should we?) respect cmake's ${BUILD_SHARED_LIBS} flag here
 # TODO: We should (should we?) respect cmake's ${BUILD_SHARED_LIBS} flag here
@@ -914,7 +920,7 @@ elseif(WINDOWS)
   file(GLOB CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/windows/*.c)
   file(GLOB CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/windows/*.c)
   set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES})
   set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES})
 
 
-# Urho3D - commented out MSVC-specific compiler flags setup as we have configured MSVC compiler flags globally in Urho3D common module
+  # Urho3D - commented out MSVC-specific compiler flags setup as we have configured MSVC compiler flags globally in Urho3D common module
 
 
   # Check for DirectX
   # Check for DirectX
   if(DIRECTX)
   if(DIRECTX)

+ 5 - 1
Source/ThirdParty/toluapp/src/bin/CMakeLists.txt

@@ -22,7 +22,11 @@
 
 
 if (NOT CMAKE_PROJECT_NAME STREQUAL Urho3D)
 if (NOT CMAKE_PROJECT_NAME STREQUAL Urho3D)
     # Set CMake minimum version and CMake policy required by Urho3D-CMake-common module
     # Set CMake minimum version and CMake policy required by Urho3D-CMake-common module
-    cmake_minimum_required (VERSION 2.8.6)
+    if (WIN32)
+        cmake_minimum_required (VERSION 3.2.3)      # Going forward all platforms will use this as minimum version
+    else ()
+        cmake_minimum_required (VERSION 2.8.6)
+    endif ()
     if (COMMAND cmake_policy)
     if (COMMAND cmake_policy)
         cmake_policy (SET CMP0003 NEW)
         cmake_policy (SET CMP0003 NEW)
         if (CMAKE_VERSION VERSION_GREATER 2.8.12 OR CMAKE_VERSION VERSION_EQUAL 2.8.12)
         if (CMAKE_VERSION VERSION_GREATER 2.8.12 OR CMAKE_VERSION VERSION_EQUAL 2.8.12)

+ 5 - 1
Source/Tools/PackageTool/CMakeLists.txt

@@ -22,7 +22,11 @@
 
 
 if (NOT CMAKE_PROJECT_NAME STREQUAL Urho3D)
 if (NOT CMAKE_PROJECT_NAME STREQUAL Urho3D)
     # Set CMake minimum version and CMake policy required by Urho3D-CMake-common module
     # Set CMake minimum version and CMake policy required by Urho3D-CMake-common module
-    cmake_minimum_required (VERSION 2.8.6)
+    if (WIN32)
+        cmake_minimum_required (VERSION 3.2.3)      # Going forward all platforms will use this as minimum version
+    else ()
+        cmake_minimum_required (VERSION 2.8.6)
+    endif ()
     if (COMMAND cmake_policy)
     if (COMMAND cmake_policy)
         cmake_policy (SET CMP0003 NEW)
         cmake_policy (SET CMP0003 NEW)
         if (CMAKE_VERSION VERSION_GREATER 2.8.12 OR CMAKE_VERSION VERSION_EQUAL 2.8.12)
         if (CMAKE_VERSION VERSION_GREATER 2.8.12 OR CMAKE_VERSION VERSION_EQUAL 2.8.12)