md2html/CMakeLists.txt: Use INSTALL(TARGETS) instead of INSTALL(PROGRAMS). Fixes #88.
diff --git a/md2html/CMakeLists.txt b/md2html/CMakeLists.txt
index 1338f63..2988b9c 100644
--- a/md2html/CMakeLists.txt
+++ b/md2html/CMakeLists.txt
@@ -4,5 +4,12 @@ include_directories("${PROJECT_SOURCE_DIR}/md4c")
add_executable(md2html cmdline.c cmdline.h entity.c entity.h md2html.c render_html.c render_html.h)
target_link_libraries(md2html md4c)
-install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/md2html DESTINATION ${CMAKE_INSTALL_BINDIR})
+install(
+ TARGETS md2html
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+)
+
install(FILES "md2html.1" DESTINATION "${CMAKE_INSTALL_MANDIR}/man1")