ref: 6af57ff026c297b3572bd3b439fefc65e917d77d
parent: 2e3db9d56ac9ebd6daee9d411764c5011dc2242a
parent: f8d9fa87eddff68366e46dafa08dea6ad2507a56
author: Eldred Habert <[email protected]>
date: Sat Oct 3 18:15:17 EDT 2020
Merge pull request #581 from JL2210/cmake-docs Install manpages with CMake
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -78,6 +78,22 @@
install(TARGETS rgb${PROG} RUNTIME DESTINATION bin)
endforeach()
+set(MANDIR "share/man")
+set(man1 "asm/rgbasm.1"
+ "fix/rgbfix.1"
+ "gfx/rgbgfx.1"
+ "link/rgblink.1")
+set(man5 "asm/rgbasm.5"
+ "link/rgblink.5"
+ "rgbds.5")
+set(man7 "gbz80.7"
+ "rgbds.7")
+
+foreach(SECTION "man1" "man5" "man7")
+ set(DEST "${MANDIR}/${SECTION}")
+ install(FILES ${${SECTION}} DESTINATION ${DEST})
+endforeach()
+
if(LIBPNG_FOUND) # pkg-config
target_include_directories(rgbgfx PRIVATE ${LIBPNG_INCLUDE_DIRS})
target_link_directories(rgbgfx PRIVATE ${LIBPNG_LIBRARY_DIRS})