mirror of
https://github.com/libssh2/libssh2.git
synced 2025-07-04 09:22:28 +03:00
@ -36,8 +36,8 @@ cryptography library available. The library binary will be put in
|
|||||||
Customising the build
|
Customising the build
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
Of course, you might want to customise the build options. You can
|
You might want to customise the build options. You can pass the options
|
||||||
pass the options to CMake on the command line:
|
to CMake on the command line:
|
||||||
|
|
||||||
cmake -D<option>=<value> ..
|
cmake -D<option>=<value> ..
|
||||||
|
|
||||||
@ -137,11 +137,10 @@ link the library with your binary.
|
|||||||
find_package(Libssh2 REQUIRED CONFIG)
|
find_package(Libssh2 REQUIRED CONFIG)
|
||||||
target_link_libraries(my_project_target Libssh2::libssh2)
|
target_link_libraries(my_project_target Libssh2::libssh2)
|
||||||
|
|
||||||
Of course, you still have to make libssh2 available on your system
|
You still have to make libssh2 available on your system first. You can
|
||||||
first. You can install it in the traditional way shown above, but you
|
install it in the traditional way shown above, but you do not have to.
|
||||||
do not have to. Instead you can build it, which will export its
|
Instead you can build it, which will export its location to the user
|
||||||
location to the user package registry [3] where `find_package` will
|
package registry [3] where `find_package` will find it.
|
||||||
find it.
|
|
||||||
|
|
||||||
You can even combine the two steps using a so-called 'superbuild'
|
You can even combine the two steps using a so-called 'superbuild'
|
||||||
project [4] that downloads, builds and exports libssh2, and then
|
project [4] that downloads, builds and exports libssh2, and then
|
||||||
|
@ -45,10 +45,9 @@
|
|||||||
|
|
||||||
int rc = BLOCK_ADJUST_ERRNO(ptr, session, session_startup(session, sock));
|
int rc = BLOCK_ADJUST_ERRNO(ptr, session, session_startup(session, sock));
|
||||||
|
|
||||||
The point of course being to make sure that while in non-blocking mode
|
The point being to make sure that while in non-blocking mode these always
|
||||||
these always return no matter what the return code is, but in blocking mode
|
return no matter what the return code is, but in blocking mode it blocks
|
||||||
it blocks if EAGAIN is the reason for the return from the underlying
|
if EAGAIN is the reason for the return from the underlying function.
|
||||||
function.
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
#define BLOCK_ADJUST(rc, sess, x) \
|
#define BLOCK_ADJUST(rc, sess, x) \
|
||||||
|
Reference in New Issue
Block a user