From: Ralf Habacker Date: Sat, 20 Mar 2010 21:30:16 +0000 (+0100) Subject: CMake dbus libraries usage cleanup. X-Git-Tag: dbus-1.3.1~83 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d999abdaa83a89a642ba507d58c36b161e220f3a;p=platform%2Fupstream%2Fdbus.git CMake dbus libraries usage cleanup. Renamed DBUS_LIBRARIES to DBUS_INTERNAL_LIBRARIES and moved to top level CMakeLists.txt. Removed obsolate references of dbus-internal library. Added DBUS_LIBRARIES definition which contains only the dbus library. --- diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index e4a9c00..80db3de 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -494,6 +494,9 @@ if (DBUS_BUILD_TESTS) set(TEST_LAUNCH_HELPER_BINARY ${EXECUTABLE_OUTPUT_PATH}/dbus-daemon-launch-helper-test) endif (DBUS_BUILD_TESTS) +set(DBUS_LIBRARIES dbus-1) +set(DBUS_INTERNAL_LIBRARIES dbus-1 dbus-internal) + ########### subdirs ############### add_subdirectory( dbus ) diff --git a/cmake/bus/CMakeLists.txt b/cmake/bus/CMakeLists.txt index f7f29db..23dd05b 100644 --- a/cmake/bus/CMakeLists.txt +++ b/cmake/bus/CMakeLists.txt @@ -77,10 +77,8 @@ set (BUS_SOURCES include_directories(${XML_INCLUDE_DIR}) -set(DBUS_LIBRARIES dbus-1 dbus-internal) - add_executable(dbus-daemon ${BUS_SOURCES} ${BUS_DIR}/main.c) -target_link_libraries(dbus-daemon ${DBUS_LIBRARIES} ${XML_LIBRARY}) +target_link_libraries(dbus-daemon ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY}) set_target_properties(dbus-daemon PROPERTIES OUTPUT_NAME ${DBUS_DAEMON_NAME}) install_targets(/bin dbus-daemon) @@ -95,13 +93,13 @@ if (DBUS_SERVICE) ) add_executable(dbus-service ${dbus_service_SOURCES} ) - target_link_libraries(dbus-service ${DBUS_LIBRARIES} ${XML_LIBRARY}) + target_link_libraries(dbus-service ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY}) install_targets(/bin dbus-service ) endif (DBUS_SERVICE) if (DBUS_BUILD_TESTS) add_executable(bus-test ${BUS_SOURCES} ${BUS_DIR}/test-main.c) - target_link_libraries(bus-test ${DBUS_LIBRARIES} ${XML_LIBRARY}) + target_link_libraries(bus-test ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY}) add_test(bus-test ${EXECUTABLE_OUTPUT_PATH}/bus-test ${CMAKE_BINARY_DIR}/test/data) endif (DBUS_BUILD_TESTS) @@ -133,15 +131,15 @@ set(LAUNCH_HELPER_SOURCES ${XML_SOURCES} if(NOT WIN32) # TODO PENDING(kdab) fix build on windows (activation-helper.c) add_executable(dbus-daemon-launch-helper ${LAUNCH_HELPER_SOURCES} ${BUS_DIR}/activation-helper-bin.c ) - target_link_libraries(dbus-daemon-launch-helper ${DBUS_LIBRARIES} ${XML_LIBRARY} ) + target_link_libraries(dbus-daemon-launch-helper ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY} ) add_executable(dbus-daemon-launch-helper-test ${LAUNCH_HELPER_SOURCES} ${BUS_DIR}/activation-helper-bin.c) set_target_properties(dbus-daemon-launch-helper-test PROPERTIES COMPILE_FLAGS "-DACTIVATION_LAUNCHER_TEST") - target_link_libraries(dbus-daemon-launch-helper-test ${DBUS_LIBRARIES} ${XML_LIBRARY} ) + target_link_libraries(dbus-daemon-launch-helper-test ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY} ) add_executable(bus-test-launch-helper ${LAUNCH_HELPER_SOURCES} ${BUS_DIR}/test-launch-helper.c) set_target_properties(bus-test-launch-helper PROPERTIES COMPILE_FLAGS "-DACTIVATION_LAUNCHER_TEST -DACTIVATION_LAUNCHER_DO_OOM") - target_link_libraries(bus-test-launch-helper ${DBUS_LIBRARIES} ${XML_LIBRARY} ) + target_link_libraries(bus-test-launch-helper ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY} ) add_test(bus-test-launch-helper ${EXECUTABLE_OUTPUT_PATH}/bus-test-launch-helper ) endif(NOT WIN32) diff --git a/cmake/test/CMakeLists.txt b/cmake/test/CMakeLists.txt index 6a26362..93d677d 100644 --- a/cmake/test/CMakeLists.txt +++ b/cmake/test/CMakeLists.txt @@ -1,7 +1,5 @@ project(test) -set(DBUS_LIBRARIES dbus-1 dbus-internal) - add_subdirectory( name-test ) set (test-service_SOURCES @@ -51,32 +49,32 @@ set (decode_gcov_SOURCES ) add_executable(test-service ${test-service_SOURCES}) -target_link_libraries(test-service ${DBUS_LIBRARIES}) +target_link_libraries(test-service ${DBUS_INTERNAL_LIBRARIES}) add_executable(test-names ${test-names_SOURCES}) -target_link_libraries(test-names ${DBUS_LIBRARIES}) +target_link_libraries(test-names ${DBUS_INTERNAL_LIBRARIES}) add_executable(shell-test ${shell-test_SOURCES}) -target_link_libraries(shell-test ${DBUS_LIBRARIES}) +target_link_libraries(shell-test ${DBUS_INTERNAL_LIBRARIES}) ADD_TEST(shell-test ${EXECUTABLE_OUTPUT_PATH}/shell-test${EXT}) add_executable(test-shell-service ${test-shell-service_SOURCES}) -target_link_libraries(test-shell-service ${DBUS_LIBRARIES}) +target_link_libraries(test-shell-service ${DBUS_INTERNAL_LIBRARIES}) add_executable(spawn-test ${spawn-test_SOURCES}) -target_link_libraries(spawn-test ${DBUS_LIBRARIES}) +target_link_libraries(spawn-test ${DBUS_INTERNAL_LIBRARIES}) add_executable(test-exit ${test-exit_SOURCES}) -target_link_libraries(test-exit ${DBUS_LIBRARIES}) +target_link_libraries(test-exit ${DBUS_INTERNAL_LIBRARIES}) add_executable(test-segfault ${test-segfault_SOURCES}) -target_link_libraries(test-segfault ${DBUS_LIBRARIES}) +target_link_libraries(test-segfault ${DBUS_INTERNAL_LIBRARIES}) add_executable(test-sleep-forever ${test-sleep-forever_SOURCES}) -target_link_libraries(test-sleep-forever ${DBUS_LIBRARIES}) +target_link_libraries(test-sleep-forever ${DBUS_INTERNAL_LIBRARIES}) #add_executable(decode-gcov ${decode_gcov_SOURCES}) -#target_link_libraries(decode-gcov ${DBUS_LIBRARIES}) +#target_link_libraries(decode-gcov ${DBUS_INTERNAL_LIBRARIES}) ### keep these in creation order, i.e. uppermost dirs first set (TESTDIRS diff --git a/cmake/test/name-test/CMakeLists.txt b/cmake/test/name-test/CMakeLists.txt index df6d178..d26e642 100644 --- a/cmake/test/name-test/CMakeLists.txt +++ b/cmake/test/name-test/CMakeLists.txt @@ -6,15 +6,15 @@ add_definitions(-DDBUS_COMPILATION) # there is also a test-names executable, don't know if this is the same add_executable(test-names2 ${NAMEtest-DIR}/test-names.c) -target_link_libraries(test-names2 ${DBUS_LIBRARIES}) +target_link_libraries(test-names2 ${DBUS_INTERNAL_LIBRARIES}) ADD_TEST(test-names2 ${EXECUTABLE_OUTPUT_PATH}/test-names2) add_executable(test-pending-call-dispatch ${NAMEtest-DIR}/test-pending-call-dispatch.c) -target_link_libraries(test-pending-call-dispatch ${DBUS_LIBRARIES}) +target_link_libraries(test-pending-call-dispatch ${DBUS_INTERNAL_LIBRARIES}) ADD_TEST(test-pending-call-dispatch ${EXECUTABLE_OUTPUT_PATH}/test-pending-call-dispatch) add_executable(test-thread-init ${NAMEtest-DIR}/test-threads-init.c) -target_link_libraries(test-thread-init ${DBUS_LIBRARIES}) +target_link_libraries(test-thread-init ${DBUS_INTERNAL_LIBRARIES}) ADD_TEST(test-thread-init ${EXECUTABLE_OUTPUT_PATH}/test-thread-init) endif (DBUS_BUILD_TESTS) diff --git a/cmake/tools/CMakeLists.txt b/cmake/tools/CMakeLists.txt index 1068074..e91a509 100644 --- a/cmake/tools/CMakeLists.txt +++ b/cmake/tools/CMakeLists.txt @@ -1,7 +1,5 @@ project(tools) -set(DBUS_LIBRARIES dbus-1 dbus-internal) - set (dbus_send_SOURCES ../../tools/dbus-print-message.c ../../tools/dbus-print-message.h