set(CMAKE_PANDOC_SOURCE_FILE_EXTENSIONS md rst yml)

set(CMAKE_PANDOC_COMPILE_OBJECT "<CMAKE_PANDOC_COMPILER> <DEFINES> <INCLUDES> <FLAGS> <SOURCE> -o <OBJECT>")
set(CMAKE_PANDOC_OUTPUT_EXTENSION .json)

set(CMAKE_PANDOC_CREATE_STATIC_LIBRARY "<CMAKE_PANDOC_COMPILER> <OBJECTS> -o <TARGET>")
set(CMAKE_STATIC_LIBRARY_SUFFIX_PANDOC ${CMAKE_PANDOC_OUTPUT_EXTENSION})

set(CMAKE_PANDOC_LINK_EXECUTABLE
    "${CMAKE_COMMAND} -DCOMPILER=<CMAKE_PANDOC_COMPILER> -DNATIVE_EXT=json -P ${CMAKE_CURRENT_LIST_DIR}/linker.cmake \
    FLAGS -s <FLAGS> <LINK_FLAGS> \
    OBJECTS <OBJECTS> <LINK_LIBRARIES> \
    OUTPUT <TARGET>"
)
set(CMAKE_EXECUTABLE_SUFFIX_PANDOC .html)
