1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-12-03 13:31:12 +03:00
Viktor Szakats 896154bc17 cmake: enable shared libssh2 library by default
This brings default behaviour in sync with autotools, which builds both
lib flavours by default.

(Notice that on Windows, autotools includes the Windows Resource in the
static library, when building both at the same time. CMake doesn't have
this issue.)

Enabling both lib flavours has a side-effect when using non-MinGW
toolchains (e.g. MSVC): to resolve the filename conflict between import
and static libraries, we add a suffix to the static lib, naming it
`libssh2_static.lib`. This can break dependent builds relying on
`libssh2.lib` for linking the static libssh2.

Workarounds:

- disable either shared or static libssh2 via
  `-DBUILD_STATIC_LIBS=OFF` or
  `-DBUILD_SHARED_LIBS=OFF`. This results in a libssh2 library (either
  static or shared) without a prefix: `libssh2.lib`.

- set a custom static library suffix via:
  `-DSTATIC_LIB_SUFFIX=_my_static`. Resulting in
  `libssh2_my_static.lib`, and import library
  `libssh2.lib`.

- set a custom import library suffix via:
  `-DIMPORT_LIB_SUFFIX=_my_implib`. Resulting in
  `libssh2_my_implib.lib` import library, and static library
  `libssh2.lib`.

- customize the default static/import library suffix (incl. extension)
  via
  `-DCMAKE_STATIC_LIBRARY_SUFFIX=_my_static_suffix.lib` or
  `-DCMAKE_IMPORT_LIBRARY_SUFFIX=_my_import_suffix.lib`.

Cherry-picked from #1036
2023-05-09 08:12:52 +00:00
2023-05-03 01:35:16 +00:00
2023-04-27 14:27:17 +00:00
2023-05-03 01:09:15 +00:00
2023-05-04 20:16:28 +00:00
2019-08-02 16:38:08 -07:00
2023-05-03 01:09:15 +00:00
2023-05-03 01:35:05 +00:00
2023-04-10 23:03:43 +00:00
2023-03-30 20:59:47 +02:00
2016-02-24 23:44:13 +01:00
2023-04-15 02:46:09 +00:00
2011-04-04 13:31:33 +02:00
2023-04-10 23:03:43 +00:00
2021-09-03 09:17:34 +02:00
2023-03-27 19:26:58 +02:00

libssh2 - SSH2 library

libssh2 is a library implementing the SSH2 protocol, available under the revised BSD license.

Web site

Mailing list

BSD Licensed

Web site source code

Installation instructions:

Description
libssh2 - это библиотека, реализующая протокол SSH2, доступная по пересмотренной лицензии BSD
Readme 16 MiB
Languages
C 85.1%
M4 3.6%
CMake 3.5%
Shell 2.6%
RPGLE 1.7%
Other 3.2%