Using Oranges

When you bring Oranges into your build (either through add_subdirectory() or find_package()), it does not include every module Oranges ships. You should manually include() each module you want to use.

Even though Oranges is a library of CMake modules, it is fully usable as an installable package. You can run cmake --install, and then call find_package (Oranges) from any consuming CMake project.

If your project depends on Oranges, I recommend using FetchContent to declare your dependency on Oranges.

CMake options

Oranges modules define options of their own, which are only relevant if you include those modules. See each module for details on its options and cache variables.

These options are defined by the top-level Oranges project itself:

  • ORANGES_BUILD_DOCS

Builds the Oranges documentation. Defaults to OFF if the Oranges project is not the top-level directory CMake was invoked in. Building the docs requires Python 3.9 and Sphinx.

  • ORANGES_BUILD_TESTS

Builds the Oranges test suite and registers test cases with CTest.

CMake install components

  • oranges_modules

  • oranges_doc_html

  • oranges_doc_singlehtml

  • oranges_doc_man

  • oranges_doc_info

  • oranges_doc_pdf

  • oranges_docs - installs all Oranges documentation

  • oranges - installs all Oranges components

Oranges dependency graph:

_images/deps_graph.png