Skip to content

Commit

Permalink
add pandoc dependency for building the cookbook in cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
karlnapf committed Oct 24, 2016
1 parent affc926 commit 71e1184
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
7 changes: 4 additions & 3 deletions CMakeLists.txt
Expand Up @@ -734,9 +734,10 @@ ENDIF(BUILD_META_EXAMPLES)

# add meta example dir below after tests have been defined

# cookbook and dependencies
find_package(Sphinx)
IF(BUILD_META_EXAMPLES AND SPHINX_FOUND)
# cookbook and dependencies (note there are in fact more, see its requirements.txt)
FIND_PACKAGE(Sphinx)
FIND_PACKAGE(Pandoc)
IF(BUILD_META_EXAMPLES AND SPHINX_FOUND AND PANDOC_FOUND)
SET(BUILD_COOKBOOK 1)
ENDIF()

Expand Down
24 changes: 24 additions & 0 deletions cmake/FindPandoc.cmake
@@ -0,0 +1,24 @@
# Midified from https://llvm.org/svn/llvm-project/llvm/trunk/cmake/modules/FindSphinx.cmake
# under "UIUC" BSD-Style license.
# CMake find_package() Module for pandoc markdown converter, http://pandoc.org/
#
# Example usage:
#
# find_package(Pandoc)
#
# If successful the following variables will be defined
# PANDOC_FOUND
# PANDOC_EXECUTABLE

find_program(PANDOC_EXECUTABLE
NAMES pandoc
PATH /usr/local/bin
DOC "Path to pandoc executable")

# Handle REQUIRED and QUIET arguments
# this will also set PANDOC_FOUND to true if PANDOC_EXECUTABLE exists
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Pandoc
"Failed to locate pandoc executable"
PANDOC_EXECUTABLE)

2 changes: 1 addition & 1 deletion cmake/FindSphinx.cmake
@@ -1,4 +1,4 @@
# Talen from https://llvm.org/svn/llvm-project/llvm/trunk/cmake/modules/FindSphinx.cmake
# Taken from https://llvm.org/svn/llvm-project/llvm/trunk/cmake/modules/FindSphinx.cmake
# under "UIUC" BSD-Style license.
# CMake find_package() Module for Sphinx documentation generator
# http://sphinx-doc.org/
Expand Down

0 comments on commit 71e1184

Please sign in to comment.