mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-12-06 13:20:57 +03:00
include: Only require LIBSSH_STATIC on Windows.
This commit is contained in:
@@ -22,10 +22,10 @@
|
|||||||
#ifndef _LIBSSH_H
|
#ifndef _LIBSSH_H
|
||||||
#define _LIBSSH_H
|
#define _LIBSSH_H
|
||||||
|
|
||||||
|
#if defined _WIN32 || defined __CYGWIN__
|
||||||
#ifdef LIBSSH_STATIC
|
#ifdef LIBSSH_STATIC
|
||||||
#define LIBSSH_API
|
#define LIBSSH_API
|
||||||
#else
|
#else
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
|
||||||
#ifdef LIBSSH_EXPORTS
|
#ifdef LIBSSH_EXPORTS
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#define LIBSSH_API __attribute__((dllexport))
|
#define LIBSSH_API __attribute__((dllexport))
|
||||||
@@ -39,6 +39,7 @@
|
|||||||
#define LIBSSH_API __declspec(dllimport)
|
#define LIBSSH_API __declspec(dllimport)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#if __GNUC__ >= 4
|
#if __GNUC__ >= 4
|
||||||
#define LIBSSH_API __attribute__((visibility("default")))
|
#define LIBSSH_API __attribute__((visibility("default")))
|
||||||
@@ -46,7 +47,6 @@
|
|||||||
#define LIBSSH_API
|
#define LIBSSH_API
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
/* Visual Studio hasn't inttypes.h so it doesn't know uint32_t */
|
/* Visual Studio hasn't inttypes.h so it doesn't know uint32_t */
|
||||||
|
|||||||
@@ -190,9 +190,16 @@ if (WITH_STATIC_LIB)
|
|||||||
${LIBRARY_SOVERSION}
|
${LIBRARY_SOVERSION}
|
||||||
OUTPUT_NAME
|
OUTPUT_NAME
|
||||||
ssh
|
ssh
|
||||||
|
)
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
set_target_properties(
|
||||||
|
${LIBSSH_STATIC_LIBRARY}
|
||||||
|
PROPERTIES
|
||||||
COMPILE_FLAGS
|
COMPILE_FLAGS
|
||||||
"-DLIBSSH_STATIC"
|
"-DLIBSSH_STATIC"
|
||||||
)
|
)
|
||||||
|
endif (WIN32)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
TARGETS
|
TARGETS
|
||||||
|
|||||||
Reference in New Issue
Block a user