cmake: figure out man section from filename
This commit is contained in:
parent
62f2e3d549
commit
000e69729a
|
@ -81,12 +81,6 @@ SET(AWE_MAN_SRCS
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/awesome-client.1.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/awesomerc.5.txt)
|
||||
|
||||
SET(AWE_MAN1_NAME
|
||||
${CMAKE_CURRENT_BINARY_DIR}/awesome.1.gz
|
||||
${CMAKE_CURRENT_BINARY_DIR}/awesome-client.1.gz)
|
||||
|
||||
SET(AWE_MAN5_NAME ${CMAKE_CURRENT_BINARY_DIR}/awesomerc.5.gz)
|
||||
|
||||
SET(AWE_LUADOC_FILE ${CMAKE_CURRENT_SOURCE_DIR}/apidocgen.txt)
|
||||
|
||||
|
||||
|
@ -195,6 +189,10 @@ IF(GENERATE_MANPAGES)
|
|||
VERBATIM)
|
||||
|
||||
SET(MAN_FILES ${MAN_FILES} ${gzfile})
|
||||
|
||||
# figure out in what section to install to rom filename
|
||||
STRING(REGEX REPLACE "^.*\\.([0-9])\\.gz\$" "\\1" section ${gzfile})
|
||||
SET(AWE_MAN${section}_FILES ${AWE_MAN${section}_FILES} ${gzfile})
|
||||
ENDFOREACH()
|
||||
|
||||
ADD_CUSTOM_TARGET(man ALL DEPENDS ${MAN_FILES})
|
||||
|
@ -210,8 +208,8 @@ INSTALL(TARGETS ${PROJECT_AWE_NAME} ${PROJECT_AWECLIENT_NAME} RUNTIME DESTINATIO
|
|||
INSTALL(FILES ${AWE_LUA_FILES} DESTINATION ${AWESOME_REL_LUA_LIB_PATH})
|
||||
INSTALL(FILES ${AWE_CONF_FILES} DESTINATION ${AWESOME_REL_CONF_PATH})
|
||||
IF(GENERATE_MANPAGES)
|
||||
INSTALL(FILES ${AWE_MAN1_NAME} DESTINATION ${AWESOME_MAN1_PATH})
|
||||
INSTALL(FILES ${AWE_MAN5_NAME} DESTINATION ${AWESOME_MAN5_PATH})
|
||||
INSTALL(FILES ${AWE_MAN1_FILES} DESTINATION ${AWESOME_MAN1_PATH})
|
||||
INSTALL(FILES ${AWE_MAN5_FILES} DESTINATION ${AWESOME_MAN5_PATH})
|
||||
ENDIF()
|
||||
INSTALL(DIRECTORY ${AWE_ICON_DIR} DESTINATION ${AWESOME_REL_ICON_PATH})
|
||||
INSTALL(FILES ${AWE_DOC_FILES} DESTINATION ${AWESOME_REL_DOC_PATH})
|
||||
|
|
Loading…
Reference in New Issue