CMakeLists.txt 3.52 KB
Newer Older
1
2
add_definitions("-DDBUS_COMPILATION")

3
set(dbus_send_SOURCES
4
5
6
7
8
    dbus-print-message.c
    dbus-print-message.h
    dbus-send.c
    tool-common.c
    tool-common.h
9
10
)

11
set(dbus_monitor_SOURCES
12
13
14
15
16
    dbus-monitor.c
    dbus-print-message.c
    dbus-print-message.h
    tool-common.c
    tool-common.h
17
18
)

19
set(dbus_test_tool_SOURCES
20
21
22
23
24
25
    dbus-echo.c
    dbus-spam.c
    tool-common.c
    tool-common.h
    test-tool.c
    test-tool.h
26
27
)

28
set(dbus_update_activation_environment_SOURCES
29
30
31
    dbus-update-activation-environment.c
    tool-common.c
    tool-common.h
32
33
)

34
35
if(WIN32)
set(dbus_launch_SOURCES
36
    dbus-launch-win.c
37
)
38
39
else(WIN32)
set(dbus_launch_SOURCES
40
41
42
    dbus-launch.c
    tool-common.c
    tool-common.h
43
)
44
endif()
45

46
47
if(DBUS_BUILD_X11)
set(dbus_launch_SOURCES
48
     ${dbus_launch_SOURCES}
49
     dbus-launch-x11.c
50
)
51
include_directories(${X11_INCLUDE_DIR})
52
endif()
53

54
set(dbus_cleanup_sockets_SOURCES
55
    dbus-cleanup-sockets.c
56
57
)

58
set(dbus_run_session_SOURCES
59
    dbus-run-session.c
60
61
)

62
63
64
65
set(dbus_uuidgen_SOURCES
    dbus-uuidgen.c
)

66
67
68
69
70
71
if(NOT WIN32)
    add_executable(dbus-cleanup-sockets ${dbus_cleanup_sockets_SOURCES})
    target_link_libraries(dbus-cleanup-sockets ${DBUS_LIBRARIES})
    install(TARGETS dbus-cleanup-sockets ${INSTALL_TARGETS_DEFAULT_ARGS})
endif()

72
if(WIN32)
73
    add_executable_version_info(dbus_send_SOURCES "dbus-send")
74
75
endif()

76
add_executable(dbus-send ${dbus_send_SOURCES})
77
target_link_libraries(dbus-send ${DBUS_LIBRARIES})
78
install(TARGETS dbus-send ${INSTALL_TARGETS_DEFAULT_ARGS})
79

80
if(WIN32)
81
    add_executable_version_info(dbus_test_tool_SOURCES "dbus-test-tool")
82
83
endif()

84
85
add_executable(dbus-test-tool ${dbus_test_tool_SOURCES})
target_link_libraries(dbus-test-tool ${DBUS_LIBRARIES})
86
install(TARGETS dbus-test-tool ${INSTALL_TARGETS_DEFAULT_ARGS})
87

88
if(WIN32)
89
    add_executable_version_info(dbus_update_activation_environment_SOURCES "dbus-update-activation-environment")
90
endif()
91
if(WIN32 AND NOT MSVC)
92
    add_uac_manifest(dbus_update_activation_environment_SOURCES)
93
endif()
94
95
add_executable(dbus-update-activation-environment ${dbus_update_activation_environment_SOURCES})
target_link_libraries(dbus-update-activation-environment ${DBUS_LIBRARIES})
96
install(TARGETS dbus-update-activation-environment ${INSTALL_TARGETS_DEFAULT_ARGS})
97

98
if(WIN32)
99
    add_executable_version_info(dbus_launch_SOURCES "dbus-launch")
100
101
endif()

102
add_executable(dbus-launch ${dbus_launch_SOURCES})
103
target_link_libraries(dbus-launch ${DBUS_LIBRARIES})
104
if(DBUS_BUILD_X11)
105
    target_link_libraries(dbus-launch ${X11_LIBRARIES} )
106
endif()
107
install(TARGETS dbus-launch ${INSTALL_TARGETS_DEFAULT_ARGS})
108

109
if(WIN32)
110
    add_executable_version_info(dbus_monitor_SOURCES "dbus-monitor")
111
112
endif()

113
add_executable(dbus-monitor ${dbus_monitor_SOURCES})
114
target_link_libraries(dbus-monitor ${DBUS_LIBRARIES})
115
install(TARGETS dbus-monitor ${INSTALL_TARGETS_DEFAULT_ARGS})
116

117
118
119
120
if(WIN32)
    add_executable_version_info(dbus_run_session_SOURCES "dbus-run-session")
endif()

121
122
123
add_executable(dbus-run-session ${dbus_run_session_SOURCES})
target_link_libraries(dbus-run-session ${DBUS_INTERNAL_LIBRARIES})
install(TARGETS dbus-run-session ${INSTALL_TARGETS_DEFAULT_ARGS})
124

125
126
127
128
129
130
if(NOT WIN32)
    add_executable(dbus-uuidgen ${dbus_uuidgen_SOURCES})
    target_link_libraries(dbus-uuidgen ${DBUS_LIBRARIES})
    install(TARGETS dbus-uuidgen ${INSTALL_TARGETS_DEFAULT_ARGS})
endif()

131
# create the /var/lib/dbus directory for dbus-uuidgen
132
install(DIRECTORY DESTINATION ${CMAKE_INSTALL_LOCALSTATEDIR}/lib/dbus)
133
134
135
136
137
138

set(EXAMPLES_SCRIPTS
    GetAllMatchRules.py
)

install(FILES ${EXAMPLES_SCRIPTS} DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/dbus/examples)