Warning, /acts/docs/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 if(ACTS_BUILD_DOCS)
0002 include(FetchContent)
0003 FetchContent_Declare(
0004 doxygen-awesome-css
0005 GIT_REPOSITORY https://github.com/jothepro/doxygen-awesome-css.git
0006 GIT_TAG 1f3620084ff75734ed192101acf40e9dff01d848
0007 )
0008 FetchContent_MakeAvailable(doxygen-awesome-css)
0009
0010 # Save the location the files were cloned into
0011 # This allows us to get the path to doxygen-awesome.css
0012 FetchContent_GetProperties(doxygen-awesome-css SOURCE_DIR AWESOME_CSS_DIR)
0013
0014 set(DOXYFILE_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
0015 set(DOXYFILE_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
0016 set(DOXYGEN_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR})
0017 configure_file(${DOXYFILE_IN} ${DOXYFILE_OUT} @ONLY)
0018
0019 doxygen_add_docs(
0020 docs
0021 COMMENT "Generating documentation using doxygen"
0022 CONFIG_FILE ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
0023 )
0024
0025 # docs build is off by default
0026 set_target_properties(docs PROPERTIES EXCLUDE_FROM_ALL TRUE)
0027 endif()
0028
0029 # Additional target example build that is off by default but can be build
0030 # without the rest of the documentation
0031 add_library(docs-examples SHARED)
0032 set_target_properties(docs-examples PROPERTIES EXCLUDE_FROM_ALL TRUE)
0033 target_sources(
0034 docs-examples
0035 PRIVATE
0036 examples/logging.cpp
0037 examples/units.cpp
0038 examples/errors.cpp
0039 examples/geometry_module.cpp
0040 examples/material_designation.cpp
0041 )
0042 target_link_libraries(docs-examples PRIVATE Acts::Core)
0043
0044 if(ACTS_BUILD_PLUGIN_DD4HEP)
0045 target_link_libraries(docs-examples PRIVATE Acts::PluginDD4hep)
0046 target_compile_definitions(docs-examples PRIVATE ACTS_BUILD_PLUGIN_DD4HEP)
0047 endif()
0048
0049 # Compile the module writing templates as real geometry modules so the
0050 # snippet examples are verified at build time.
0051 #! [Plain Module CMake]
0052 include(ActsGeometryModuleHelpers)
0053 acts_add_geometry_module(
0054 docs-geometry-module-template
0055 examples/geometry_module_template.cpp
0056 )
0057 #! [Plain Module CMake]
0058 add_dependencies(docs-examples docs-geometry-module-template)
0059
0060 if(ACTS_BUILD_PLUGIN_DD4HEP)
0061 #! [DD4hep Module CMake]
0062 include(ActsDD4hepGeometryModuleHelpers)
0063 acts_add_dd4hep_geometry_module(
0064 docs-geometry-module-template-dd4hep
0065 examples/geometry_module_template_dd4hep.cpp
0066 )
0067 #! [DD4hep Module CMake]
0068 add_dependencies(docs-examples docs-geometry-module-template-dd4hep)
0069 endif()