options.rst 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. *******
  2. Options
  3. *******
  4. .. contents:: Table of Contents
  5. CMake options
  6. =============
  7. FASTGLTF_DOWNLOAD_SIMDJSON
  8. --------------------------
  9. A ``BOOL`` option that tells fastgltf's CMake script whether it should download the simdjson sources itself.
  10. * If set to ``YES`` the script will automatically download the amalgamated simdjson header and source files and link them into fastgltf.
  11. * If set to ``NO`` the CMake script expects a ``simdjson::simdjson`` target to exist against which it tries to link.
  12. This target needs to also use the amalgamated simdjson.h header.
  13. FASTGLTF_USE_CUSTOM_SMALLVECTOR
  14. -------------------------------
  15. While fastgltf uses its custom ``SmallVector`` class in various areas by default, it might be useful to enable it in more places.
  16. FASTGLTF_ENABLE_TESTS
  17. ---------------------
  18. To build and run the tests and benchmarks you need to set this ``BOOL`` option to ``YES``.
  19. When this option is set, the ``fastgltf_tests`` target will be configured.
  20. The tests target depends on various dependencies, which will need to be downloaded before configuring CMake using ``fetch_test_deps.py``.
  21. FASTGLTF_ENABLE_EXAMPLES
  22. ------------------------
  23. To build and run the examples you need to this ``BOOL`` option to ``YES``.
  24. When this option is set, all targets from examples will be configured.
  25. The CMake targets depend on various dependencies, which will need to be downloaded before configuring CMake using ``fetch_test_deps.py``.
  26. FASTGLTF_ENABLE_DOCS
  27. --------------------
  28. .. _doxygen: https://https://www.doxygen.nl/
  29. .. _sphinx: https://github.com/sphinx-doc/sphinx
  30. .. _breathe: https://github.com/breathe-doc/breathe
  31. This ``BOOL`` option controls whether the targets and commands related to the documentation should be configured.
  32. Setting this to ``YES`` requires `Doxygen`_, `Sphinx`_ and `breathe`_ to be installed.
  33. FASTGLTF_ENABLE_GLTF_RS
  34. -----------------------
  35. .. _corrosion: https://github.com/corrosion-rs/corrosion/
  36. .. _gltf-rs: https://github.com/gltf-rs/gltf
  37. When this ``BOOL`` option is set to ``YES`` fastgltf will use `corrosion`_, which is downloaded using ``fetch_test_deps.py``,
  38. to link against the `gltf-rs`_ Rust library for comparison within the benchmarks.
  39. Note that this option has no effect when ``FASTGLTF_ENABLE_TESTS`` is set to ``NO``.
  40. Parsing options
  41. ===============
  42. For more information about the options when parsing a file, see :ref:`the API reference<options>`.