User Tools

Site Tools


c:build:build-libssh2-statically-on-windows-vs2017

This is an old revision of the document!


Prerequisites

  1. Download and install cmake
  2. Download the libssh2 sources and extract them (D:\libssh2)

Win32 static release build with openssl and zlib support

cd D:\libssh2

mkdir out

cmake -DCMAKE_BUILD_TYPE=Debug -DOPENSSL_ROOT_DIR=D:/OpenSSL/out/debug -DOPENSSL_LIBRARIES=D:/OpenSSL/out/debug/lib OPENSSL_INCLUDE_DIR=D:/OpenSSL/out/debug/include -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=./out -DCRYPTO_BACKEND=OpenSSL -DZLIB_LIBRARY:FILEPATH=D:/zlib/lib/zlib.lib -DZLIB_INCLUDE_DIR:PATH=D:/zlib/include -DENABLE_ZLIB_COMPRESSION=ON ENABLE_DEBUG_LOGGING=ON -Wno-dev -DBUILD_TESTING=OFF –build .

-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.18363.
-- Found ZLIB: D:/zlib/lib/zlib.lib (found version "1.2.11")
-- The following features have been enabled:

 * Compression, using zlib for compression
 * diffie-hellman-group-exchange-sha1, "new" diffie-hellman-group-exchange-sha1 method
 * Logging, Logging of execution with debug trace

-- The following REQUIRED packages have been found:

 * OpenSSL
 * ZLIB

-- The following features have been disabled:

 * Shared library, creating libssh2 as a shared library (.so/.dll)
 * "none" cipher
 * "none" MAC

-- Configuring done
-- Generating done
-- Build files have been written to: D:/libssh2
c/build/build-libssh2-statically-on-windows-vs2017.1593468318.txt.gz · Last modified: 2023/07/04 19:36 (external edit)