Skip to content

Commit

Permalink
Docs: Add docs target
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisklein committed May 21, 2021
1 parent 6666e2f commit af37523
Show file tree
Hide file tree
Showing 17 changed files with 880 additions and 119 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__pycache__
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ project(FairCMakeModules VERSION 0.1.0 LANGUAGES CXX
HOMEPAGE_URL "https://github.com/FairRootGroup/FairCMakeModules")
message(STATUS "${PROJECT_NAME} Version ${PROJECT_VERSION}")

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()

include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
include(CTest)
Expand All @@ -28,6 +32,11 @@ set(PROJECT_INSTALL_MODULESDIR "${PROJECT_INSTALL_DATADIR}/modules")
add_subdirectory(src)
add_subdirectory(tests)

find_program(SPHINX_EXECUTABLE NAMES sphinx-build)
if(SPHINX_EXECUTABLE)
add_subdirectory(docs)
endif()

configure_package_config_file(
"cmake/${PROJECT_NAME}Config.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
Expand Down
46 changes: 2 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,5 @@
# FairCMakeModules

CMake Modules developed in the context of various FAIR projects
This project maintains CMake Modules developed in the context of various [FAIR](https://www.gsi.de/en/researchaccelerators/fair) software projects.

## Installation

```
git clone https://github.com/FairRootGroup/FairCMakeModules
cmake -S FairCMakeModules -B FairCMakeModules_build -DCMAKE_INSTALL_PREFIX=FairCMakeModules_install
cmake --build FairCMakeModules_build --target install
```

## Usage

In your project, discover this package with [`find_package`](https://cmake.org/cmake/help/latest/command/find_package.html#full-signature-and-config-mode) (see the official CMake docs for the full call signature of `find_package`):

```
find_package(FairCMakeModules REQUIRED)
```

Then [`include`](https://cmake.org/cmake/help/latest/command/include.html) any module you would like to use

```
include(<modulename>)
```

Available modules are:

* [FairFindPackage2](src/modules/FairFindPackage2.cmake)

## License

```
################################################################################
# Copyright (C) 2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH #
# #
# This software is distributed under the terms of the #
# GNU Lesser General Public Licence (LGPL) version 3, #
# copied verbatim in the file "LICENSE" #
################################################################################
```

## Contributing

For comments, questions, and bug reports please [open a github issue](https://github.com/FairRootGroup/FairCMakeModules/issues/new).

For code contributions and bug fixes please create [a github pull request](https://github.com/FairRootGroup/FairCMakeModules/pulls) against the `main` branch. Read our [notes for developers](docs/development.md).
:pushpin: **Get started by visiting the [:closed_book: Documentation](https://fairrootgroup.github.io/FairCMakeModules/index.html)**
20 changes: 20 additions & 0 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
################################################################################
# Copyright (C) 2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH #
# #
# This software is distributed under the terms of the #
# GNU Lesser General Public Licence (LGPL) version 3, #
# copied verbatim in the file "LICENSE" #
################################################################################

configure_file(conf.py.in
"${CMAKE_CURRENT_BINARY_DIR}/conf.py" @ONLY
)

set(builder html)
add_custom_target(docs
COMMAND ${SPHINX_EXECUTABLE} -a -E -c "${CMAKE_CURRENT_BINARY_DIR}" -b ${builder}
${CMAKE_CURRENT_SOURCE_DIR} "${CMAKE_CURRENT_BINARY_DIR}/${builder}"
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating documentation"
VERBATIM
)
5 changes: 5 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*********
Changelog
*********

**TODO**
Loading

0 comments on commit af37523

Please sign in to comment.