mirror of
https://github.com/libssh2/libssh2.git
synced 2025-07-31 00:03:08 +03:00
cmake: use shared libs again in example and tests
Re-sync with autotools and v1.10.0 behavior.
This improves build times. It also allows to stop building our special
shared test target to test shared builds.
Follow-up to 4e2580628d
Cherry-picked from #1017
Closes #1022
This commit is contained in:
@ -47,7 +47,7 @@ foreach(example ${EXAMPLES})
|
||||
list(APPEND EXAMPLE_TARGETS ${example})
|
||||
# to find generated header
|
||||
target_include_directories(${example} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/../src ../src)
|
||||
target_link_libraries(${example} ${LIB_STATIC} ${LIBRARIES})
|
||||
target_link_libraries(${example} ${LIB_SELECTED} ${LIBRARIES})
|
||||
endforeach()
|
||||
|
||||
add_target_to_copy_dependencies(
|
||||
|
@ -32,10 +32,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
static const char *pubkey = ".ssh/id_rsa.pub";
|
||||
static const char *privkey = ".ssh/id_rsa";
|
||||
static const char *username = "username";
|
||||
|
@ -21,10 +21,6 @@
|
||||
#define INADDR_NONE (in_addr_t)~0
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
static const char *pubkey = "/home/username/.ssh/id_rsa.pub";
|
||||
static const char *privkey = "/home/username/.ssh/id_rsa";
|
||||
static const char *username = "username";
|
||||
|
Reference in New Issue
Block a user