include(CheckIncludeFileCXX)
set(CHECK_INCLUDES "-include stdio.h")
if(WIN32)
	set(CHECK_INCLUDES "-include windows.h -include stdio.h")
endif()
check_include_file_cxx("mkdio.h" MARKDOWN_HEADER_MKDIO ${CHECK_INCLUDES})
if (MARKDOWN_HEADER_MKDIO)
	add_definitions("-DMARKDOWN_HEADER=\"mkdio.h\"")
endif()
check_include_file_cxx("markdown/markdown.h" MARKDOWN_HEADER_MARKDOWN ${CHECK_INCLUDES})
if (MARKDOWN_HEADER_MARKDOWN)
	add_definitions("-DMARKDOWN_HEADER=\"markdown/markdown.h\"")
endif()
find_library(MARKDOWN_LIBRARY markdown)
if (MARKDOWN_LIBRARY)
	qad_project(doc "Core" "${MARKDOWN_LIBRARY}")
endif()
