summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorBertrand SIMONNET <bsimonnet@chromium.org>2014-08-20 15:43:23 -0700
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2015-02-20 20:49:45 +0000
commit57696a2e8a5eb2df3177f5b52c512a14f3cab1f5 (patch)
tree01646dc540fc6d36b4d5e00a1bce6d42564b3a30 /cmake
parent7d214f4d5855c43a7aa0bec385d93e4a67a09f5f (diff)
downloaddbus-57696a2e8a5eb2df3177f5b52c512a14f3cab1f5.tar.gz
dbus-57696a2e8a5eb2df3177f5b52c512a14f3cab1f5.tar.bz2
dbus-57696a2e8a5eb2df3177f5b52c512a14f3cab1f5.zip
Link dbus-daemon and dbus-daemon-lauch-helper against libdbus
The shared can be used by dbus-daemon and dbus-daemon-launch-helper by exporting the private symbols needed, reducing the size of dbus by about 500k. The private symbols are exposed under the version LIBDBUS_PRIVATE_@VERSION_NUMBER@. [Altered by Simon McVittie and Ralf Habacker to clear up some problematic linking.] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83115 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/CMakeLists.txt7
-rw-r--r--cmake/dbus/CMakeLists.txt7
2 files changed, 2 insertions, 12 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 9a1be6c4..adc6d4b2 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -475,13 +475,8 @@ endif (DBUS_BUILD_TESTS)
set(DBUS_LIBRARIES dbus-1)
set(DBUS_INTERNAL_LIBRARIES dbus-internal)
-# settings for building and using static internal lib
-# important note: DBUS_INTERNAL_xxxxx_DEFINITIONS must *not* be set when building dbus-1 library
set (DBUS_INTERNAL_ADD_LIBRARY_OPTIONS STATIC)
-set (DBUS_INTERNAL_LIBRARY_DEFINITIONS "-DDBUS_STATIC_BUILD")
-# For now, the CMake build system doesn't support replacing the internal
-# main loop with dbus-glib
-set (DBUS_INTERNAL_CLIENT_DEFINITIONS "-DDBUS_STATIC_BUILD -DDBUS_COMPILATION")
+set (DBUS_INTERNAL_CLIENT_DEFINITIONS "-DDBUS_COMPILATION")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h )
diff --git a/cmake/dbus/CMakeLists.txt b/cmake/dbus/CMakeLists.txt
index a6aaba07..7c6b1ee9 100644
--- a/cmake/dbus/CMakeLists.txt
+++ b/cmake/dbus/CMakeLists.txt
@@ -291,15 +291,10 @@ install_files(/include/dbus FILES ${dbusinclude_HEADERS})
### Internal library, used for the daemon, tools and tests, compiled statically.
add_library(dbus-internal ${DBUS_INTERNAL_ADD_LIBRARY_OPTIONS}
- ${DBUS_LIB_SOURCES}
- ${DBUS_LIB_HEADERS}
- ${DBUS_SHARED_SOURCES}
- ${DBUS_SHARED_HEADERS}
${DBUS_UTIL_SOURCES}
${DBUS_UTIL_HEADERS}
)
-target_link_libraries(dbus-internal)
-set_target_properties(dbus-internal PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_LIBRARY_DEFINITIONS})
+target_link_libraries(dbus-internal dbus-1)
if(WIN32)
if(WINCE)
target_link_libraries(dbus-internal ws2)