mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 05:28:49 +00:00
Teach CMake to tell Sphinx where fish_indent is
This commit is contained in:
parent
5b2c741f6c
commit
93cc99d6d0
2 changed files with 8 additions and 5 deletions
|
@ -133,9 +133,6 @@ ADD_DEFINITIONS(-D_REENTRANT)
|
|||
# Set up PCRE2
|
||||
INCLUDE(cmake/PCRE2.cmake)
|
||||
|
||||
# Set up the docs.
|
||||
INCLUDE(cmake/Docs.cmake)
|
||||
|
||||
# Define a function to link dependencies.
|
||||
FUNCTION(FISH_LINK_DEPS target)
|
||||
TARGET_LINK_LIBRARIES(${target} fishlib)
|
||||
|
@ -162,6 +159,9 @@ ADD_EXECUTABLE(fish_key_reader
|
|||
src/fish_key_reader.cpp src/print_help.cpp)
|
||||
FISH_LINK_DEPS(fish_key_reader)
|
||||
|
||||
# Set up the docs.
|
||||
INCLUDE(cmake/Docs.cmake)
|
||||
|
||||
# A helper for running tests.
|
||||
ADD_EXECUTABLE(fish_test_helper src/fish_test_helper.cpp)
|
||||
|
||||
|
|
|
@ -13,14 +13,17 @@ SET(SPHINX_CACHE_DIR "${SPHINX_ROOT_DIR}/doctrees")
|
|||
SET(SPHINX_HTML_DIR "${SPHINX_ROOT_DIR}/html")
|
||||
SET(SPHINX_MANPAGE_DIR "${SPHINX_ROOT_DIR}/man")
|
||||
|
||||
# sphinx-docs uses fish_indent for highlighting.
|
||||
# Prepend the output dir of fish_indent to PATH.
|
||||
ADD_CUSTOM_TARGET(sphinx-docs
|
||||
${SPHINX_EXECUTABLE}
|
||||
env PATH="$<TARGET_FILE_DIR:fish_indent>:$$PATH"
|
||||
${SPHINX_EXECUTABLE}
|
||||
-q -b html
|
||||
-c "${SPHINX_SRC_DIR}"
|
||||
-d "${SPHINX_CACHE_DIR}"
|
||||
"${SPHINX_SRC_DIR}"
|
||||
"${SPHINX_HTML_DIR}"
|
||||
DEPENDS sphinx_doc_src/fish_indent_lexer.py
|
||||
DEPENDS sphinx_doc_src/fish_indent_lexer.py fish_indent
|
||||
COMMENT "Building HTML documentation with Sphinx")
|
||||
|
||||
ADD_CUSTOM_TARGET(sphinx-manpages
|
||||
|
|
Loading…
Reference in a new issue