diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2015-02-20 23:10:52 +0100 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2015-02-20 23:27:12 +0100 |
commit | 7ec30ffa907465698798bb38391d65bab91335bb (patch) | |
tree | b56f5ce4f5a1d956c84669cd1e3b28108fdeb36f /cmake | |
parent | 6d9e1553c9d2f15a8edbb82812bf8966c40feb9e (diff) | |
download | dbus-7ec30ffa907465698798bb38391d65bab91335bb.tar.gz dbus-7ec30ffa907465698798bb38391d65bab91335bb.tar.bz2 dbus-7ec30ffa907465698798bb38391d65bab91335bb.zip |
Add versioned symbol support to cmake build system for linux platforms to keep in sync with autotools.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83115
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/dbus/CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/dbus/CMakeLists.txt b/cmake/dbus/CMakeLists.txt index 7c6b1ee9..f7bf4761 100644 --- a/cmake/dbus/CMakeLists.txt +++ b/cmake/dbus/CMakeLists.txt @@ -285,6 +285,13 @@ else(WIN32) target_link_libraries(dbus-1 ${CMAKE_THREAD_LIBS_INIT} rt) endif(WIN32) +# Assume that Linux has -Wl,--version-script and other platforms do not +if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") + set(SOVERSION ${DBUS_LIBRARY_MAJOR}) + configure_file(${DBUS_DIR}/Version.in ${CMAKE_CURRENT_BINARY_DIR}/Version) + set_target_properties(dbus-1 PROPERTIES LINK_FLAGS -Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/Version) +endif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") + install(TARGETS dbus-1 ${INSTALL_TARGETS_DEFAULT_ARGS}) install_files(/include/dbus FILES ${dbusinclude_HEADERS}) |