File: CMakeLists.txt

package info (click to toggle)
flightgear 1:2016.4.4+dfsg-3+deb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 48,512 kB
  • ctags: 71,727
  • sloc: cpp: 195,395; ansic: 177,152; sh: 13,661; perl: 4,475; python: 2,381; asm: 642; makefile: 398; java: 314; xml: 85
file content (47 lines) | stat: -rw-r--r-- 1,072 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
if (MSVC)
    # don't install man pages on Windows
else(MSVC)

if(${CMAKE_VERSION} VERSION_GREATER 2.8.4)
    # use official include provided by latest CMake
    include(GNUInstallDirs)
else(${CMAKE_VERSION} VERSION_GREATER 2.8.4)
    # backward compatibility: use our own module for older cmake versions
    include(OldGNUInstallDirs)
endif(${CMAKE_VERSION} VERSION_GREATER 2.8.4)

set(MANPAGES
    fgfs.1
)

if(WITH_FGPANEL)
    list(APPEND MANPAGES fgpanel.1)
endif()

if(ENABLE_TERRASYNC)
    list(APPEND MANPAGES terrasync.1)
endif()

if(ENABLE_FGJS)
    list(APPEND MANPAGES fgjs.1)
endif()

if(ENABLE_JS_DEMO)
    list(APPEND MANPAGES js_demo.1)
endif()

# 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()

endif(MSVC)