From 23ae77cedf20bd292380a8ce1f84fe36e0171d83 Mon Sep 17 00:00:00 2001 From: James Turner Date: Fri, 4 Nov 2011 09:38:07 +0000 Subject: [PATCH] CMake support for man page generation --- CMakeLists.txt | 1 + man/CMakeLists.txt | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 man/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 38309a28d..d620f565c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -273,6 +273,7 @@ configure_file ( add_subdirectory(src) add_subdirectory(utils) +add_subdirectory(man) set (INSTALL_DOCS README diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt new file mode 100644 index 000000000..57f7597cc --- /dev/null +++ b/man/CMakeLists.txt @@ -0,0 +1,24 @@ +include(GnuInstallDirs) + +set(MANPAGES + est-epsilon.1 + fgfs.1 + fgjs.1 + gl-info.1 + js_demo.1 + pstest.1) + +# map some variables to what the man-pages expect +set(PACKAGE ${CMAKE_PROJECT_NAME}) +set(VERSION ${FLIGHTGEAR_VERSION}) + +foreach(man ${MANPAGES}) + configure_file ( + "${PROJECT_SOURCE_DIR}/man/${man}.in" + "${PROJECT_BINARY_DIR}/man/${man}" + ) + + install(FILES ${PROJECT_BINARY_DIR}/man/${man} + DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 COMPONENT doc) +endforeach() + -- 2.39.2