diff --git a/.travis.yml b/.travis.yml index 8ab3cef..59f0b80 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,7 @@ install: true script: - mkdir -p build - cd build && cmake ..; make; cd .. -- mkdir -p export && cp build/*.pdf build/git.id export +- mkdir -p export && cp build/doc/*.pdf build/template-files/*.pdf build/git.id export - echo "# This branch is for deployment only" >> export/README.md deploy: diff --git a/CMakeLists.txt b/CMakeLists.txt index 585e32a..b2d9e4b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,51 +3,11 @@ cmake_minimum_required(VERSION 2.8) project(LaTeX4Ei NONE) include(UseLATEX) -file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/template-files/latex4ei - DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/template-files -) - -file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/template-files/latex4ei - DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/doc -) +add_subdirectory(doc) +add_subdirectory(template-files) add_custom_target( writegitid ALL COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/write-gitid.sh WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) - -add_latex_document( - template-files/cheatsheet_template.tex - FORCE_PDF - IMAGE_DIRS template-files/img - DEPENDS writegitid -) - -add_latex_document( - template-files/cheatsheet_example.tex - FORCE_PDF - IMAGE_DIRS template-files/img - DEPENDS writegitid -) - -add_latex_document( - template-files/report_example.tex - FORCE_PDF - IMAGE_DIRS template-files/img - DEPENDS writegitid -) - -add_latex_document( - doc/LaTeX4EI-Template-Documentation.tex - FORCE_PDF - IMAGE_DIRS template-files/img - DEPENDS writegitid -) - -add_latex_document( - doc/Scientific-Package-Documentation.tex - FORCE_PDF - IMAGE_DIRS template-files/img - DEPENDS writegitid -) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt new file mode 100644 index 0000000..15b9067 --- /dev/null +++ b/doc/CMakeLists.txt @@ -0,0 +1,17 @@ +file(COPY ${PROJECT_SOURCE_DIR}/template-files/latex4ei + DESTINATION ${CMAKE_CURRENT_BINARY_DIR} +) + +add_latex_document( + LaTeX4EI-Template-Documentation.tex + FORCE_PDF + IMAGE_DIRS img + DEPENDS writegitid +) + +add_latex_document( + Scientific-Package-Documentation.tex + FORCE_PDF + IMAGE_DIRS img + DEPENDS writegitid +) diff --git a/template-files/CMakeLists.txt b/template-files/CMakeLists.txt new file mode 100644 index 0000000..c3a85fd --- /dev/null +++ b/template-files/CMakeLists.txt @@ -0,0 +1,24 @@ +file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/latex4ei + DESTINATION ${CMAKE_CURRENT_BINARY_DIR} +) + +add_latex_document( + cheatsheet_template.tex + FORCE_PDF + IMAGE_DIRS img + DEPENDS writegitid +) + +add_latex_document( + cheatsheet_example.tex + FORCE_PDF + IMAGE_DIRS img + DEPENDS writegitid +) + +add_latex_document( + report_example.tex + FORCE_PDF + IMAGE_DIRS img + DEPENDS writegitid +)