diff options
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/CMakeLists.txt | 2 | ||||
-rw-r--r-- | cmake/bus/CMakeLists.txt | 2 | ||||
-rw-r--r-- | cmake/bus/CMakeLists.txt.orig | 203 | ||||
-rw-r--r-- | cmake/config.h.cmake | 1 | ||||
-rw-r--r-- | cmake/doc/CMakeLists.txt | 3 | ||||
-rw-r--r-- | cmake/test/CMakeLists.txt | 7 | ||||
-rw-r--r-- | cmake/tools/CMakeLists.txt | 15 |
7 files changed, 233 insertions, 0 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index b997f8b1..45b7d06d 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -63,6 +63,8 @@ if (NOT DBUS_DATADIR) SET(DBUS_DATADIR ${DATADIR}) endif() +set(DBUS_PREFIX ${DBUS_INSTALL_DIR}) + set(prefix ${DBUS_INSTALL_DIR}) set(exec_prefix ${prefix}) set(EXPANDED_LIBDIR ${DBUS_INSTALL_DIR}/lib) diff --git a/cmake/bus/CMakeLists.txt b/cmake/bus/CMakeLists.txt index a3528c7f..40f66909 100644 --- a/cmake/bus/CMakeLists.txt +++ b/cmake/bus/CMakeLists.txt @@ -37,6 +37,8 @@ endif (DBUS_BUS_ENABLE_INOTIFY) set (BUS_SOURCES ${BUS_DIR}/activation.c ${BUS_DIR}/activation.h + ${BUS_DIR}/apparmor.c + ${BUS_DIR}/apparmor.h ${BUS_DIR}/bus.c ${BUS_DIR}/bus.h ${BUS_DIR}/config-parser.c diff --git a/cmake/bus/CMakeLists.txt.orig b/cmake/bus/CMakeLists.txt.orig new file mode 100644 index 00000000..a3528c7f --- /dev/null +++ b/cmake/bus/CMakeLists.txt.orig @@ -0,0 +1,203 @@ +add_definitions(-DDBUS_COMPILATION) + +SET(EFENCE "") +SET(BUS_DIR ${CMAKE_SOURCE_DIR}/../bus) + +# config files for installation +CONFIGURE_FILE( "${BUS_DIR}/session.conf.in" "${CMAKE_CURRENT_BINARY_DIR}/session.conf" IMMEDIATE @ONLY) +FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/session.d) + +if(NOT WIN32) + CONFIGURE_FILE( "system.conf.cmake" "${CMAKE_CURRENT_BINARY_DIR}/system.conf" IMMEDIATE @ONLY) + FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/system.d) +endif() + +# copy services for local daemon start to local service dir data/dbus-1/services +SET (SERVICE_FILES test/data/valid-service-files) +FILE(GLOB FILES "${CMAKE_SOURCE_DIR}/../${SERVICE_FILES}/*.service.in" ) +FOREACH(FILE ${FILES}) + GET_FILENAME_COMPONENT(FILENAME ${FILE} NAME_WE) + SET (TARGET ${CMAKE_BINARY_DIR}/data/dbus-1/services/${FILENAME}.service) + IF (CONFIG_VERBOSE) + MESSAGE("FROM: ${FILE}\nTO: ${TARGET}\n") + ENDIF (CONFIG_VERBOSE) + configure_file(${FILE} ${TARGET} ) +ENDFOREACH(FILE) + +SET (XML_SOURCES ${BUS_DIR}/config-loader-expat.c) + +if (DBUS_BUS_ENABLE_INOTIFY) + set (DIR_WATCH_SOURCE ${BUS_DIR}/dir-watch-inotify.c) +elseif (DBUS_BUS_ENABLE_KQUEUE) + set (DIR_WATCH_SOURCE ${BUS_DIR}/dir-watch-kqueue.c) +else (DBUS_BUS_ENABLE_INOTIFY) + set (DIR_WATCH_SOURCE ${BUS_DIR}/dir-watch-default.c) +endif (DBUS_BUS_ENABLE_INOTIFY) + +set (BUS_SOURCES + ${BUS_DIR}/activation.c + ${BUS_DIR}/activation.h + ${BUS_DIR}/bus.c + ${BUS_DIR}/bus.h + ${BUS_DIR}/config-parser.c + ${BUS_DIR}/config-parser.h + ${BUS_DIR}/config-parser-common.c + ${BUS_DIR}/config-parser-common.h +# ${BUS_DIR}/config-parser-trivial.c + ${BUS_DIR}/connection.c + ${BUS_DIR}/connection.h + ${BUS_DIR}/desktop-file.c + ${BUS_DIR}/desktop-file.h + ${BUS_DIR}/dir-watch.h + ${BUS_DIR}/dispatch.c + ${BUS_DIR}/dispatch.h + ${BUS_DIR}/driver.c + ${BUS_DIR}/driver.h + ${BUS_DIR}/expirelist.c + ${BUS_DIR}/expirelist.h + ${BUS_DIR}/policy.c + ${BUS_DIR}/policy.h + ${BUS_DIR}/selinux.h + ${BUS_DIR}/selinux.c + ${BUS_DIR}/services.c + ${BUS_DIR}/services.h + ${BUS_DIR}/signals.c + ${BUS_DIR}/signals.h + ${BUS_DIR}/test.c + ${BUS_DIR}/test.h + ${BUS_DIR}/utils.c + ${BUS_DIR}/utils.h + ${XML_SOURCES} + ${DIR_WATCH_SOURCE} +) +if(DBUS_ENABLE_STATS) + list(APPEND BUS_SOURCES + ${BUS_DIR}/stats.c + ${BUS_DIR}/stats.h + ) +endif(DBUS_ENABLE_STATS) + +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/.. + ${XML_INCLUDE_DIR} +) + +add_executable(dbus-daemon ${BUS_SOURCES} ${BUS_DIR}/main.c) +target_link_libraries(dbus-daemon ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY}) +set_target_properties(dbus-daemon PROPERTIES OUTPUT_NAME ${DBUS_DAEMON_NAME}) +set_target_properties(dbus-daemon PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_CLIENT_DEFINITIONS}) + +install_targets(/bin dbus-daemon) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/session.conf DESTINATION etc/dbus-1) +install(DIRECTORY DESTINATION etc/dbus-1/session.d) +install(DIRECTORY DESTINATION share/dbus-1/services) + +if(NOT WIN32) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/system.conf DESTINATION etc/dbus-1) + install(DIRECTORY DESTINATION etc/dbus-1/system.d) + install(DIRECTORY DESTINATION share/dbus-1/system-services) + install(DIRECTORY DESTINATION var/run/dbus) +endif() + +if (DBUS_SERVICE) + set (dbus_service_SOURCES + ${BUS_DIR}/bus-service-win.c + # TODO: add additional files + # ${BUS_DIR}/service-main.c + # ${BUS_SOURCES} + ) + + add_executable(dbus-service ${dbus_service_SOURCES} ) + target_link_libraries(dbus-service ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY}) + set_target_properties(dbus-service PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_CLIENT_DEFINITIONS}) + install_targets(/bin dbus-service ) +endif (DBUS_SERVICE) + +if (DBUS_ENABLE_EMBEDDED_TESTS) + set(SOURCES ${BUS_SOURCES} ${BUS_DIR}/test-main.c) + add_test_executable(test-bus "${SOURCES}" ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY}) + set_target_properties(test-bus PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_CLIENT_DEFINITIONS}) + if (NOT WIN32) + set(test_bus_system_SOURCES + ${XML_SOURCES} + ${BUS_DIR}/config-parser-common.c + ${BUS_DIR}/config-parser-trivial.c + ${BUS_DIR}/utils.c + ${BUS_DIR}/test-system.c + ) + add_test_executable(test-bus-system "${test_bus_system_SOURCES}" ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY} ${DBUS_BUS_LIBS}) + endif() +endif (DBUS_ENABLE_EMBEDDED_TESTS) + +if(MSVC) + project_source_group(${GROUP_CODE} bus_test_SOURCES dummy) +endif(MSVC) + +## mop up the gcov files +#clean-local: +# /bin/rm *.bb *.bbg *.da *.gcov || true + +#install-data-hook: +# $(mkinstalldirs) $(DESTDIR)/$(localstatedir)/run/dbus +# $(mkinstalldirs) $(DESTDIR)/$(configdir)/system.d +# $(mkinstalldirs) $(DESTDIR)/$(datadir)/dbus-1/services + +##install_file(${configdir}/system.d FILE + + +set(LAUNCH_HELPER_SOURCES ${XML_SOURCES} + ${BUS_DIR}/config-parser-common.c + ${BUS_DIR}/config-parser-trivial.c + ${BUS_DIR}/desktop-file.c + ${BUS_DIR}/utils.c + ${BUS_DIR}/activation-helper.c + +) + +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_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_INTERNAL_LIBRARIES} ${XML_LIBRARY} ) + + set (SOURCES ${LAUNCH_HELPER_SOURCES} ${BUS_DIR}/test-launch-helper.c) + add_test_executable(test-bus-launch-helper "${SOURCES}" ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY}) + set_target_properties(test-bus-launch-helper PROPERTIES COMPILE_FLAGS "-DACTIVATION_LAUNCHER_TEST -DACTIVATION_LAUNCHER_DO_OOM") +endif(NOT WIN32) + +#### Init scripts fun +#SCRIPT_IN_FILES=messagebus.in +# rc.messagebus.in + +## Red Hat start +#if DBUS_INIT_SCRIPTS_RED_HAT + +#initddir=$(sysconfdir)/rc.d/init.d + +#initd_SCRIPTS= +# messagebus + +#endif +# ## Red Hat end + +## Slackware start +#if DBUS_INIT_SCRIPTS_SLACKWARE + +#initddir=$(sysconfdir)/rc.d/ + +#initd_SCRIPTS= +# rc.messagebus + +#endif +## Slackware end + +#MAN_IN_FILES=dbus-daemon.1.in +#man_MANS = dbus-daemon.1 + +#### Extra dist + +#EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES) $(man_MANS) $(MAN_IN_FILES) diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake index f7180528..cd4720c9 100644 --- a/cmake/config.h.cmake +++ b/cmake/config.h.cmake @@ -17,6 +17,7 @@ #cmakedefine DBUS_CONSOLE_AUTH_DIR "@DBUS_CONSOLE_AUTH_DIR@" #cmakedefine DBUS_DATADIR "@DBUS_DATADIR@" #cmakedefine DBUS_BINDIR "@DBUS_BINDIR@" +#cmakedefine DBUS_PREFIX "@DBUS_PREFIX@" #cmakedefine DBUS_SYSTEM_CONFIG_FILE "@DBUS_SYSTEM_CONFIG_FILE@" #cmakedefine DBUS_SESSION_CONFIG_FILE "@DBUS_SESSION_CONFIG_FILE@" #cmakedefine DBUS_DAEMON_NAME "@DBUS_DAEMON_NAME@" diff --git a/cmake/doc/CMakeLists.txt b/cmake/doc/CMakeLists.txt index 807af60c..2bb720bd 100644 --- a/cmake/doc/CMakeLists.txt +++ b/cmake/doc/CMakeLists.txt @@ -137,17 +137,20 @@ configure_file(${CMAKE_SOURCE_DIR}/../doc/dbus-daemon.1.xml.in ${CMAKE_BINARY_DI configure_file(${CMAKE_SOURCE_DIR}/../doc/dbus-launch.1.xml.in ${CMAKE_BINARY_DIR}/doc/dbus-launch.1.xml) configure_file(${CMAKE_SOURCE_DIR}/../doc/dbus-monitor.1.xml.in ${CMAKE_BINARY_DIR}/doc/dbus-monitor.1.xml) configure_file(${CMAKE_SOURCE_DIR}/../doc/dbus-send.1.xml.in ${CMAKE_BINARY_DIR}/doc/dbus-send.1.xml) +configure_file(${CMAKE_SOURCE_DIR}/../doc/dbus-test-tool.1.xml.in ${CMAKE_BINARY_DIR}/doc/dbus-test-tool.1.xml) configure_file(${CMAKE_SOURCE_DIR}/../doc/dbus-uuidgen.1.xml.in ${CMAKE_BINARY_DIR}/doc/dbus-uuidgen.1.xml) DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-cleanup-sockets.1.xml html-nochunks) DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-daemon.1.xml html-nochunks) DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-launch.1.xml html-nochunks) DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-monitor.1.xml html-nochunks) DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-send.1.xml html-nochunks) +DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-test-tool.1.xml html-nochunks) DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-uuidgen.1.xml html-nochunks) if (UNIX) DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-daemon.1.xml man) DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-monitor.1.xml man) DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-send.1.xml man) + DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-test-tool.1.xml man) DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-launch.1.xml man) DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-uuidgen.1.xml man) DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-cleanup-sockets.1.xml man) diff --git a/cmake/test/CMakeLists.txt b/cmake/test/CMakeLists.txt index 477beb40..c5e73bca 100644 --- a/cmake/test/CMakeLists.txt +++ b/cmake/test/CMakeLists.txt @@ -58,6 +58,10 @@ set (manual-tcp_SOURCES ${CMAKE_SOURCE_DIR}/../test/manual-tcp.c ) +set (manual-paths_SOURCES + ${CMAKE_SOURCE_DIR}/../test/manual-paths.c +) + add_helper_executable(manual-dir-iter ${manual-dir-iter_SOURCES} ${DBUS_INTERNAL_LIBRARIES}) add_helper_executable(test-service ${test-service_SOURCES} dbus-testutils) add_helper_executable(test-names ${test-names_SOURCES} dbus-testutils) @@ -69,6 +73,9 @@ add_helper_executable(test-exit ${test-exit_SOURCES} ${DBUS_INTERNAL_LIBRARIES}) add_helper_executable(test-segfault ${test-segfault_SOURCES} ${DBUS_INTERNAL_LIBRARIES}) add_helper_executable(test-sleep-forever ${test-sleep-forever_SOURCES} ${DBUS_INTERNAL_LIBRARIES}) add_test_executable(manual-tcp ${manual-tcp_SOURCES} ${DBUS_INTERNAL_LIBRARIES}) +if(WIN32) + add_helper_executable(manual-paths ${manual-paths_SOURCES} ${DBUS_INTERNAL_LIBRARIES}) +endif() if(DBUS_WITH_GLIB) message(STATUS "with glib test apps") diff --git a/cmake/tools/CMakeLists.txt b/cmake/tools/CMakeLists.txt index d4eeb708..525dc057 100644 --- a/cmake/tools/CMakeLists.txt +++ b/cmake/tools/CMakeLists.txt @@ -4,6 +4,8 @@ set (dbus_send_SOURCES ../../tools/dbus-print-message.c ../../tools/dbus-print-message.h ../../tools/dbus-send.c + ../../tools/tool-common.c + ../../tools/tool-common.h ) set (dbus_monitor_SOURCES @@ -14,6 +16,15 @@ set (dbus_monitor_SOURCES ../../tools/tool-common.h ) +set (dbus_test_tool_SOURCES + ../../tools/dbus-echo.c + ../../tools/dbus-spam.c + ../../tools/tool-common.c + ../../tools/tool-common.h + ../../tools/test-tool.c + ../../tools/test-tool.h +) + if (WIN32) set (dbus_launch_SOURCES ../../tools/dbus-launch-win.c @@ -39,6 +50,10 @@ add_executable(dbus-send ${dbus_send_SOURCES}) target_link_libraries(dbus-send ${DBUS_LIBRARIES}) install_targets(/bin dbus-send ) +add_executable(dbus-test-tool ${dbus_test_tool_SOURCES}) +target_link_libraries(dbus-test-tool ${DBUS_LIBRARIES}) +install_targets(/bin dbus-test-tool ) + add_executable(dbus-launch ${dbus_launch_SOURCES}) target_link_libraries(dbus-launch ) if (DBUS_BUILD_X11) |