]> git.mxchange.org Git - flightgear.git/commitdiff
CMake support for man page generation
authorJames Turner <zakalawe@mac.com>
Fri, 4 Nov 2011 09:38:07 +0000 (09:38 +0000)
committerJames Turner <zakalawe@mac.com>
Fri, 4 Nov 2011 09:38:07 +0000 (09:38 +0000)
CMakeLists.txt
man/CMakeLists.txt [new file with mode: 0644]

index 38309a28d8c3a61b70294be8e34f6d9f13044bd5..d620f565c9d03292b8d312926e1d3190dbc8602b 100644 (file)
@@ -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 (file)
index 0000000..57f7597
--- /dev/null
@@ -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()
+