From d9b7e4cb7a40fe171aea1411ce8cfabc25036bb3 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 12 Aug 2009 14:05:17 +0200 Subject: Fix compilation with visibility flags with mingw. Thanks to Patrick Spendrin. --- libssh/CMakeLists.txt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'libssh') diff --git a/libssh/CMakeLists.txt b/libssh/CMakeLists.txt index 9274f6f..2fc8adb 100644 --- a/libssh/CMakeLists.txt +++ b/libssh/CMakeLists.txt @@ -73,10 +73,6 @@ if (GCRYPT_LIBRARY) ) endif (GCRYPT_LIBRARY) -if (WITH_VISIBILITY_HIDDEN) - set(LIBSSH_SHARED_CFLAGS "-fvisibility=hidden") -endif (WITH_VISIBILITY_HIDDEN) - set(libssh_SRCS agent.c auth.c @@ -158,10 +154,13 @@ set_target_properties( ssh DEFINE_SYMBOL LIBSSH_EXPORTS - COMPILE_FLAGS - ${LIBSSH_SHARED_CFLAGS} ) +if (WITH_VISIBILITY_HIDDEN) + set_target_properties(${LIBSSH_SHARED_LIBRARY} PROPERTIES COMPILE_FLAGS "-fvisibility=hidden") +endif (WITH_VISIBILITY_HIDDEN) + + install( TARGETS ${LIBSSH_SHARED_LIBRARY} -- cgit