9dad28950d
Also use CMAKE_INSTALL_MANDIR so the man page gets installed properly.
33 lines
1.3 KiB
Text
33 lines
1.3 KiB
Text
$NetBSD: patch-man_CMakeLists.txt,v 1.1 2022/09/06 09:26:27 nia Exp $
|
|
|
|
Install man page to CMAKE_INSTALL_MANDIR.
|
|
Do not use gzip.
|
|
|
|
--- man/CMakeLists.txt.orig 2009-11-01 05:50:26.000000000 +0000
|
|
+++ man/CMakeLists.txt
|
|
@@ -1,18 +1,17 @@
|
|
IF(BMPANEL2_FEATURE_MANPAGE)
|
|
+ INCLUDE(GNUInstallDirs)
|
|
FIND_PROGRAM(A2X a2x)
|
|
- FIND_PROGRAM(GZIP gzip)
|
|
- IF(A2X AND GZIP)
|
|
+ IF(A2X)
|
|
SET(ASCIIDOC_OPTS -f ${CMAKE_CURRENT_SOURCE_DIR}/asciidoc.conf -a man_version="${BMPANEL_VERSION}")
|
|
SET(A2X_OPTS -D ${CMAKE_CURRENT_BINARY_DIR} -d manpage -f manpage)
|
|
SET(MAN_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/bmpanel2.txt)
|
|
ADD_CUSTOM_COMMAND(
|
|
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/bmpanel2.1.gz
|
|
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/bmpanel2.1
|
|
COMMAND ${A2X} ${A2X_OPTS} --asciidoc-opts="${ASCIIDOC_OPTS}" ${MAN_SOURCE}
|
|
- COMMAND ${GZIP} -f ${CMAKE_CURRENT_BINARY_DIR}/bmpanel2.1
|
|
DEPENDS asciidoc.conf bmpanel2.txt
|
|
)
|
|
- ADD_CUSTOM_TARGET(manpage ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/bmpanel2.1.gz)
|
|
- INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/bmpanel2.1.gz
|
|
- DESTINATION share/man/man1)
|
|
- ENDIF(A2X AND GZIP)
|
|
+ ADD_CUSTOM_TARGET(manpage ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/bmpanel2.1)
|
|
+ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/bmpanel2.1
|
|
+ DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
|
|
+ ENDIF(A2X)
|
|
ENDIF(BMPANEL2_FEATURE_MANPAGE)
|