Commit Graph

10 Commits

Author SHA1 Message Date
Sergiu Deitsch a1c02e8d37 Rework the Sphinx find module
* Make sphinx_rtd_theme a find module component to avoid hard-wiring it
  into the module and allowing to report the theme in case it is missing
  using the standard CMake package mechanism.
* Adjust find module cache variables names case to match the find module
  name.
* Also report sphinx-build version for completeness.
* Invoke the find module only once. Calling find_package on the same
  module is not needed.

Change-Id: I9d1bf0fcc0d44b9b37e624128812f348c5442ada
2023-09-12 20:51:48 +02:00
Sergiu Deitsch a57e35bbab Require at least CMake 3.16
Given we no longer support Ubuntu 18.04 due to packaged GCC lacking
C++17 support we can bump the minimum required CMake version to the one
provided by Ubuntu 20.04 which is CMake 3.16. Consequently, this allows
to drop some of the legacy CMake logic.

Change-Id: I1f05d4c5681d10aa7faa0800ef4a803be2f5b7dd
2023-09-12 19:33:00 +02:00
Sergiu Deitsch 55b4c3f447 Retain terminal formatting when building docs
This prevents Sphinx output to be stripped of colors, emphasis etc.

Change-Id: I127e02cbdda69a5d49a73678a7a7e2b4512b189e
2022-05-28 21:02:12 +00:00
Sergiu Deitsch 46b3495a4f Standardize path handling using GNUInstallDirs
Fixes #649

Change-Id: Iefb3e7be69a04474db0fc768b47f4f3636c8a587
2022-02-25 23:59:34 +00:00
Sumit Dey 7de561e8e8 Fix dependency check for building documentation
Build with documentation fails if the required 'sphinx rtd theme' is
not available. Check if dependency is installed before building with
documentation.

Add Python3 as requirement for building documentation.

Change-Id: I5edc5d7374864990e625a5efb358f5a23b3c50fe
2021-07-31 12:21:16 +02:00
Alex Stewart c123864372 Use Ceres_[SOURCE/BINARY]_DIR not CMAKE_XXX_DIR to support nesting.
- Using Ceres_[SOURCE/BINARY]_DIR (which are defined by CMake when
  project(Ceres) is called, in favour of CMAKE_[SOURCE/BINARY]_DIR
  enables Ceres to be nested within (and built by) a larger CMake
  project (which also contains other projects).
- CMAKE_[SOURCE/BINARY]_DIR always refers to the top-level source
  and binary directories (i.e. the first encountered), as a result if
  Ceres is a nested project within a larger project, these would not
  correctly identify the source/binary directories for Ceres (as they
  would refer to the root project in which Ceres is nested).
- Using Ceres_[SOURCE/BINARY]_DIR should ensure that Ceres always uses
  the correct source/binary directories, irrespective of whether Ceres
  is nested or not.

Change-Id: I62226ea3f6552b1d7e2bdac1aef02f1f489ae55e
2017-04-03 14:47:29 +01:00
Niels Ole Salscheider 1f20b72afd Allow users to override the documentation install directory.
This is needed for multiarch layouts where the prefix is /usr/${host}
but where arch-independent files are installed to /usr/share.

Change-Id: Icec01f8ea927594b4edb26997d6384e478415999
2016-01-10 20:39:12 +01:00
Alex Stewart cc8d47aabb Update all CMake to lowercase function name style.
- Updated to new CMake style where function names are all lowercase,
  this will be backwards compatible as CMake function names are
  case insensitive.
- Updated using Emacs' M-x unscreamify-cmake-buffer.

Change-Id: If7219816f560270e59212813aeb021353a64a0e2
2015-08-09 15:18:42 +01:00
Pablo Speciale 55b6c966c4 * Fixed the location of the Ceres doc (once installed with 'make install')
* Doing 'make ceres_docs' can be used to create the documentation (if the BUILD_DOCUMENTATION=ON)
* Included the copyright boilerplate for FindSphinx.cmake

Change-Id: Iea21eba9e68384b4fe72c85fa88c76b0ba8a7a1d
2013-03-20 17:56:47 -07:00
Pablo Speciale c51b11c104 Sphinx and CMake, based on this example:
http://ericscottbarr.com/blog/2012/03/sphinx-and-cmake-beautiful-documentation-for-c-projects/

The 'docs/CMakeLists.txt' file was deleted in this commit: 0abfb8f46f

Thanks to Arnaud Gelas, he has passed some links:
   https://github.com/InsightSoftwareConsortium/ITKExamples/blob/master/CMake/FindSphinx.cmake
   https://github.com/InsightSoftwareConsortium/ITKExamples/blob/master/CMakeLists.txt#L120-L154

Change-Id: Ic65e7f8ec5280d1e71a897a144417a21761c5553
2013-03-19 21:05:31 +00:00