Commit ae5ca894725ed36800e8934474de4785015c7dc6

Martin Mitas 2019-07-12T08:44:53

md2html/CMakeLists.txt: Use INSTALL(TARGETS) instead of INSTALL(PROGRAMS). Fixes #88.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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")