From 0f8fb609e8668738f422549ee8eb866c96e38377 Mon Sep 17 00:00:00 2001 From: Justin Ross Date: Wed, 27 Jun 2018 19:18:25 -0700 Subject: [PATCH] DISPATCH-851: Correct the cmake logic for adding book targets based on the presence of asciidoctor; add asciidoctor to the documented deps and CI config --- .travis.yml | 1 + README | 1 + docs/books/CMakeLists.txt | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index d248f82a8a..586f06b20c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,6 +38,7 @@ addons: - maven # documentation - asciidoc + - asciidoctor - dblatex # unit test requirement - python-unittest2 diff --git a/README b/README index b160052a4f..6e07d2788e 100644 --- a/README +++ b/README @@ -19,6 +19,7 @@ packages installed: - cyrus-sasl-plain - cyrus-sasl-devel - asciidoc (for building docs) +- asciidoctor (for building docs) - python-unittest2 (python2-unittest2 on Fedora) (we use unittest2 for running python tests) Dispatch will not build on Windows. diff --git a/docs/books/CMakeLists.txt b/docs/books/CMakeLists.txt index e7dcfb7f8d..c4938a4adf 100644 --- a/docs/books/CMakeLists.txt +++ b/docs/books/CMakeLists.txt @@ -27,7 +27,7 @@ set ( if (ASCIIDOCTOR_EXE) # Don't follow symlinks and don't warn about it - cmake_policy(SET CMP0009 NEW) + cmake_policy (SET CMP0009 NEW) file (GLOB_RECURSE png_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.png) foreach (file ${png_files}) @@ -46,9 +46,9 @@ if (ASCIIDOCTOR_EXE) ) endforeach () + add_custom_target (books DEPENDS ${books}) + add_dependencies (docs books) else () message (STATUS "AsciiDoctor not found: Not generating books") endif () -add_custom_target (books DEPENDS ${books}) -add_dependencies (docs books)