1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-30 13:01:23 +03:00

cmake: Fix building libssh as a static lib on Windows

Fixes T198

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
Andreas Schneider
2019-11-14 21:03:35 +01:00
parent db632015be
commit c54fd03e50

View File

@@ -322,6 +322,10 @@ target_include_directories(ssh
target_link_libraries(ssh
PRIVATE ${LIBSSH_LINK_LIBRARIES})
if (WIN32 AND NOT BUILD_SHARED_LIBS)
set_target_properties(ssh PROPERTIES COMPILE_FLAGS "-DLIBSSH_STATIC")
endif ()
add_library(ssh::ssh ALIAS ssh)
if (WITH_SYMBOL_VERSIONING AND HAVE_LD_VERSION_SCRIPT)