1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

TutorialDelta3DCMake

From delta3d

Jump to: navigation, search

Contents

Introduction

The following tutorial will show how to build Delta3D using CMake.

Precondition

  • CMake has been downloaded and installed (CMake 2.6.0 and later is what's currently supported in Delta3D).
  • The source code has been downloaded.
  • A pre-compiled Dependency package has been downloaded, or individual dependencies have been compiled manually. A minimal build requires the following packages are installed:
    • OpenSceneGraph
    • Xerces-C
    • OpenThreads
    • OpenDynamicsEngine

Note: Not all of the external dependencies are delivered in the External Dependency Package. See Non-distributed External Dependencies for additional external dependencies that are left to the end user.

Windows Platforms

Running CMakeSetup.exe will display a nice little UI to configure which Delta3D projects you wish to generate and allows you to set some options.
See Running CMake for Windows for an overview.

Folders

The first entry, "Where is the source code", is the directory which contains the CMakeLists.txt file. This should be the root of the Delta3D folder.
The second line, "Where to build the binaries", is where you want the CMake generated files and Visual Studio output to live. Typically you want this to be a sub-folder of the Delta3D root. Perhaps a folder such as delta3d/build_VS2008.

Configure

Click on the "Configure" button to load up the default settings. A popup window will prompt for which build system you wish to use. Select whichever build system you wish to use and click "OK".

After a few moments, a large list of entries will appear, all of them colored red. This list contains the build options and paths to the external dependencies. Hopefully, most of the paths will already be filled out.

Change the Build Options if desired. Typically the default settings should suffice.

Click the "Configure" button again to locking the settings. This time, all the entries should be gray. Any left over red colored items will have to be resolved manually by setting the path or the whatever value is in question.

Once all the items are resolved, click the "OK" button to start generating the project files. The generated files and folders should now be created in the "binaries" folder that was set in the beginning.

Windows Tips

  • Different build systems can be generated inside of one Delta3D folder by using different CMake binary folders (e.g., "buildVS2008", "buildMake").
  • Ensure the DELTA_LIB environment variable points to the folder containing the compiled Delta3D .lib files.
  • Ensure the PATH environment variable points to the folder containing the compiled Delta3D .dll/ files.
  • Want to use an external "ext" folder? Set the DELTA3D_EXT_DIR CMake variable to point to a different folder containing the external dependencies (defaults to %DELTA_ROOT%/ext). This is great for trying out different versions of the External Dependencies.
  • If you're building the Python Bindings, you will need to have a local installation of Boost. Be sure to change the "Boost_INCLUDE_DIR" CMake value to point to your local Boost folder (by default, it will find the Boost files in the "ext" folder, which don't have the Boost.Python files).

Linux Platforms

  • Create a subfolder in the Delta3D folder (named something like "build").
  • cd to that folder
  • Run ccmake -help to see which generators are available.
  • Run Cmake, supplying it with the generator to start the interactive CMake session. For example:
    • ccmake -G Unix Makefiles ..
  • Change the Build Options if desired.
  • Hit the 'c' key to configure.
    • If errors appear, its mostly due to missing external dependencies. Install the packages as required. Keep installing packages and configuring.
  • Once CMake has no remaining errors, then hit the 'g' key to generate the Makefiles.
  • Then just run make to build Delta3D.

Linux Tips

  • Ubuntu 8.04 has almost all packages available for installation; only two packages are not available. You will need to download, compile, and install HawkNL and GNE to compile dtNet/dtNetGM.
  • See the Ubuntu 8.04 Tutorial for more detailed package notes.

Build Options

The following enable or disable generating certain Delta3D projects.

  • BUILD_ANIM - Animation related projects which use CAL3D (dtAnim)
  • BUILD_AUDIO - Audio related project which use OpenAL (dtAudio)
  • BUILD_BINDINGS - The Python C++ Bindings. Requires Python and Boost.Python (not supplied).
  • BUILD_DIS - DIS related projects which use the DIS-CPP library (dtDIS)
  • BUILD_DEMOS - The Delta3D demos.
  • BUILD_EXAMPLES - The Delta3D examples.
  • BUILD_GUI - Graphical User Interface projects which use CEGUI (dtGUI)
  • BUILD_HLA - HLA-related projects. Requires an external HLA RTI library (not supplied).
    • USE_CERTI - Use the CERTI RTI
    • USE_RTIS - Use the RTI-s RTI
      • For compiling with RTI-s, set the RTIS_ROOT_DIR item to the root of the RTI-s folder.
    • USE_MAK - Use the MAK RTI
    • USE_PORTICO - Use the Portico RTI
  • BUILD_NET - Socket-based network projects using GNA/HawkNL (dtNet)
  • BUILD_PLIB - Joystick related projects using PLIB-JS (dtInputPLIB)
  • BUILD_TERRAIN - Terrain related projects using GDAL (dtTerrain)
  • BUILD_TESTS - Unit tests which use CPPUnit
    • AUTO_RUN_TESTS - Will automatically run the unit tests after a successful compile/link.
  • BUILD_WITH_OLD_CEGUI - Builds projects using older, 0.6.x CEGUI dependency when ON. OFF uses CEGUI 0.7.x and newer.
  • BUILD_WITH_PCH - Enables the building of Delta3D using pre-compiled headers.
  • BUILD_WITH_MP - Enables the Visual Studio /MP compiler switch for VS2005 and above.
  • BUILD_WITH_QT - Enables the generation of Qt-related projects.
  • BUILD_3DSMAX_PLUGIN - Geometry exporter for 3ds Max.
Personal tools