From db284d60b97bbee864d88737b4f8c6ae5b03c8ff Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 11 Aug 2009 18:16:43 +0200 Subject: Fix static build. If you want to link against the static library you have to define LIBSSH_STATIC and link against ssh_static. gcc -static -DLIBSSH_STATIC -lssh_static foo.c -o foo --- libssh/CMakeLists.txt | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'libssh') diff --git a/libssh/CMakeLists.txt b/libssh/CMakeLists.txt index 3af8d8a9..9274f6f3 100644 --- a/libssh/CMakeLists.txt +++ b/libssh/CMakeLists.txt @@ -156,10 +156,8 @@ set_target_properties( ${LIBRARY_SOVERSION} OUTPUT_NAME ssh - CLEAN_DIRECT_OUTPUT - 1 DEFINE_SYMBOL - SSH_EXPORTS + LIBSSH_EXPORTS COMPILE_FLAGS ${LIBSSH_SHARED_CFLAGS} ) @@ -183,10 +181,8 @@ if (WITH_STATIC_LIB) ${LIBRARY_VERSION} SOVERSION ${LIBRARY_SOVERSION} - OUTPUT_NAME - ssh - CLEAN_DIRECT_OUTPUT - 1 + COMPILE_FLAGS + "-DLIBSSH_STATIC" ) install( -- cgit