2012-04-22 11:43:04 +00:00
|
|
|
if (MSVC)
|
|
|
|
# don't install man pages on Windows
|
|
|
|
else(MSVC)
|
|
|
|
|
2011-11-25 11:12:38 +00:00
|
|
|
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)
|
2011-11-04 09:38:07 +00:00
|
|
|
|
|
|
|
set(MANPAGES
|
|
|
|
fgfs.1
|
|
|
|
gl-info.1
|
2013-02-12 16:38:46 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
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()
|
2011-11-04 09:38:07 +00:00
|
|
|
|
|
|
|
# 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}"
|
|
|
|
)
|
2011-12-19 10:35:02 +00:00
|
|
|
|
2011-11-04 09:38:07 +00:00
|
|
|
install(FILES ${PROJECT_BINARY_DIR}/man/${man}
|
|
|
|
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 COMPONENT doc)
|
|
|
|
endforeach()
|
2012-04-22 11:43:04 +00:00
|
|
|
|
|
|
|
endif(MSVC)
|