2020-10-04 22:56:30 +03:00
|
|
|
# Add prefix "libevent_" for manual pages
|
2020-10-04 19:55:52 +03:00
|
|
|
|
|
|
|
message(STATUS "Rename man pages in ${CMAKE_BINARY_DIR}")
|
|
|
|
|
|
|
|
# Remove old pages to avoid stalled copies
|
2020-10-04 22:56:30 +03:00
|
|
|
file(GLOB LIBEVENT_MAN_PAGES RELATIVE ${CMAKE_BINARY_DIR} libevent_*)
|
2020-10-04 19:55:52 +03:00
|
|
|
list(LENGTH LIBEVENT_MAN_PAGES LEN)
|
|
|
|
if (${LEN} GREATER 0)
|
|
|
|
file(REMOVE ${LIBEVENT_MAN_PAGES})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# Create new
|
|
|
|
file(GLOB LIBEVENT_MAN_PAGES RELATIVE ${CMAKE_BINARY_DIR} *)
|
2020-10-04 22:56:30 +03:00
|
|
|
list(FILTER LIBEVENT_MAN_PAGES EXCLUDE REGEX ^libevent_.*$)
|
2020-10-04 19:55:52 +03:00
|
|
|
foreach(MAN_PAGE ${LIBEVENT_MAN_PAGES})
|
2020-10-04 22:56:30 +03:00
|
|
|
file(RENAME ${CMAKE_BINARY_DIR}/${MAN_PAGE} ${CMAKE_BINARY_DIR}/libevent_${MAN_PAGE})
|
2020-10-04 19:55:52 +03:00
|
|
|
endforeach()
|