~thomas-voss/location-service/less-conservative-about-connection-characteristics

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
if (NET_CPP_FOUND)
  add_definitions(-DCOM_UBUNTU_LOCATION_SERVICE_HAVE_NET_CPP=1)

  set(ICHNAEA_REPORTER_SRCS service/ichnaea_reporter.cpp)
endif()

add_subdirectory(providers)

configure_file(
  service/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/service/config.h @ONLY
)

add_library(
  ubuntu-location-service SHARED

  ${UBUNTU_LOCATION_SERVICE_PUBLIC_HEADERS}

  default_provider_selection_policy.cpp
  non_selecting_provider_selection_policy.cpp

  criteria.cpp
  engine.cpp
  init_and_shutdown.cpp
  position.cpp
  provider.cpp
  provider_factory.cpp
  proxy_provider.cpp
  satellite_based_positioning_state.cpp
  settings.cpp
  time_based_update_policy.cpp
  set_name_for_thread.cpp
  wifi_and_cell_reporting_state.cpp

  boost_ptree_settings.cpp

  service/default_configuration.cpp
  service/default_permission_manager.cpp
  service/harvester.cpp
  service/demultiplexing_reporter.h
  service/demultiplexing_reporter.cpp
  service/runtime.cpp
  service/runtime_tests.h
  service/runtime_tests.cpp
  service/trust_store_permission_manager.cpp

  service/implementation.cpp
  service/skeleton.cpp
  service/stub.cpp

  service/session/implementation.cpp
  service/session/interface.cpp
  service/session/skeleton.cpp
  service/session/stub.cpp

  providers/config.cpp

  providers/remote/provider.cpp
  providers/remote/skeleton.cpp
  providers/remote/stub.cpp

  ${ICHNAEA_REPORTER_SRCS}
)

add_library(
  ubuntu-location-service-connectivity SHARED

  set_name_for_thread.cpp

  connectivity/cached_radio_cell.cpp
  connectivity/cached_wireless_network.cpp
  connectivity/manager.cpp
  connectivity/radio_cell.cpp
  connectivity/wireless_network.cpp

  connectivity/ofono_nm_connectivity_manager.cpp
)

set(symbol_map "${CMAKE_SOURCE_DIR}/symbols.map")

set_target_properties(
  ubuntu-location-service

  PROPERTIES
  LINK_FLAGS "${ldflags} -Wl,--version-script,${symbol_map}"
  LINK_DEPENDS ${symbol_map}
  VERSION ${UBUNTU_LOCATION_SERVICE_VERSION_MAJOR}.${UBUNTU_LOCATION_SERVICE_VERSION_MINOR}.${UBUNTU_LOCATION_SERVICE_VERSION_PATCH}
  SOVERSION ${UBUNTU_LOCATION_SERVICE_VERSION_MAJOR}
)

set_target_properties(
  ubuntu-location-service-connectivity

  PROPERTIES
  LINK_FLAGS "${ldflags} -Wl,--version-script,${symbol_map}"
  LINK_DEPENDS ${symbol_map}
  VERSION ${UBUNTU_LOCATION_SERVICE_VERSION_MAJOR}.${UBUNTU_LOCATION_SERVICE_VERSION_MINOR}.${UBUNTU_LOCATION_SERVICE_VERSION_PATCH}
  SOVERSION ${UBUNTU_LOCATION_SERVICE_VERSION_MAJOR}
)

add_definitions(${ENABLED_PROVIDER_TARGETS_DEFINITIONS})

target_link_libraries(
  ubuntu-location-service-connectivity

  ${CMAKE_THREAD_LIBS_INIT}
  ${Boost_LIBRARIES}
  ${DBUS_LIBRARIES}
  ${DBUS_CPP_LDFLAGS}
  ${PROCESS_CPP_LDFLAGS}
  ${GLog_LIBRARY}
  ${GFlags_LIBRARY}
)

target_link_libraries(
  ubuntu-location-service

  ubuntu-location-service-connectivity

  ${ENABLED_PROVIDER_TARGETS}

  ${CMAKE_THREAD_LIBS_INIT}
  ${Boost_LIBRARIES}
  ${DBUS_LIBRARIES}
  ${DBUS_CPP_LDFLAGS}
  ${JSON_C_LDFLAGS}
  ${LIBAPPARMOR_LDFLAGS}
  ${NET_CPP_LDFLAGS}
  ${TRUST_STORE_LDFLAGS}
  ${GLog_LIBRARY}
  ${GFlags_LIBRARY}
)

install(
  TARGETS ubuntu-location-service
  DESTINATION ${CMAKE_INSTALL_LIBDIR}
)

install(
  TARGETS ubuntu-location-service-connectivity
  DESTINATION ${CMAKE_INSTALL_LIBDIR}
)

add_library(
  ubuntu-location-service-provider-daemon

  service/provider_daemon.cpp
)

add_library(
  ubuntu-location-service-daemon

  service/daemon.cpp
)

add_executable(
  ubuntu-location-service-providerd

  service/provider_daemon_main.cpp
)

add_executable(
  ubuntu-location-serviced

  service/daemon_main.cpp
)

add_executable(
  ubuntu-location-serviced-cli

  service/daemon_cli_main.cpp
)

target_link_libraries(
  ubuntu-location-service-provider-daemon

  ubuntu-location-service
)

target_link_libraries(
  ubuntu-location-service-daemon

  ubuntu-location-service
)

target_link_libraries(
  ubuntu-location-service-providerd

  ubuntu-location-service-provider-daemon

  ${ENABLED_PROVIDER_TARGETS}

  ${Boost_LIBRARIES}
  ${DBUS_LIBRARIES}
  ${DBUS_CPP_LIBRARIES}
  ${GLog_LIBRARY}
  ${GFlags_LIBRARY}
)

target_link_libraries(
  ubuntu-location-serviced

  ubuntu-location-service-daemon

  ${ENABLED_PROVIDER_TARGETS}

  ${Boost_LIBRARIES}
  ${DBUS_LIBRARIES}
  ${DBUS_CPP_LIBRARIES}
  ${GLog_LIBRARY}
  ${GFlags_LIBRARY}
)

target_link_libraries(
  ubuntu-location-serviced-cli

  ubuntu-location-service-daemon

  ${ENABLED_PROVIDER_TARGETS}

  ${Boost_LIBRARIES}
  ${DBUS_LIBRARIES}
  ${DBUS_CPP_LIBRARIES}
  ${GLog_LIBRARY}
  ${GFlags_LIBRARY}
)

install(
  TARGETS ubuntu-location-service-providerd
  DESTINATION ${CMAKE_INSTALL_BINDIR}
)

install(
  TARGETS ubuntu-location-serviced
  DESTINATION ${CMAKE_INSTALL_BINDIR}
)

install(
  TARGETS ubuntu-location-serviced-cli
  DESTINATION ${CMAKE_INSTALL_BINDIR}
)