]> git.mxchange.org Git - flightgear.git/blob - man/CMakeLists.txt
QtLauncher::initApp: store argc to avoid crash
[flightgear.git] / man / CMakeLists.txt
1 if (MSVC)
2     # don't install man pages on Windows
3 else(MSVC)
4
5 if(${CMAKE_VERSION} VERSION_GREATER 2.8.4)
6     # use official include provided by latest CMake
7     include(GNUInstallDirs)
8 else(${CMAKE_VERSION} VERSION_GREATER 2.8.4)
9     # backward compatibility: use our own module for older cmake versions
10     include(OldGNUInstallDirs)
11 endif(${CMAKE_VERSION} VERSION_GREATER 2.8.4)
12
13 set(MANPAGES
14     fgfs.1
15 )
16
17 if(WITH_FGPANEL)
18     list(APPEND MANPAGES fgpanel.1)
19 endif()
20
21 if(ENABLE_TERRASYNC)
22     list(APPEND MANPAGES terrasync.1)
23 endif()
24
25 if(ENABLE_FGJS)
26     list(APPEND MANPAGES fgjs.1)
27 endif()
28
29 if(ENABLE_JS_DEMO)
30     list(APPEND MANPAGES js_demo.1)
31 endif()
32
33 # map some variables to what the man-pages expect
34 set(PACKAGE ${CMAKE_PROJECT_NAME})
35 set(VERSION ${FLIGHTGEAR_VERSION})
36
37 foreach(man ${MANPAGES})
38     configure_file (
39         "${PROJECT_SOURCE_DIR}/man/${man}.in"
40         "${PROJECT_BINARY_DIR}/man/${man}"
41         )
42
43     install(FILES ${PROJECT_BINARY_DIR}/man/${man}
44           DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 COMPONENT doc)
45 endforeach()
46
47 endif(MSVC)