build: only install selected manpages

This commit is contained in:
Marcus Holland-Moritz 2024-08-12 17:51:54 +02:00
parent d205fed4e9
commit e09d63ffe8

View File

@ -62,11 +62,11 @@ function(add_manpage MANPAGE)
endif() endif()
if(_man_dir) if(_man_dir)
install(FILES "${_man_dir}/${MANPAGE}" DESTINATION share/man/man${_section})
get_target_property(_man_dirs manpages MANPAGE_DIRECTORIES) get_target_property(_man_dirs manpages MANPAGE_DIRECTORIES)
list(FIND _man_dirs "${_man_dir}" _index) list(FIND _man_dirs "${_man_dir}" _index)
if(${_index} EQUAL -1) if(${_index} EQUAL -1)
list(APPEND _man_dirs "${_man_dir}") list(APPEND _man_dirs "${_man_dir}")
install(DIRECTORY "${_man_dir}" DESTINATION share/man)
set_target_properties(manpages PROPERTIES MANPAGE_DIRECTORIES "${_man_dirs}") set_target_properties(manpages PROPERTIES MANPAGE_DIRECTORIES "${_man_dirs}")
endif() endif()
endif() endif()