Move CSS compilation to build.py for use by Travis

This commit is contained in:
vitaut 2015-06-22 06:54:29 -07:00
parent dd6a3bbc7c
commit 2e874af293
2 changed files with 3 additions and 9 deletions

View File

@ -4,12 +4,6 @@ if (NOT DOXYGEN)
return ()
endif ()
add_custom_command(OUTPUT html/_static/cppformat.css
COMMAND lessc --clean-css --include-path=${CMAKE_CURRENT_SOURCE_DIR}/bootstrap
${CMAKE_CURRENT_SOURCE_DIR}/cppformat.less html/_static/cppformat.css
DEPENDS cppformat.less)
add_custom_target(doc COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build.py
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/html/_static/cppformat.css)
add_custom_target(doc COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build.py)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/ DESTINATION share/doc/cppformat)

View File

@ -58,8 +58,8 @@ def build_docs():
raise CalledProcessError(p.returncode, cmd)
check_call(['sphinx-build', '-D', 'breathe_projects.format=doxyxml',
'-b', 'html', doc_dir, 'html'])
#check_call(['lessc', '--clean-css', '--include-path=bootstrap', 'cppformat.less',
# 'html/_static/cppformat.css'], cwd=doc_dir)
check_call(['lessc', '--clean-css', '--include-path=' + os.path.join(doc_dir, 'bootstrap'),
os.path.join(doc_dir, 'cppformat.less'), 'html/_static/cppformat.css'])
return 'html'
if __name__ == '__main__':