Make sure we only export the public symbols

This commit is contained in:
Micke Prag 2011-03-14 15:37:21 +00:00
parent 55f49a2c5a
commit 2c9df662d6
3 changed files with 8 additions and 2 deletions

View file

@ -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}

View file

@ -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);

View file

@ -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} )