From 2e874af2934a395897e55a29b0bd3eba050a4421 Mon Sep 17 00:00:00 2001 From: vitaut Date: Mon, 22 Jun 2015 06:54:29 -0700 Subject: [PATCH] Move CSS compilation to build.py for use by Travis --- doc/CMakeLists.txt | 8 +------- doc/build.py | 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index f4e9deb0..2990e8fc 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -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) diff --git a/doc/build.py b/doc/build.py index d947f337..f294f22f 100755 --- a/doc/build.py +++ b/doc/build.py @@ -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__':