$OpenBSD: patch-Source_cmComputeLinkInformation_cxx,v 1.7 2013/10/14 12:58:03 dcoppa Exp $
--- Source/cmComputeLinkInformation.cxx.orig	Mon Oct  7 17:31:00 2013
+++ Source/cmComputeLinkInformation.cxx	Wed Oct  9 09:38:48 2013
@@ -1076,12 +1076,21 @@ void cmComputeLinkInformation::AddTargetItem(std::stri
     this->SharedLibrariesLinked.insert(target);
     }
 
-  // Handle case of an imported shared library with no soname.
-  if(this->NoSONameUsesPath &&
-     target->IsImportedSharedLibWithoutSOName(this->Config))
+  if(this->OpenBSD)
     {
-    this->AddSharedLibNoSOName(item);
-    return;
+    if(target->GetType() == cmTarget::SHARED_LIBRARY)
+      {
+      this->AddSharedLibNoSOName(item);
+      return;
+      }
+    } else {
+    // Handle case of an imported shared library with no soname.
+    if(this->NoSONameUsesPath &&
+       target->IsImportedSharedLibWithoutSOName(this->Config))
+      {
+      this->AddSharedLibNoSOName(item);
+      return;
+      }
     }
 
   // If this platform wants a flag before the full path, add it.
