libevent/cmake/RenameDoxygen.cmake
Azat Khuzhin 19d0bdfe0c Change prefix for man pages from "le_" to "libevent_"
As pointed by @kloczek:
  "With only two characters it would be harder to guess under what kind of name are libevent lvl 3 man pages.
   Longer name with bash/fix/zsh tab competition should not be a problem :)"

Refs: #1099
2020-10-04 22:59:12 +03:00

18 lines
596 B
CMake

# Add prefix "libevent_" for manual pages
message(STATUS "Rename man pages in ${CMAKE_BINARY_DIR}")
# Remove old pages to avoid stalled copies
file(GLOB LIBEVENT_MAN_PAGES RELATIVE ${CMAKE_BINARY_DIR} libevent_*)
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} *)
list(FILTER LIBEVENT_MAN_PAGES EXCLUDE REGEX ^libevent_.*$)
foreach(MAN_PAGE ${LIBEVENT_MAN_PAGES})
file(RENAME ${CMAKE_BINARY_DIR}/${MAN_PAGE} ${CMAKE_BINARY_DIR}/libevent_${MAN_PAGE})
endforeach()