git » libmikmod.git » main » tree

[main] / 0001-libmikmod-cmake-Install-documentation-and-autoconf-m.patch

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
Date: Tue, 31 Dec 2024 17:23:37 +0100
Subject: [PATCH] libmikmod: cmake: Install documentation and autoconf macro

---
 libmikmod/CMakeLists.txt      |  6 ++++++
 libmikmod/docs/CMakeLists.txt | 10 ++++++++++
 2 files changed, 16 insertions(+)

diff --git a/libmikmod/CMakeLists.txt b/libmikmod/CMakeLists.txt
index 189495c54f87..996cfb21dfec 100644
--- a/libmikmod/CMakeLists.txt
+++ b/libmikmod/CMakeLists.txt
@@ -793,3 +793,9 @@ INSTALL(
     DESTINATION
         ${CMAKE_INSTALL_LIBDIR}/pkgconfig
 )
+INSTALL(
+    FILES
+        "${PROJECT_SOURCE_DIR}/libmikmod.m4"
+    DESTINATION
+        ${CMAKE_INSTALL_DATAROOTDIR}/aclocal
+)
diff --git a/libmikmod/docs/CMakeLists.txt b/libmikmod/docs/CMakeLists.txt
index 4e6c06d36da5..b18084feaf90 100644
--- a/libmikmod/docs/CMakeLists.txt
+++ b/libmikmod/docs/CMakeLists.txt
@@ -6,19 +6,29 @@ find_program(MAKEINFO_EXECUTABLE makeinfo)
 set(info_in ${CMAKE_CURRENT_SOURCE_DIR}/mikmod.texi)
 set(info_out ${CMAKE_CURRENT_BINARY_DIR}/mikmod.info)
 set(html_out ${CMAKE_CURRENT_BINARY_DIR}/mikmod.html)
+set(man_out ${CMAKE_CURRENT_BINARY_DIR}/libmikmod-config.1)
 
 IF (ENABLE_DOC)
 add_custom_command(OUTPUT ${info_out}
   COMMAND ${MAKEINFO_EXECUTABLE} --no-split -o ${info_out} ${info_in}
   DEPENDS ${info_in}
   COMMENT "Creating Info file ${info_out}"
   VERBATIM)
 
 add_custom_command(OUTPUT ${html_out}
   COMMAND ${MAKEINFO_EXECUTABLE} --no-split --html -o ${html_out} ${info_in}
   DEPENDS ${info_in}
   COMMENT "Creating HTML file ${html_out}"
   VERBATIM)
 
+configure_file(libmikmod-config.1.in ${man_out} @ONLY)
+install(FILES ${man_out} DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
+
 add_custom_target(info ALL DEPENDS ${info_out} ${html_out})
+install(FILES ${info_out} DESTINATION ${CMAKE_INSTALL_INFODIR})
+install(FILES ${html_out}
+    ${PROJECT_SOURCE_DIR}/NEWS
+    ${PROJECT_SOURCE_DIR}/README
+    ${PROJECT_SOURCE_DIR}/TODO
+  DESTINATION ${CMAKE_INSTALL_DOCDIR})
 ENDIF()