Commit d999abda authored by Ralf Habacker's avatar Ralf Habacker

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.
parent 235e8dfe
......@@ -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 )
......
......@@ -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)
......
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
......
......@@ -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)
project(tools)
set(DBUS_LIBRARIES dbus-1 dbus-internal)
set (dbus_send_SOURCES
../../tools/dbus-print-message.c
../../tools/dbus-print-message.h
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment