Skip to content
Snippets Groups Projects
Commit 8fccf6b9 authored by Richard Berger's avatar Richard Berger
Browse files

Use absolute paths for docenv

parent 99985a1d
No related branches found
No related tags found
No related merge requests found
...@@ -920,12 +920,15 @@ if(BUILD_DOC) ...@@ -920,12 +920,15 @@ if(BUILD_DOC)
OUTPUT docenv OUTPUT docenv
COMMAND ${VIRTUALENV} docenv COMMAND ${VIRTUALENV} docenv
) )
set(DOCENV_BINARY_DIR ${CMAKE_BINARY_DIR}/docenv/bin)
add_custom_command( add_custom_command(
OUTPUT requirements.txt OUTPUT requirements.txt
DEPENDS docenv DEPENDS docenv
COMMAND ${CMAKE_COMMAND} -E copy ${LAMMPS_DOC_DIR}/utils/requirements.txt requirements.txt COMMAND ${CMAKE_COMMAND} -E copy ${LAMMPS_DOC_DIR}/utils/requirements.txt requirements.txt
COMMAND ./docenv/bin/pip install -r requirements.txt --upgrade COMMAND ${DOCENV_BINARY_DIR}/pip install -r requirements.txt --upgrade
COMMAND ./docenv/bin/pip install --upgrade ${LAMMPS_DOC_DIR}/utils/converters COMMAND ${DOCENV_BINARY_DIR}/pip install --upgrade ${LAMMPS_DOC_DIR}/utils/converters
) )
set(RST_FILES "") set(RST_FILES "")
...@@ -938,7 +941,7 @@ if(BUILD_DOC) ...@@ -938,7 +941,7 @@ if(BUILD_DOC)
add_custom_command( add_custom_command(
OUTPUT ${RST_FILE} OUTPUT ${RST_FILE}
DEPENDS requirements.txt docenv ${TXT_FILE} DEPENDS requirements.txt docenv ${TXT_FILE}
COMMAND ./docenv/bin/txt2rst -o ${RST_DIR} ${TXT_FILE} COMMAND ${DOCENV_BINARY_DIR}/txt2rst -o ${RST_DIR} ${TXT_FILE}
) )
endforeach() endforeach()
...@@ -946,7 +949,7 @@ if(BUILD_DOC) ...@@ -946,7 +949,7 @@ if(BUILD_DOC)
OUTPUT html OUTPUT html
DEPENDS ${RST_FILES} DEPENDS ${RST_FILES}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LAMMPS_DOC_DIR}/src ${RST_DIR} COMMAND ${CMAKE_COMMAND} -E copy_directory ${LAMMPS_DOC_DIR}/src ${RST_DIR}
COMMAND ./docenv/bin/sphinx-build -j ${NPROCS} -b html -c ${LAMMPS_DOC_DIR}/utils/sphinx-config -d ${CMAKE_BINARY_DIR}/doctrees ${RST_DIR} html COMMAND ${DOCENV_BINARY_DIR}/sphinx-build -j ${NPROCS} -b html -c ${LAMMPS_DOC_DIR}/utils/sphinx-config -d ${CMAKE_BINARY_DIR}/doctrees ${RST_DIR} html
) )
add_custom_target( add_custom_target(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment