set_target_properties(ceph-common PROPERTIES
SOVERSION 0
INSTALL_RPATH "")
+if(NOT APPLE)
+ # Apple uses Mach-O, not ELF. so this option does not apply to APPLE.
+ #
+ # prefer the local symbol definitions when binding references to global
+ # symbols. otherwise we could reference the symbols defined by the application
+ # with the same name, instead of using the one defined in libceph-common.
+ # in other words, we require libceph-common to use local symbols, even if redefined
+ # in application".
+ set_property(
+ TARGET ceph-common
+ APPEND APPEND_STRING
+ PROPERTY LINK_FLAGS "-Wl,-Bsymbolic -Wl,-Bsymbolic-functions")
+endif()
+
install(TARGETS ceph-common DESTINATION ${CMAKE_INSTALL_PKGLIBDIR})
if(${WITH_LTTNG})