
* GNUInstallDirs is the only Kitware-supported way to change the default directories. Most distributions have hooks for changing these directories, which makes integrating wesnoth easier and more consistent with the rest of the CMake ecosystem. * Make build system perfectly out-of-source compatible. The build system should never touch files in the source tree.
31 lines
898 B
CMake
31 lines
898 B
CMake
set(MANPAGES)
|
|
if(ENABLE_GAME)
|
|
set(MANPAGES ${MANPAGES} wesnoth.6)
|
|
endif()
|
|
if(ENABLE_SERVER)
|
|
set(MANPAGES ${MANPAGES} wesnothd.6)
|
|
endif()
|
|
|
|
set(ALL_MANPAGES wesnoth.6 wesnothd.6)
|
|
|
|
foreach(MANPAGE ${MANPAGES})
|
|
install(FILES ${MANPAGE} DESTINATION "${CMAKE_INSTALL_MANDIR}/man6/")
|
|
|
|
if(ENABLE_NLS)
|
|
foreach(LANG ${LINGUAS})
|
|
install(FILES ${LANG}/${MANPAGE} DESTINATION "${CMAKE_INSTALL_MANDIR}/${LANG}/man6/" OPTIONAL)
|
|
endforeach(LANG ${LINGUAS})
|
|
endif(ENABLE_NLS)
|
|
endforeach(MANPAGE ${MANPAGES})
|
|
|
|
if(ENABLE_POT_UPDATE_TARGET)
|
|
add_custom_target(update-po4a-man
|
|
COMMAND ${CMAKE_COMMAND}
|
|
-DPROJECT_SOURCE_DIR="${PROJECT_SOURCE_DIR}"
|
|
-DMANPAGES="${ALL_MANPAGES}"
|
|
-P "${CMAKE_SOURCE_DIR}/cmake/po4a-man.cmake"
|
|
DEPENDS
|
|
${CMAKE_CURRENT_SOURCE_DIR}/wesnoth.6
|
|
${CMAKE_CURRENT_SOURCE_DIR}/wesnothd.6
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
|
endif(ENABLE_POT_UPDATE_TARGET)
|