From 66a85461b3fabcf7520db438aa0a2ce2e7ce74ff Mon Sep 17 00:00:00 2001 From: Benjamin Jemlich Date: Tue, 30 Mar 2010 19:25:29 +0200 Subject: [PATCH] Really fix visibility header on windows --- CMakeLists.txt | 3 ++- visibility.h | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6cc959d..2f89709 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,6 +37,7 @@ include_directories(. ${Boost_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR} ${CELT_INCLUD PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS Mumble.proto) add_library(mumbleclient client.cc client_lib.cc CryptState.cpp ${PROTO_SRCS} ${PROTO_HDRS}) +target_link_libraries(mumbleclient ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${PROTOBUF_LIBRARY}) option(WITH_MPG123 "Add mp3 playback support" ON) @@ -46,4 +47,4 @@ if (WITH_MPG123) endif() add_executable (main main.cc) -target_link_libraries (main mumbleclient ${LIBRARIES} ${CELT_LIBRARIES} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${PROTOBUF_LIBRARY}) +target_link_libraries (main mumbleclient ${LIBRARIES} ${CELT_LIBRARIES} ${Boost_LIBRARIES}) diff --git a/visibility.h b/visibility.h index 2d0d67a..0ef4c12 100644 --- a/visibility.h +++ b/visibility.h @@ -3,7 +3,7 @@ #ifdef __GNUC__ #define DLL_PUBLIC __attribute__((dllexport)) #else - #define DLL_PUBLIC __declspec(dllexport) // Note: actually gcc seems to also supports this syntax. + #define DLL_PUBLIC __declspec(dllexport) #endif #elif defined(BUILDING_STATIC) #define DLL_PUBLIC @@ -12,10 +12,10 @@ #ifdef __GNUC__ #define DLL_PUBLIC __attribute__((dllimport)) #else - #define DLL_PUBLIC __declspec(dllimport) // Note: actually gcc seems to also supports this syntax. + #define DLL_PUBLIC __declspec(dllimport) #endif - #define DLL_LOCAL #endif + #define DLL_LOCAL #else #if __GNUC__ >= 4 #define DLL_PUBLIC __attribute__ ((visibility("default")))