1 add_definitions("-DDBUS_COMPILATION")
4 ../../tools/dbus-print-message.c
5 ../../tools/dbus-print-message.h
6 ../../tools/dbus-send.c
7 ../../tools/tool-common.c
8 ../../tools/tool-common.h
11 set (dbus_monitor_SOURCES
12 ../../tools/dbus-monitor.c
13 ../../tools/dbus-print-message.c
14 ../../tools/dbus-print-message.h
15 ../../tools/tool-common.c
16 ../../tools/tool-common.h
19 set (dbus_test_tool_SOURCES
20 ../../tools/dbus-echo.c
21 ../../tools/dbus-spam.c
22 ../../tools/tool-common.c
23 ../../tools/tool-common.h
24 ../../tools/test-tool.c
25 ../../tools/test-tool.h
28 set (dbus_update_activation_environment_SOURCES
29 ../../tools/dbus-update-activation-environment.c
30 ../../tools/tool-common.c
31 ../../tools/tool-common.h
35 set (dbus_launch_SOURCES
36 ../../tools/dbus-launch-win.c
39 set (dbus_launch_SOURCES
40 ../../tools/dbus-launch.c
41 ../../tools/tool-common.c
42 ../../tools/tool-common.h
47 set (dbus_launch_SOURCES
48 ${dbus_launch_SOURCES}
49 ../../tools/dbus-launch-x11.c
51 include_directories(${X11_INCLUDE_DIR})
54 set (dbus_cleanup_sockets_SOURCES
55 ../../tools/dbus-cleanup-sockets.c
58 add_executable(dbus-send ${dbus_send_SOURCES})
59 target_link_libraries(dbus-send ${DBUS_LIBRARIES})
60 install(TARGETS dbus-send ${INSTALL_TARGETS_DEFAULT_ARGS})
62 add_executable(dbus-test-tool ${dbus_test_tool_SOURCES})
63 target_link_libraries(dbus-test-tool ${DBUS_LIBRARIES})
64 install(TARGETS dbus-test-tool ${INSTALL_TARGETS_DEFAULT_ARGS})
66 if(WIN32 AND NOT MSVC)
67 # avoid dbus-update-activation-environment triggering UAC
68 # 1 is the resource ID, ID_MANIFEST
69 # 24 is the resource type, RT_MANIFEST
70 # constants are used because of a bug in windres
71 # see https://stackoverflow.com/questions/33000158/embed-manifest-file-to-require-administrator-execution-level-with-mingw32
72 file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/disable-uac.rc "1 24 \"${CMAKE_SOURCE_DIR}/../tools/Win32.Manifest\"\n")
73 list(APPEND dbus_update_activation_environment_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/disable-uac.rc)
75 add_executable(dbus-update-activation-environment ${dbus_update_activation_environment_SOURCES})
76 target_link_libraries(dbus-update-activation-environment ${DBUS_LIBRARIES})
77 install(TARGETS dbus-update-activation-environment ${INSTALL_TARGETS_DEFAULT_ARGS})
79 add_executable(dbus-launch ${dbus_launch_SOURCES})
80 target_link_libraries(dbus-launch ${DBUS_LIBRARIES})
82 target_link_libraries(dbus-launch ${X11_LIBRARIES} )
83 endif (DBUS_BUILD_X11)
84 install(TARGETS dbus-launch ${INSTALL_TARGETS_DEFAULT_ARGS})
86 add_executable(dbus-monitor ${dbus_monitor_SOURCES})
87 target_link_libraries(dbus-monitor ${DBUS_LIBRARIES})
88 install(TARGETS dbus-monitor ${INSTALL_TARGETS_DEFAULT_ARGS})
90 # create the /var/lib/dbus directory for dbus-uuidgen
91 install(DIRECTORY DESTINATION var/lib/dbus)