diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b8353fe0..799488f4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,21 +33,20 @@ cmake_dependent_option(TARGET_GLES2 "Build for OpenGL ES 2" ON "TARGET_GLES" OFF cmake_dependent_option(TARGET_DESKTOP_GLES "Build for OpenGL ES on desktop" OFF "TARGET_GLES" OFF) # Parts of the library -option(WITH_EVERYTHING "Build everything (doesn't include *Application libraries)" ON) -cmake_dependent_option(WITH_DEBUGTOOLS "Build DebugTools library" OFF "NOT WITH_EVERYTHING" ON) -cmake_dependent_option(WITH_MESHTOOLS "Build MeshTools library" OFF "NOT WITH_EVERYTHING;NOT WITH_DEBUGTOOLS" ON) -cmake_dependent_option(WITH_PHYSICS "Build Physics library" OFF "NOT WITH_EVERYTHING;NOT WITH_DEBUGTOOLS" ON) -cmake_dependent_option(WITH_PRIMITIVES "Builf Primitives library" OFF "NOT WITH_EVERYTHING;NOT WITH_DEBUGTOOLS" ON) -cmake_dependent_option(WITH_SCENEGRAPH "Build SceneGraph library" OFF "NOT WITH_EVERYTHING;NOT WITH_DEBUGTOOLS" ON) -cmake_dependent_option(WITH_SHADERS "Build Shaders library" OFF "NOT WITH_EVERYTHING;NOT WITH_DEBUGTOOLS" ON) -cmake_dependent_option(WITH_TEXT "Build Text library" OFF "NOT WITH_EVERYTHING" ON) -cmake_dependent_option(WITH_TEXTURETOOLS "Build TextureTools library" OFF "NOT WITH_EVERYTHING;NOT WITH_TEXT" ON) - -cmake_dependent_option(WITH_MAGNUMINFO "Build magnum-info utility" OFF "NOT WITH_EVERYTHING" ON) +option(WITH_DEBUGTOOLS "Build DebugTools library" ON) +cmake_dependent_option(WITH_MESHTOOLS "Build MeshTools library" ON "NOT WITH_DEBUGTOOLS" ON) +cmake_dependent_option(WITH_PHYSICS "Build Physics library" ON "NOT WITH_DEBUGTOOLS" ON) +cmake_dependent_option(WITH_PRIMITIVES "Builf Primitives library" ON "NOT WITH_DEBUGTOOLS" ON) +cmake_dependent_option(WITH_SCENEGRAPH "Build SceneGraph library" ON "NOT WITH_DEBUGTOOLS;NOT WITH_PHYSICS" ON) +cmake_dependent_option(WITH_SHADERS "Build Shaders library" ON "NOT WITH_DEBUGTOOLS" ON) +option(WITH_TEXT "Build Text library" ON) +cmake_dependent_option(WITH_TEXTURETOOLS "Build TextureTools library" ON "NOT WITH_TEXT" ON) +option(WITH_MAGNUMINFO "Build magnum-info utility" ON) # Library features cmake_dependent_option(USE_HARFBUZZ "Use HarfBuzz in Text library" ON "WITH_TEXT" OFF) +# Application libraries if(${CMAKE_SYSTEM_NAME} STREQUAL NaCl) option(WITH_NACLAPPLICATION "Build NaClApplication library" OFF) else() diff --git a/doc/building.dox b/doc/building.dox index 2f453590c..df562d963 100644 --- a/doc/building.dox +++ b/doc/building.dox @@ -80,7 +80,8 @@ If you want to build with another compiler (e.g. Clang), pass @subsection building-optional Enabling or disabling features By default the engine is built for desktop OpenGL. Using `TARGET_*` CMake -parameters you can target other platforms: +parameters you can target other platforms. Note that some features are available +for desktop OpenGL only, see @ref requires-gl. - `TARGET_GLES` - Target OpenGL ES. - `TARGET_GLES2` - Target OpenGL ES 2.0. Currently enabled by default when @@ -88,28 +89,28 @@ parameters you can target other platforms: - `TARGET_DESKTOP_GLES` - Target OpenGL ES on desktop, i.e. use OpenGL ES emulation in desktop OpenGL library. Might not be supported in all drivers. -Note that some features are available for desktop OpenGL only, see -@ref requires-gl. +By default the engine is built with everything except application libraries (see +below). Using `WITH_*` CMake parameters you can specify which parts will be built +and which not: -By default the engine is built with everything except -@ref Platform "application libraries". Using `WITH_*` CMake parameters you can -specify which parts will be built and which not: - - - `WITH_EVERYTHING` - Defaults to `ON`, builds everything except application - libraries. If set to `OFF`, only the main library is built and you can - select additional components with the following: - `WITH_DEBUGTOOLS` - DebugTools library. Enables also building of MeshTools, Physics, Primitives, SceneGraph and Shaders libraries. - - `WITH_MESHTOOLS` - MeshTools library. - - `WITH_PHYSICS` - Physics library. - - `WITH_PRIMITIVES` - Primitives library. - - `WITH_SCENEGRAPH` - SceneGraph library. - - `WITH_SHADERS` - Shaders library. - - `WITH_TEXT` - Text library. Enables also building of TextureTools. Requires - **FreeType** and possibly **HarfBuzz** library (see below). - - `WITH_TEXTURETOOLS` - TextureTools library. - - `WITH_MAGNUMINFO` - `magnum-info` executable, provides information about - Magnum engine and OpenGL capabilities. + - `WITH_MESHTOOLS` - MeshTools library. Enabled automatically if `WITH_DEBUGTOOLS` + is enabled. + - `WITH_PHYSICS` - Physics library. Enables also building of SceneGraph + library. Enabled automatically if `WITH_DEBUGTOOLS` is enabled. + - `WITH_PRIMITIVES` - Primitives library. Enabled automatically if `WITH_DEBUGTOOLS` + is enabled. + - `WITH_SCENEGRAPH` - SceneGraph library. Enabled automatically if `WITH_DEBUGTOOLS` + or `WITH_PHYSICS` is enabled. + - `WITH_SHADERS` - Shaders library. Enabled automatically if `WITH_DEBUGTOOLS` + is enabled. + - `WITH_TEXT` - Text library. Enables also building of TextureTools library. + Requires **FreeType** and possibly **HarfBuzz** library (see below). + - `WITH_TEXTURETOOLS` - TextureTools library. Enabled automatically if `WITH_TEXT` + is enabled. + - `WITH_MAGNUMINFO` - `magnum-info` executable, provides information about the + engine and OpenGL capabilities. Some dependencies are optional, although disabling them might reduce some functionality: @@ -117,18 +118,21 @@ functionality: - `USE_HARFBUZZ` - Defaults to `ON`, disabling it will result in worse text rendering (no kerning & ligatures) and possible issues with non-Latin text. -None of the application libraries is built by default, regardless to -`WITH_EVERYTHING` is enabled or not: - - - `WITH_XEGLAPPLICATION` - XEglApplication, available only if targeting - OpenGL ES (see above). Requires **X11** and **EGL** libraries. - - `WITH_GLXAPPLICATION` - GlxApplication. Requires **X11** and **GLX** - libraries. - - `WITH_WINDOWLESSGLXAPPLICATION` - Windowless GLX application. Requires - **X11** and **GLX** libraries. - - `WITH_GLUTAPPLICATION` - GlutApplication, available only if targeting - desktop OpenGL. Requires **GLUT** library. - - `WITH_SDL2APPLICATION` - Sdl2Application. Requires **SDL2** library. +None of the @ref Platform "application libraries" is built by default (and you +need at least one). Choose the one which suits your requirements and your +platform best: + + - `WITH_XEGLAPPLICATION` - @ref Platform::XEglApplication "XEglApplication", + available only if targeting OpenGL ES (see above). Requires **X11** and + **EGL** libraries. + - `WITH_GLXAPPLICATION` - @ref Platform::GlxApplication "GlxApplication". + Requires **X11** and **GLX** libraries. + - `WITH_WINDOWLESSGLXAPPLICATION` - @ref Platform::WindowlessGlxApplication "WindowlessGlxApplication". + Requires **X11** and **GLX** libraries. + - `WITH_GLUTAPPLICATION` - @ref Platform::GlutApplication "GlutApplication", + available only if targeting desktop OpenGL. Requires **GLUT** library. + - `WITH_SDL2APPLICATION` - @ref Platform::Sdl2Application "Sdl2Application". + Requires **SDL2** library. @subsection building-tests Building and running unit tests