Skip to content
Find file
e6bc4b4 Dec 21, 2010
81 lines (52 sloc) 2.24 KB
# How to build from source
## Requirements
### Common requirements
In order to build libssh, you need to install several components:
- A C compiler
- [CMake]( >= 2.6.0.
- [openssl]( >= 0.9.8
- [gcrypt]( >= 1.4
- [libz]( >= 1.2
Note that these version numbers are version we know works correctly. If you
build and run libssh successfully with an older version, please let us know.
## Building
First, you need to configure the compilation, using CMake. Go inside the
`build` dir. Create it if it doesn't exist.
GNU/Linux and MacOS X:
### CMake standard options
Here is a list of the most interesting options provided out of the box by
- CMAKE_BUILD_TYPE: The type of build (can be Debug Release MinSizeRel
- CMAKE_INSTALL_PREFIX: The prefix to use when running make install (Default
to /usr/local on GNU/Linux and MacOS X)
- CMAKE_C_COMPILER: The path to the C compiler
- CMAKE_CXX_COMPILER: The path to the C++ compiler
### CMake options defined for libssh
Options are defined in the following files:
- DefineOptions.cmake
They can be changed with the -D option:
### Browsing/editing CMake options
In addition to passing options on the command line, you can browse and edit
CMake options using `cmakesetup` (Windows), `cmake-gui` or `ccmake` (GNU/Linux
and MacOS X).
- Go to the build dir
- On Windows: run `cmakesetup`
- On GNU/Linux and MacOS X: run `ccmake ..`
## Installing
If you want to install libssh after compilation run:
make install
## Running
The libssh binary can be found in the `build/libssh` directory.
You can use `build/examples/samplessh` which is a sample client to
test libssh on UNIX.
## About this document
This document is written using [Markdown][] syntax, making it possible to
provide usable information in both plain text and HTML format. Whenever
modifying this document please use [Markdown][] syntax.
Something went wrong with that request. Please try again.