Commit 35f3bca8 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Merge branch 'allow-usage-as-submodule' into 'master'

Allow usage as submodule

See merge request !386
parents 1af43b5d a0a7639c
Pipeline #2149864 passed with stages
in 32 minutes and 46 seconds
......@@ -216,7 +216,7 @@ cmp:doxygen:
- mkdir build
- cd build
- cmake -DBUILD_DOCS_ONLY=ON ..
- make reference
- make Corryvreckan-reference
- mv reference/html ../public/reference
# Compile LaTeX user manual:
......
......@@ -3,6 +3,9 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.4.3 FATAL_ERROR)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW) # change linker path search behaviour
CMAKE_POLICY(SET CMP0048 NEW) # set project version
IF(${CMAKE_VERSION} VERSION_GREATER "3.13")
CMAKE_POLICY(SET CMP0077 NEW) # allow overwriting options with normal variables
ENDIF()
ENDIF(COMMAND CMAKE_POLICY)
# Set default version
......
......@@ -54,6 +54,7 @@ Corryvreckan has been developed and is maintained by
The following authors, in alphabetical order, have contributed to Corryvreckan:
* Matthew Daniel Buckland, University of Liverpool, @mbucklan
* Carsten Daniel Burgard, DESY, @cburgard
* Manuel Colocci, CERN, @mcolocci
* Chun Cheng, DESY, @chengc
* Dominik Dannheim, CERN, @dannheim
......
......@@ -5,8 +5,8 @@
FIND_PACKAGE(Doxygen)
IF(DOXYGEN_FOUND)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/doc/reference/Doxyfile.in ${CMAKE_BINARY_DIR}/reference/Doxyfile @ONLY)
ADD_CUSTOM_TARGET(reference
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/doc/reference/Doxyfile.in ${CMAKE_BINARY_DIR}/reference/Doxyfile @ONLY)
ADD_CUSTOM_TARGET(${CMAKE_PROJECT_NAME}-reference
${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/reference/Doxyfile
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/reference
COMMENT "Generating API documentation with Doxygen"
......@@ -27,7 +27,7 @@ FIND_PACKAGE(LATEX)
IF(LATEX_COMPILER)
MESSAGE(STATUS "Found LaTeX compiler.")
SET(LATEX_COMPILER_FLAGS "-shell-escape" "-interaction nonstopmode" "-halt-on-error" "-file-line-error" CACHE STRING "Flags passed to latex.")
INCLUDE(${CMAKE_SOURCE_DIR}/cmake/LATEX.cmake)
INCLUDE(${PROJECT_SOURCE_DIR}/cmake/LATEX.cmake)
SET(HTLATEX_COMPILER_TEX4HT_FLAGS "usermanual/html/corryvreckan,charset=utf-8" CACHE STRING "Flags passed to Tex4HT" FORCE)
SET(HTLATEX_COMPILER_TEX4HT_POSTPROCESSOR_FLAGS "-utf8 -cunihtf" CACHE STRING "Flags passed to the postprocessor of Tex4HT" FORCE)
......@@ -38,10 +38,10 @@ IF(LATEX_COMPILER)
)
# Check for pandoc for markdown conversion
INCLUDE(${CMAKE_SOURCE_DIR}/cmake/PANDOC.cmake)
INCLUDE(${PROJECT_SOURCE_DIR}/cmake/PANDOC.cmake)
IF(PANDOC_EXECUTABLE)
# Loop through all modules and fetch their README
SET(module_dir ${CMAKE_SOURCE_DIR}/src/modules)
SET(module_dir ${PROJECT_SOURCE_DIR}/src/modules)
FILE(GLOB subdirs RELATIVE ${module_dir} ${module_dir}/*)
FOREACH(subdir ${subdirs})
IF(EXISTS ${module_dir}/${subdir}/README.md AND NOT ${subdir} STREQUAL "Dummy")
......@@ -65,7 +65,7 @@ IF(LATEX_COMPILER)
ADD_PANDOC_DOCUMENT(
${CMAKE_BINARY_DIR}/usermanual/md/${readme_parent_dir}/${readme_dir_name}.tex
SOURCES ${CMAKE_SOURCE_DIR}/${doc_readme_file}
SOURCES ${PROJECT_SOURCE_DIR}/${doc_readme_file}
PRODUCT_DIRECTORY usermanual/md/${readme_parent_dir}/
PANDOC_DIRECTIVES -t latex --listings --biblatex
NO_EXPORT_PRODUCT
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment