Description: Allow to overwrite libssh's OUTPUT_NAME.
Author: Sebastian Ramacher <s.ramacher@gmx.at>
Last-Update: 2012-06-19

--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -92,6 +92,11 @@ set(LIBSSH_LINK_LIBRARIES
   CACHE INTERNAL "libssh link libraries"
 )
 
+set(LIBSSH_LIBRARY_NAME
+  ssh
+  CACHE INTERNAL "libssh library name"
+)
+
 set(LIBSSH_SHARED_LIBRARY
   ssh_shared
   CACHE INTERNAL "libssh shared library"
@@ -237,7 +242,7 @@ set_target_properties(
       SOVERSION
         ${LIBRARY_SOVERSION}
       OUTPUT_NAME
-        ssh
+        ${LIBSSH_LIBRARY_NAME}
       DEFINE_SYMBOL
         LIBSSH_EXPORTS
 )
--- a/src/threads/CMakeLists.txt
+++ b/src/threads/CMakeLists.txt
@@ -71,7 +71,7 @@ if (libssh_threads_SRCS)
           SOVERSION
             ${LIBRARY_SOVERSION}
           OUTPUT_NAME
-            ssh_threads
+            ${LIBSSH_LIBRARY_NAME}_threads
           DEFINE_SYMBOL
             LIBSSH_EXPORTS
     )
