From db9d9c76530c94a484e702e9765c87a49dced67a Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Sat, 14 Mar 2026 17:38:37 -0400 Subject: [PATCH] Install our man pages in a more standard-configurable manner --- CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e90fd7cc..284d3a78 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,7 @@ project(rgbds HOMEPAGE_URL "https://rgbds.gbdev.io") include(CTest) # Note: must be in the top-level dir. +include(GNUInstallDirs) # Reject in-source builds, as they may conflict with the Makefile. get_filename_component(srcdir "${CMAKE_SOURCE_DIR}" REALPATH) @@ -111,7 +112,6 @@ if(CMAKE_BUILD_TYPE STREQUAL "Release") endif() endif() -set(MANDIR "share/man") set(man1 "man/rgbasm.1" "man/rgbfix.1" "man/rgbgfx.1" @@ -124,6 +124,5 @@ set(man7 "man/gbz80.7" "man/rgbds.7") foreach(SECTION "man1" "man5" "man7") - set(DEST "${MANDIR}/${SECTION}") - install(FILES ${${SECTION}} DESTINATION ${DEST}) + install(FILES ${${SECTION}} DESTINATION "${CMAKE_INSTALL_MANDIR}/${SECTION}") endforeach()