|
|
@@ -201,7 +201,7 @@ http://www.libsdl.org/extras/win32/common/directx-devel.tar.gz. These will
|
|
|
be missing some of the headers related to shader compilation, so a MinGW build
|
|
|
will use OpenGL by default. To build in Direct3D9 mode, the MinGW-w64 port is
|
|
|
necessary: http://mingw-w64.sourceforge.net/. Using it, Direct3D9 can be
|
|
|
-enabled with the CMake option -DUSE_OPENGL=0.
|
|
|
+enabled with the CMake option -DURHO3D_OPENGL=0.
|
|
|
|
|
|
After the build is complete, the programs can be run from the Bin directory.
|
|
|
These include the Urho3D player application, which can run application scripts,
|
|
|
@@ -248,7 +248,7 @@ Windows, ensure that make.exe from the Android NDK is included in the path and
|
|
|
is executable from the command line.
|
|
|
|
|
|
On Windows, execute cmake_android.bat. If MKLINK support is available, provide
|
|
|
-build option "-DUSE_MKLINK=1" to generate out-of-source build. Then go to the
|
|
|
+build option "-DURHO3D_MKLINK=1" to generate out-of-source build. Then go to the
|
|
|
build directory Source/Android (or android-Build if out-of-source build) and
|
|
|
execute the following commands. On OS X or Linux, execute cmake_gcc.sh (the
|
|
|
ANDROID_NDK environment variable distinguishes from a normal desktop build) then
|
|
|
@@ -320,7 +320,8 @@ from https://github.com/raspberrypi/tools. Secondly, set the RASPI_ROOT
|
|
|
environment variable to point to your Raspbian or Pidora system root. You must
|
|
|
install the Urho3D prerequisites software development packages for Raspberry Pi
|
|
|
(see "Building_Prerequisites") in the system root before attempting to do the
|
|
|
-Urho3D cross-compiling build.
|
|
|
+Urho3D cross-compiling build. You can download a Raspbian system root from
|
|
|
+https://github.com/urho3d/rpi-sysroot.
|
|
|
|
|
|
When running cmake_gcc.sh with RASPI_TOOL environment variable set, it tells
|
|
|
build script to generate additional raspi-Build directory for cross-compiling.
|
|
|
@@ -330,11 +331,12 @@ is complete, the ARM executables can be found in Bin-CC output directory.
|
|
|
You can also build, deploy, run/debug (as C/C++ Remote Application) using
|
|
|
Eclipse IDE, if you run cmake_eclipse.sh to generate the project file. Import
|
|
|
the CMake generated Eclipse project in the raspi-Build directory into Eclipse's
|
|
|
-workspace. Build the project as usual. Use the SCP_TO_TARGET build option to
|
|
|
-automatically deploy the ARM executables to target Raspberry Pi as part of every
|
|
|
-project build or configure Eclipse to perform a "download to target path" in the
|
|
|
-Run/Debug configuration for C/C++ Remote Application. Either way, you have to
|
|
|
-configure the Run/Debug configuration how to reach your target Raspberry Pi.
|
|
|
+workspace. Build the project as usual. Use the URHO3D_SCP_TO_TARGET build option
|
|
|
+to automatically deploy the ARM executables to target Raspberry Pi as part of
|
|
|
+every project build or configure Eclipse to perform a "download to target path"
|
|
|
+in the Run/Debug configuration for C/C++ Remote Application. Either way, you
|
|
|
+have to configure the Run/Debug configuration how to reach your target Raspberry
|
|
|
+Pi.
|
|
|
|
|
|
|
|
|
MinGW cross-compile build process
|
|
|
@@ -367,7 +369,7 @@ Desktop 64bit build
|
|
|
|
|
|
Currently CMake build configuration has been set to compile Urho3D as 32bit by
|
|
|
default. To enable 64bit build, run the provided cmake_xxxx.bat or cmake_xxxx.sh
|
|
|
-by passing the option "-DENABLE_64BIT=1" explicitly. For Visual Studio on
|
|
|
+by passing the option "-DURHO3D_64BIT=1" explicitly. For Visual Studio on
|
|
|
Windows platform, this option also overrides CMake to use a 64bit solution
|
|
|
generator.
|
|
|
|
|
|
@@ -398,7 +400,7 @@ use Urho3D as external library.
|
|
|
Documentation build
|
|
|
-------------------
|
|
|
|
|
|
-If ENABLE_DOCS build option is set then a normal (ALL) build would not only
|
|
|
+If URHO3D_DOCS build option is set then a normal (ALL) build would not only
|
|
|
build Urho3D software but also Urho3D documentation automatically. If it is not
|
|
|
then the documentation can be generated by manually invoking 'make doc' command
|
|
|
or its equivalent command in IDE.
|
|
|
@@ -427,44 +429,49 @@ Build options
|
|
|
A number of build options can be defined explicitly when invoking the above
|
|
|
cmake_xxxx batch files or shell scripts.
|
|
|
|
|
|
-|----------------------|-------------------------------------------------------|
|
|
|
-|Defines |Build Options |
|
|
|
-|----------------------|-------------------------------------------------------|
|
|
|
-|-DENABLE_64BIT=1 |to enable 64bit build |
|
|
|
-|-DENABLE_LUA=1 |to enable additional Lua scripting support |
|
|
|
-|-DENABLE_LUAJIT=1 |to enable Lua Just-in-time compilation, implied |
|
|
|
-| | ENABLE_LUA (check its CMakeLists.txt for more options)|
|
|
|
-|-DENABLE_SAFE_LUA=1 |to enable Lua C++ wrapper safety checks |
|
|
|
-|-DENABLE_SAMPLES=1 |to build the C++ sample applications |
|
|
|
-|-DENABLE_TOOLS=1 |to build the tools (only useful for Raspberry Pi build |
|
|
|
-| | because this option is already enabled by default for |
|
|
|
-| | other Desktop platforms) |
|
|
|
-|-DENABLE_DOCS=1 |to build the docs when building all the targets |
|
|
|
-|-DENABLE_ANGELSCRIPT=0|to disable AngelScript scripting support |
|
|
|
-|-DENABLE_SSE=0 |to disable SSE instruction set |
|
|
|
-|-DENABLE_MINIDUMPS=0 |to disable minidumps on crash (VS only) |
|
|
|
-|-DENABLE_FILEWATCHER=0|to disable filewatcher support |
|
|
|
-|-DENABLE_PROFILING=0 |to disable profiling support |
|
|
|
-|-DENABLE_LOGGING=0 |to disable logging support |
|
|
|
-|-DUSE_OPENGL=1 |to use OpenGL instead of Direct3D (only useful for VS |
|
|
|
-| | on Windows platform because this option is enabled by |
|
|
|
-| | default for other platforms) |
|
|
|
-|-DUSE_MKLINK=1 |to use mklink command to create symbolic links (Windows|
|
|
|
-| | Vista and above only) |
|
|
|
-|-DUSE_STATIC_RUNTIME=1|to use static C/C++ runtime libraries and eliminate the|
|
|
|
-| | need for runtime DLLs installation (VS only) |
|
|
|
-|-DSCP_TO_TARGET=<v> |to automatically scp executables to target system |
|
|
|
-| | (non-Android cross-compiling build only), SSH digital |
|
|
|
-| | key must be setup first for this to work, typical |
|
|
|
-| | value has a pattern of usr@tgt:remote-loc |
|
|
|
-|-DCMAKE_BUILD_TYPE=<v>|to tell CMake which build configuration to be |
|
|
|
-| | generated (Makefile generator only), possible values |
|
|
|
-| | are Release (default), Debug, and RelWithDebInfo |
|
|
|
-|-DURHO3D_LIB_TYPE=<v> |to specify Urho3D library type, possible values are |
|
|
|
-| | STATIC (default) and SHARED |
|
|
|
-|-DANDROID_ABI=<v> |to specify ABI for native code (Android build only), |
|
|
|
-| | possible values are armeabi-v7a (default) and armeabi |
|
|
|
-|----------------------|-------------------------------------------------------|
|
|
|
+|---------------------|-|------------------------------------------------------|
|
|
|
+|Defines |V|Build Options |
|
|
|
+|---------------------|-|------------------------------------------------------|
|
|
|
+|URHO3D_64BIT |0|Enable 64bit build |
|
|
|
+|URHO3D_ANGELSCRIPT |1|Enable AngelScript scripting support |
|
|
|
+|URHO3D_LUA |0|Enable Lua scripting support |
|
|
|
+|URHO3D_LUAJIT |0|Enable Lua scripting support using LuaJIT (check |
|
|
|
+| | | LuaJIT's CMakeLists.txt for more options) |
|
|
|
+|URHO3D_LUAJIT_AMALG |0|Enable LuaJIT amalgamated build (LuaJIT only) |
|
|
|
+|URHO3D_SAFE_LUA |0|Enable Lua C++ wrapper safety checks (when Lua |
|
|
|
+| | | scripting support is enabled only) |
|
|
|
+|URHO3D_SAMPLES |0|Build sample applications |
|
|
|
+|URHO3D_TOOLS |1|Build standalone tools (Desktop and RPI only; |
|
|
|
+| | | on Android only build Lua standalone tools) |
|
|
|
+|URHO3D_EXTRAS |0|Build extras (Desktop and RPI only) |
|
|
|
+|URHO3D_DOCS[_QUIET] |0|Generate documentation as part of normal build (the |
|
|
|
+| | | 'doc' builtin target can be used to generate |
|
|
|
+| | | documentation regardless of this option's value) |
|
|
|
+|URHO3D_SSE |1|Enable SSE instruction set |
|
|
|
+|URHO3D_MINIDUMPS |1|Enable minidumps on crash (VS only) |
|
|
|
+|URHO3D_FILEWATCHER |1|Enable filewatcher support |
|
|
|
+|URHO3D_PROFILING |1|Enable profiling support |
|
|
|
+|URHO3D_LOGGING |1|Enable logging support |
|
|
|
+|URHO3D_TESTING |0|Enable testing support |
|
|
|
+|URHO3D_TEST_TIME_OUT |5|Number of seconds to test run the executables (when |
|
|
|
+| | | testing support is enabled only) |
|
|
|
+|URHO3D_OPENGL |0|Use OpenGL instead of Direct3D (Windows platform only)|
|
|
|
+|URHO3D_MKLINK |0|Use mklink command to create symbolic links (Windows |
|
|
|
+| | | Vista and above only) |
|
|
|
+|URHO3D_STATIC_RUNTIME|0|Use static C/C++ runtime libraries and eliminate the |
|
|
|
+| | | need for runtime DLLs installation (VS only) |
|
|
|
+|URHO3D_LIB_TYPE |*|Specify Urho3D library type, possible values are |
|
|
|
+| | | STATIC (*default) and SHARED |
|
|
|
+|URHO3D_SCP_TO_TARGET |-|Use scp to transfer executables to target system (non-|
|
|
|
+| | | Android cross-compiling build only), SSH digital key |
|
|
|
+| | | must be setup first for this to work, typical value |
|
|
|
+| | | has a pattern of usr@tgt:remote-loc |
|
|
|
+|CMAKE_BUILD_TYPE |*|Specify CMake build configuration to be generated |
|
|
|
+| | | (Makefile generator only), possible values are |
|
|
|
+| | | Release (*default), Debug, and RelWithDebInfo |
|
|
|
+|ANDROID_ABI |*|Specify target ABI (Android build only), possible |
|
|
|
+| | | values are armeabi-v7a (*default) and armeabi |
|
|
|
+|---------------------|-|------------------------------------------------------|
|
|
|
|
|
|
Note that build option values specified via command line are cached by CMake.
|
|
|
The cached values will be used by CMake in the subsequent invocation. That is,
|
|
|
@@ -476,6 +483,49 @@ the build options to their default values is by clearing the CMake cache by
|
|
|
calling cmake_clean.bat or cmake_clean.sh.
|
|
|
|
|
|
|
|
|
+Using cmake-gui to configure and generate Urho3D project file
|
|
|
+-------------------------------------------------------------
|
|
|
+
|
|
|
+Instead of using one of the provided batch files or shell scripts, you can use
|
|
|
+cmake-gui to configure and generate Urho3D project file. However, you have to
|
|
|
+adhere to the current limitations:
|
|
|
+
|
|
|
+- The build directory must be located inside the Urho3D project root directory
|
|
|
+ and sibling of the "Source" directory.
|
|
|
+- The build directory must be named accordingly based on the target platform.
|
|
|
+ - On desktop/native platform: Build
|
|
|
+ - On Windows platform using MinGW: mingw-Build
|
|
|
+ - On iOS platform: ios-Build
|
|
|
+ - On Android platform: android-Build
|
|
|
+ - On Raspberry Pi platform: raspi-Build
|
|
|
+- The runtime and archive output directories are automatically set based on the
|
|
|
+ target platform regardless of the build directory name (should you choose not
|
|
|
+ to adhere with the above). For example on Android platform, they will be
|
|
|
+ android-Bin and android-Lib, respectively.
|
|
|
+ If you choose not to adhere with this build directory naming convention then
|
|
|
+ you will have to install the Urho3D library into your local filesystem in
|
|
|
+ order to use the Urho3D library in your external project
|
|
|
+ (See http://urho3d.github.io/documentation/a00004.html#UsingLibraryFromSDK).
|
|
|
+- All the post-CMake workaround and/or bug fixes that are scripted in the batch
|
|
|
+ files or shell scripts are not applied to the generated project file.
|
|
|
+
|
|
|
+Steps to configure:
|
|
|
+
|
|
|
+1. In the Urho3D project root directory, invoke "cmake-gui Source".
|
|
|
+2. Set the build directory name.
|
|
|
+3. Configure and update the build options as many times as necessary until there
|
|
|
+ are no more new options in red. For the first configuration, choose the
|
|
|
+ generator you like to use. Click the Group check box to group the build
|
|
|
+ options.
|
|
|
+ - In the Ungrouped Entries: only check one of these options (ANDROID, IOS,
|
|
|
+ RASPI) when you target the platform, leave them unchecked for
|
|
|
+ dekstop/native build.
|
|
|
+ - In the URHO3D group: check any of the options you desire. Some of the
|
|
|
+ options when checked may cause new options to be made available in the
|
|
|
+ subsequent configuration loop.
|
|
|
+4. Generate when all the configurations are done.
|
|
|
+
|
|
|
+
|
|
|
History
|
|
|
-------
|
|
|
|