|
|
@@ -41,8 +41,8 @@ Urho3D uses CMake (http://www.cmake.org) to build. The process has two steps:
|
|
|
- Linux: cmake_gcc.sh or cmake_eclipse.sh,\n
|
|
|
- Mac OS X: cmake_gcc.sh or cmake_macosx.sh.\n\n
|
|
|
-# For Visual Studio, open Urho3D.sln and build the configuration(s) you like.\n
|
|
|
-For Eclipse, import the Eclipse's project generated by CMake into the workspace as a general project. The Eclipse's project is generated in "build" sub-directory. See "Importing existing projects" in Eclipse Help for detail steps. Select "Build All" or "Build Project" in the menu. Note that Eclipse requires CDT plugin to build C/C++ project.\n
|
|
|
-For GCC, execute make in the "build" sub-directory (by default, cmake_gcc.sh specifies to make a RelWithDebInfo build).\n
|
|
|
+For Eclipse, import the Eclipse's project generated by CMake into the workspace as a general project. The Eclipse's project is generated in "Build" sub-directory. See "Importing existing projects" in Eclipse Help for detail steps. Select "Build All" or "Build Project" in the menu. Note that Eclipse requires CDT plugin to build C/C++ project.\n
|
|
|
+For GCC, execute make in the "Build" sub-directory (by default, cmake_gcc.sh specifies to make a RelWithDebInfo build).\n
|
|
|
For Xcode, open Urho3D.xcodeproj and build.
|
|
|
|
|
|
On Windows, using other compilers than Visual Studio is not officially supported. MinGW may work (cmake -G "MinGW Makefiles"), but may lack required DirectX headers. They can be copied to a MinGW installation from the following package: http://www.libsdl.org/extras/win32/common/directx-devel.tar.gz.\n
|
|
|
@@ -61,7 +61,7 @@ First, if you are building under Windows platform, copy Bin/Data and Bin/CoreDat
|
|
|
|
|
|
Set the ANDROID_NDK environment variable to point to your Android NDK. On 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 then go to the Android directory 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 go to the android-build directory (which is a GCC out-of-source build) and execute the following commands.
|
|
|
+On Windows, execute cmake_android.bat then go to the Android directory 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 go to the android-Build directory (which is a GCC out-of-source build) and execute the following commands.
|
|
|
|
|
|
- android update project -p . -t 1 (only needed on the first time,
|
|
|
replace '-t 1' with desired target-id)
|
|
|
@@ -75,9 +75,9 @@ For a release build, use the "ant release" command instead of "ant debug" and fo
|
|
|
|
|
|
By default the Android package for Urho3D is com.googlecode.urho3d. For a real application you must replace this with your own package name. The Urho3D activity subclasses the SDLActivity from org.libsdl.app package, whose name (or the JNI code from SDL library) does not have to be changed.
|
|
|
|
|
|
-Note that the native code is built by default for armeabi-v7a ABI. To make your program compatible also with old Android devices, build also an armeabi version by executing the CMake batch file again with the parameter -DANDROID_ABI=armeabi added, then execute make again in the Android directory on Windows or android-build directory on Mac/Linux.
|
|
|
+Note that the native code is built by default for armeabi-v7a ABI. To make your program compatible also with old Android devices, build also an armeabi version by executing the CMake batch file again with the parameter -DANDROID_ABI=armeabi added, then execute make again in the Android directory on Windows or android-Build directory on Mac/Linux.
|
|
|
|
|
|
-You can also build and deploy using Eclipse IDE with ADT plugin. To do that, after setting the ANDROID_NDK environment variable then run cmake_eclipse.sh. Import "Existing Android Code into Workspace" from the CMake generated Eclipse's project found in the android-build directory. Switch Eclipse IDE to use Java Perspective. Update project properties to choose the desired Android API target and that's it. Just choose "Run" to let ADT automatically build and deploy the application to Android (virtual) device.
|
|
|
+You can also build and deploy using Eclipse IDE with ADT plugin. To do that, after setting the ANDROID_NDK environment variable then run cmake_eclipse.sh. Import "Existing Android Code into Workspace" from the CMake generated Eclipse's project found in the android-Build directory. Switch Eclipse IDE to use Java Perspective. Update project properties to choose the desired Android API target and that's it. Just choose "Run" to let ADT automatically build and deploy the application to Android (virtual) device.
|
|
|
|
|
|
\section Building_Ios iOS build process
|
|
|
|
|
|
@@ -95,9 +95,9 @@ For native build on Raspberry Pi itself, use the similar process for Linux Deskt
|
|
|
|
|
|
For cross-compiling build on another build/host machine, set the RASPI_TOOL environment variable to point to your Raspberry Pi Cross-Compiling tool where all the arm-linux-gnueabihf-* executables are located. You can setup the tool using <a href="http://crosstool-ng.org/">crosstool-NG</a> or just download one from https://github.com/raspberrypi/tools. The RASPI_TOOL environment variable tells build script to generate additional build directory for cross-compiling.
|
|
|
|
|
|
-Run cmake_gcc.sh then go to the raspi-build directory and proceed to execute make. After the build is complete, the ARM executables can be found in Bin-CC directory.
|
|
|
+Run cmake_gcc.sh then go to the raspi-Build directory and proceed to execute make. After the build is complete, the ARM executables can be found in Bin-CC 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.
|
|
|
+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.
|
|
|
|
|
|
\section Building_Library Library build
|
|
|
|
|
|
@@ -363,7 +363,7 @@ Copy the "cmake" sub-directory from Urho3D project to your own project so that C
|
|
|
|
|
|
Since your CMake build script include the Urho3D-Cmake-magic module, your project also now has the cross-platform build capability.
|
|
|
|
|
|
-When both Urho3D static and shared library are both built and available in the Urho3D project build tree, the Urho3D shared library takes precedence over static library to be linked against your own project. You can modify the CMAKE_FIND_LIBRARY_SUFFIXES global variable to change this behaviour. When linking statically against Urho3D static library, you must remember to additionally define "-DURHO3D_STATIC_DEFINE=1" in your compiler flag, especially on MSVC.
|
|
|
+When both Urho3D static and shared library are built and available in the Urho3D project build tree, the Urho3D shared library takes precedence over static library to be linked against your own project. You can modify the CMAKE_FIND_LIBRARY_SUFFIXES global variable to change this behaviour. When linking statically against Urho3D static library, you must remember to additionally define "-DURHO3D_STATIC_DEFINE" in your compiler flag, especially on MSVC.
|
|
|
|
|
|
|
|
|
\page Structure Overall structure
|