Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In order to statically link the libssh2 library from the `.deps` folder using the ExternalProjects module for Cmake, the static library needs to be compiled with the `-fPIC` flag. In Cmake, this is the `CMAKE_POSITION_INDEPENDENT_CODE` property and it can be set using the `-D` flag in the `CMAKE_ARGS` property for the external project. Note, the `CMAKE_POSITION_INDEPENDENT_CODE` property is `ON` by default for a _shared_ library, but it is `OFF` by default for a _static_ library. Thus, it needs to be explicitly set to `ON` for the static linking on Linux system.
- Loading branch information