diff --git a/telldus-core/client/CMakeLists.txt b/telldus-core/client/CMakeLists.txt index 589c0cf7..a060dcf3 100644 --- a/telldus-core/client/CMakeLists.txt +++ b/telldus-core/client/CMakeLists.txt @@ -85,6 +85,10 @@ ADD_LIBRARY(${telldus-core_TARGET} SHARED ${telldus-core_PUB_HDRS} ) +IF (UNIX) + SET_TARGET_PROPERTIES( ${telldus-core_TARGET} PROPERTIES COMPILE_FLAGS "-fPIC -fvisibility=hidden") +ENDIF (UNIX) + TARGET_LINK_LIBRARIES( ${telldus-core_TARGET} ${telldus-core_LIBRARIES} ) SET_PROPERTY(TARGET ${telldus-core_TARGET} diff --git a/telldus-core/client/telldus-core.h b/telldus-core/client/telldus-core.h index 892544ac..5fc031da 100644 --- a/telldus-core/client/telldus-core.h +++ b/telldus-core/client/telldus-core.h @@ -22,7 +22,7 @@ #define WINAPI __stdcall #else #define WINAPI - #define TELLSTICK_API + #define TELLSTICK_API __attribute__ ((visibility("default"))) #endif typedef void (WINAPI *TDDeviceEvent)(int deviceId, int method, const char *data, int callbackId, void *context); diff --git a/telldus-core/common/CMakeLists.txt b/telldus-core/common/CMakeLists.txt index aaa310ea..9a4eb15a 100644 --- a/telldus-core/common/CMakeLists.txt +++ b/telldus-core/common/CMakeLists.txt @@ -73,6 +73,8 @@ ADD_LIBRARY(${telldus-common_TARGET} STATIC ${telldus-common_HDRS} ) -SET_TARGET_PROPERTIES( ${telldus-common_TARGET} PROPERTIES COMPILE_FLAGS -fPIC) +IF (UNIX) + SET_TARGET_PROPERTIES( ${telldus-common_TARGET} PROPERTIES COMPILE_FLAGS "-fPIC -fvisibility=hidden") +ENDIF (UNIX) TARGET_LINK_LIBRARIES( ${telldus-common_TARGET} ${telldus-common_LIBRARIES} )