41 lines
1.8 KiB
Plaintext
41 lines
1.8 KiB
Plaintext
$OpenBSD: patch-doc_CMakeLists_txt,v 1.4 2011/05/30 09:06:28 sthen Exp $
|
|
--- doc/CMakeLists.txt.orig Mon Feb 28 13:30:22 2011
|
|
+++ doc/CMakeLists.txt Mon Feb 28 13:35:53 2011
|
|
@@ -10,7 +10,6 @@ ELSE (WIN32)
|
|
# For all other systems, generate and install the man pages
|
|
|
|
FIND_PROGRAM(POD2MAN pod2man)
|
|
-FIND_PROGRAM(GZIP gzip)
|
|
|
|
MACRO(install_man manfile section)
|
|
INSTALL(FILES ${manfile} DESTINATION ${MANDIR}/man${section})
|
|
@@ -18,22 +17,21 @@ ENDMACRO(install_man)
|
|
|
|
MACRO(do_pod podfile manfile section)
|
|
IF(EXISTS "${CMAKE_SOURCE_DIR}/doc/${podfile}")
|
|
- IF(POD2MAN AND GZIP)
|
|
+ IF(POD2MAN)
|
|
# Try to install compressed manual
|
|
SET(outfile "${manfile}.${section}")
|
|
# TODO: fix the unaesthetic double quotes in which the HUGIN_PACKAGE_VERSION
|
|
# is displayed on the resulting man page
|
|
ADD_CUSTOM_COMMAND(
|
|
- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${outfile}.gz"
|
|
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${outfile}"
|
|
COMMAND ${POD2MAN} --section="${section}" --release="Version: ${HUGIN_PACKAGE_VERSION}" --center=HUGIN "${CMAKE_SOURCE_DIR}/doc/${podfile}" "${CMAKE_CURRENT_BINARY_DIR}/${outfile}"
|
|
- COMMAND ${GZIP} "-f" "${CMAKE_CURRENT_BINARY_DIR}/${outfile}"
|
|
DEPENDS "${CMAKE_SOURCE_DIR}/doc/${podfile}"
|
|
VERBATIM
|
|
)
|
|
- SET_SOURCE_FILES_PROPERTIES("${CMAKE_CURRENT_BINARY_DIR}/${outfile}.gz" GENERATED)
|
|
- install_man("${CMAKE_CURRENT_BINARY_DIR}/${outfile}.gz" ${section})
|
|
- LIST(APPEND ManDeps "${CMAKE_CURRENT_BINARY_DIR}/${outfile}.gz")
|
|
- ENDIF(POD2MAN AND GZIP)
|
|
+ SET_SOURCE_FILES_PROPERTIES("${CMAKE_CURRENT_BINARY_DIR}/${outfile}" GENERATED)
|
|
+ install_man("${CMAKE_CURRENT_BINARY_DIR}/${outfile}" ${section})
|
|
+ LIST(APPEND ManDeps "${CMAKE_CURRENT_BINARY_DIR}/${outfile}")
|
|
+ ENDIF(POD2MAN)
|
|
ENDIF()
|
|
ENDMACRO(do_pod)
|
|
|