Skip to content

Commit c8e48e6

Browse files
committed
[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.
1 parent 246fe46 commit c8e48e6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cmake/modules/SwiftManpage.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,12 @@ function(manpage)
3939
ALL)
4040

4141
add_dependencies(${MP_INSTALL_IN_COMPONENT} ${manpage_target})
42+
set(MANPAGE_DEST "share/")
43+
if("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "OPENBSD")
44+
set(MANPAGE_DEST "")
45+
endif()
4246
swift_install_in_component(FILES "${output_file_name}"
43-
DESTINATION "share/man/man${MP_MAN_SECTION}"
47+
DESTINATION "${MANPAGE_DEST}man/man${MP_MAN_SECTION}"
4448
COMPONENT "${MP_INSTALL_IN_COMPONENT}")
4549
endfunction()
4650

0 commit comments

Comments
 (0)