summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorglx22 <glx@openttd.org>2020-06-11 21:57:14 +0200
committerglx22 <glx22@users.noreply.github.com>2020-07-02 21:18:14 +0200
commit53de5b5c55f22c3f37db44c4e5ca2c609cbf7b27 (patch)
treea52c0634adb590344b3cb8189c3f96d2b7aefc64
parent816fada2b18140b579e6b1d46740f46e2daeae83 (diff)
downloadopenttd-53de5b5c55f22c3f37db44c4e5ca2c609cbf7b27.tar.xz
Fix: [CMake] Restore man file compression
-rw-r--r--cmake/InstallAndPackage.cmake10
1 files changed, 9 insertions, 1 deletions
diff --git a/cmake/InstallAndPackage.cmake b/cmake/InstallAndPackage.cmake
index 71b80e684..6292ecf5a 100644
--- a/cmake/InstallAndPackage.cmake
+++ b/cmake/InstallAndPackage.cmake
@@ -40,8 +40,16 @@ install(FILES
# A Linux manual only makes sense when using FHS. Otherwise it is a very odd
# file with little context to what it is.
if (OPTION_INSTALL_FHS)
+ set(MAN_SOURCE_FILE ${CMAKE_SOURCE_DIR}/docs/openttd.6)
+ set(MAN_BINARY_FILE ${CMAKE_BINARY_DIR}/docs/openttd.6)
+ install(CODE
+ "
+ execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${MAN_SOURCE_FILE} ${MAN_BINARY_FILE})
+ execute_process(COMMAND gzip -9 -f ${MAN_BINARY_FILE})
+ "
+ COMPONENT manual)
install(FILES
- ${CMAKE_SOURCE_DIR}/docs/openttd.6
+ ${MAN_BINARY_FILE}.gz
DESTINATION ${MAN_DESTINATION_DIR}/man6
COMPONENT manual)
endif (OPTION_INSTALL_FHS)