$OpenBSD: patch-Source_cmInstallCommand_cxx,v 1.18 2021/05/09 14:46:15 rsadowski Exp $
Index: Source/cmInstallCommand.cxx
--- Source/cmInstallCommand.cxx.orig
+++ Source/cmInstallCommand.cxx
@@ -393,6 +393,9 @@ bool HandleTargetsMode(std::vector<std::string> const&
   }
 
   // Select the mode for installing symlinks to versioned shared libraries.
+  // Do not install symlinks to versioned shared libraries on OpenBSD.
+  // Use NamelinkModeSkip unconditionally.
+#if !defined(__OpenBSD__)
   cmInstallTargetGenerator::NamelinkModeType namelinkMode =
     cmInstallTargetGenerator::NamelinkModeNone;
   if (libraryArgs.GetNamelinkOnly()) {
@@ -400,6 +403,10 @@ bool HandleTargetsMode(std::vector<std::string> const&
   } else if (libraryArgs.GetNamelinkSkip()) {
     namelinkMode = cmInstallTargetGenerator::NamelinkModeSkip;
   }
+#else
+  cmInstallTargetGenerator::NamelinkModeType namelinkMode =
+    cmInstallTargetGenerator::NamelinkModeSkip;
+#endif
 
   // Check if there is something to do.
   if (targetList.empty()) {
