[cmake] Semi-parametrize manpage location.

On OpenBSD, man pages go in $CMAKE_INSTALL_PATH/man. This requires
changing the default to something with a parameter when installing
on this platform.
This commit is contained in:
3405691582
2020-10-24 19:39:22 -04:00
parent 246fe46aa7
commit c8e48e6d44

View File

@@ -39,8 +39,12 @@ function(manpage)
ALL)
add_dependencies(${MP_INSTALL_IN_COMPONENT} ${manpage_target})
set(MANPAGE_DEST "share/")
if("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "OPENBSD")
set(MANPAGE_DEST "")
endif()
swift_install_in_component(FILES "${output_file_name}"
DESTINATION "share/man/man${MP_MAN_SECTION}"
DESTINATION "${MANPAGE_DEST}man/man${MP_MAN_SECTION}"
COMPONENT "${MP_INSTALL_IN_COMPONENT}")
endfunction()