-
Notifications
You must be signed in to change notification settings - Fork 795
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bfdf76e
commit a134b6b
Showing
3 changed files
with
411 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
# These macros loosely based on https://github.com/sabel83/mpllibs/blob/8e245aedcf658fe77bb29537aeba1d4e1a619a19/cmake/Pandoc.cmake | ||
macro(pandoc_build_html TARGET_NAME OUTDIR) | ||
set(OUTFILES) | ||
foreach(INFILE ${ARGN}) | ||
get_filename_component(FILENAME ${INFILE} NAME_WE) | ||
set(OUTFILE ${OUTDIR}/${FILENAME}.html) | ||
set(OUTFILES ${OUTFILES} ${OUTFILE}) | ||
add_custom_command( | ||
OUTPUT ${OUTFILE} | ||
COMMAND | ||
${PANDOC} --from markdown --to html -c style.css -o ${OUTFILE} ${IT} | ||
DEPENDS ${IT} | ||
) | ||
endforeach(IT) | ||
add_custom_target(${TARGET_NAME} DEPENDS ${OUTFILES}) | ||
endmacro(pandoc_build) | ||
|
||
macro(pandoc_build_pdf TARGET_NAME OUTDIR) | ||
set(OUTFILES) | ||
foreach(INFILE ${ARGN}) | ||
get_filename_component(FILENAME ${INFILE} NAME_WE) | ||
set(OUTFILE ${OUTDIR}/${FILENAME}.html) | ||
set(OUTFILES ${OUTFILES} ${OUTFILE}) | ||
message( STATUS "outfile is ${OUTFILE}" ) | ||
add_custom_command( | ||
OUTPUT ${OUTFILE} | ||
COMMAND | ||
${PANDOC} --from markdown --to pdf -o ${OUTFILE} ${IT} | ||
DEPENDS ${IT} | ||
) | ||
endforeach(IT) | ||
add_custom_target(${TARGET_NAME} DEPENDS ${OUTFILES}) | ||
endmacro(pandoc_build) | ||
|
||
pandoc_build_pdf( curation_pdf ${CMAKE_CURRENT_BINARY_DIR}/doc ) |
Oops, something went wrong.