TYPE3
[iec.git] / src / type3_AndroidCloud / anbox-master / src / CMakeLists.txt
1 include_directories(
2   ${Boost_INCLUDE_DIRS}
3   ${MIRCLIENT_INCLUDE_DIRS}
4   ${DBUS_INCLUDE_DIRS}
5   ${SDL2_INCLUDE_DIRS}
6   ${SDL2_IMAGE_INCLUDE_DIRS}
7   ${PROPERTIES_CPP_INCLUDE_DIRS}
8   ${LXC_INCLUDE_DIRS}
9   ${MIRCLIENT_INCLUDE_DIRS}
10   ${LIBSYSTEMD_INCLUDE_DIRS}
11   ${CMAKE_CURRENT_BINARY_DIR}
12   ${CMAKE_SOURCE_DIR}
13   ${CMAKE_SOURCE_DIR}/src
14   ${CMAKE_SOURCE_DIR}/external
15   ${CMAKE_SOURCE_DIR}/external/process-cpp-minimal/include
16   ${CMAKE_SOURCE_DIR}/external/android-emugl/shared
17   ${CMAKE_SOURCE_DIR}/external/android-emugl/host/include
18   ${CMAKE_BINARY_DIR}/external/android-emugl/host/include
19   ${CMAKE_SOURCE_DIR}/external/android-emugl/shared/OpenglCodecCommon
20   ${CMAKE_SOURCE_DIR}/external/android-emugl/host/libs
21   ${CMAKE_SOURCE_DIR}/external/android-emugl/host/include/libOpenglRender
22   ${CMAKE_SOURCE_DIR}/external/android-emugl/host/libs/GLESv1_dec
23   ${CMAKE_BINARY_DIR}/external/android-emugl/host/libs/GLESv1_dec
24   ${CMAKE_SOURCE_DIR}/external/android-emugl/host/libs/GLESv2_dec
25   ${CMAKE_BINARY_DIR}/external/android-emugl/host/libs/GLESv2_dec
26   ${CMAKE_SOURCE_DIR}/external/android-emugl/host/libs/renderControl_dec
27   ${CMAKE_BINARY_DIR}/external/android-emugl/host/libs/renderControl_dec
28   ${CMAKE_SOURCE_DIR}/external/cpu_features/include
29 )
30
31 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBINDERFS_PATH=\"\\\"${BINDERFS_PATH}\\\"\"")
32
33 protobuf_generate_cpp(
34     GENERATED_PROTOBUF_RPC_SRCS GENERATED_PROTOBUF_RPC_HDRS
35     anbox/protobuf/anbox_rpc.proto)
36
37 protobuf_generate_cpp(
38     GENERATED_PROTOBUF_BRIDGE_SRCS GENERATED_PROTOBUF_BRIDGE_HDRS
39     anbox/protobuf/anbox_bridge.proto)
40
41 protobuf_generate_cpp(
42     GENERATED_PROTOBUF_CONTAINER_SRCS GENERATED_PROTOBUF_CONTAINER_HDRS
43     anbox/protobuf/anbox_container.proto)
44
45
46 add_library(anbox-protobuf
47     STATIC
48     ${GENERATED_PROTOBUF_BRIDGE_SRCS}
49     ${GENERATED_PROTOBUF_BRIDGE_HDRS}
50     ${GENERATED_PROTOBUF_RPC_SRCS}
51     ${GENERATED_PROTOBUF_RPC_HDRS}
52     ${GENERATED_PROTOBUF_CONTAINER_SRCS}
53     ${GENERATED_PROTOBUF_CONTAINER_HDRS}
54     anbox/protobuf/anbox_rpc.proto
55     anbox/protobuf/anbox_bridge.proto
56     anbox/protobuf/anbox_container.proto
57     anbox/protobuf/google_protobuf_guard.cpp)
58 target_link_libraries(anbox-protobuf
59     ${PROTOBUF_LITE_LIBRARIES})
60
61 set(SOURCES
62     anbox/android/intent.cpp
63     anbox/android/intent.h
64     anbox/android/ip_config_builder.cpp
65     anbox/android/ip_config_builder.h
66
67     anbox/application/database.cpp
68     anbox/application/database.h
69     anbox/application/launcher_storage.cpp
70     anbox/application/launcher_storage.h
71     anbox/application/manager.h
72
73     anbox/audio/client_info.h
74     anbox/audio/server.cpp
75     anbox/audio/server.h
76     anbox/audio/sink.h
77     anbox/audio/source.h
78
79     anbox/bridge/android_api_stub.cpp
80     anbox/bridge/android_api_stub.h
81     anbox/bridge/platform_api_skeleton.cpp
82     anbox/bridge/platform_api_skeleton.h
83     anbox/bridge/platform_message_processor.cpp
84     anbox/bridge/platform_message_processor.h
85
86     anbox/build/config.h
87     anbox/build/config.h.in
88
89     anbox/cmds/container_manager.cpp
90     anbox/cmds/container_manager.h
91     anbox/cmds/launch.cpp
92     anbox/cmds/launch.h
93     anbox/cmds/session_manager.cpp
94     anbox/cmds/session_manager.h
95     anbox/cmds/system_info.cpp
96     anbox/cmds/system_info.h
97     anbox/cmds/version.cpp
98     anbox/cmds/version.h
99     anbox/cmds/wait_ready.cpp
100     anbox/cmds/wait_ready.h
101     anbox/cmds/check_features.cpp
102     anbox/cmds/check_features.h
103
104     anbox/common/binary_writer.cpp
105     anbox/common/binary_writer.h
106     anbox/common/dispatcher.cpp
107     anbox/common/dispatcher.h
108     anbox/common/fd.cpp
109     anbox/common/fd.h
110     anbox/common/fd_sets.h
111     anbox/common/loop_device_allocator.cpp
112     anbox/common/loop_device_allocator.h
113     anbox/common/loop_device.cpp
114     anbox/common/loop_device.h
115     anbox/common/message_channel.cpp
116     anbox/common/message_channel.h
117     anbox/common/mount_entry.cpp
118     anbox/common/mount_entry.h
119     anbox/common/scope_ptr.h
120     anbox/common/small_vector.h
121     anbox/common/type_traits.h
122     anbox/common/variable_length_array.h
123     anbox/common/wait_handle.cpp
124     anbox/common/wait_handle.h
125     anbox/common/binderfs.h
126     anbox/common/binder_device.cpp
127     anbox/common/binder_device.h
128     anbox/common/binder_device_allocator.cpp
129     anbox/common/binder_device_allocator.h
130
131     anbox/container/client.cpp
132     anbox/container/client.h
133     anbox/container/configuration.h
134     anbox/container/container.cpp
135     anbox/container/container.h
136     anbox/container/lxc_container.cpp
137     anbox/container/lxc_container.h
138     anbox/container/management_api_message_processor.cpp
139     anbox/container/management_api_message_processor.h
140     anbox/container/management_api_skeleton.cpp
141     anbox/container/management_api_skeleton.h
142     anbox/container/management_api_stub.cpp
143     anbox/container/management_api_stub.h
144     anbox/container/service.cpp
145     anbox/container/service.h
146
147     anbox/dbus/bus.cpp
148     anbox/dbus/bus.h
149     anbox/dbus/codecs.h
150     anbox/dbus/interface.h
151     anbox/dbus/sd_bus_helpers.c
152     anbox/dbus/sd_bus_helpers.h
153     anbox/dbus/sd_bus_helpers.hpp
154     anbox/dbus/skeleton/application_manager.cpp
155     anbox/dbus/skeleton/application_manager.h
156     anbox/dbus/skeleton/service.cpp
157     anbox/dbus/skeleton/service.h
158     anbox/dbus/stub/application_manager.cpp
159     anbox/dbus/stub/application_manager.h
160
161     anbox/graphics/buffered_io_stream.cpp
162     anbox/graphics/buffered_io_stream.h
163     anbox/graphics/buffer_queue.cpp
164     anbox/graphics/buffer_queue.h
165     anbox/graphics/density.cpp
166     anbox/graphics/density.h
167     anbox/graphics/gl_extensions.h
168     anbox/graphics/gl_renderer_server.cpp
169     anbox/graphics/gl_renderer_server.h
170     anbox/graphics/layer_composer.cpp
171     anbox/graphics/layer_composer.h
172     anbox/graphics/multi_window_composer_strategy.cpp
173     anbox/graphics/multi_window_composer_strategy.h
174     anbox/graphics/opengles_message_processor.cpp
175     anbox/graphics/opengles_message_processor.h
176     anbox/graphics/primitives.h
177     anbox/graphics/program_family.cpp
178     anbox/graphics/program_family.h
179     anbox/graphics/rect.cpp
180     anbox/graphics/rect.h
181     anbox/graphics/renderer.h
182     anbox/graphics/single_window_composer_strategy.cpp
183     anbox/graphics/single_window_composer_strategy.h
184
185     anbox/graphics/emugl/ColorBuffer.cpp
186     anbox/graphics/emugl/ColorBuffer.h
187     anbox/graphics/emugl/DispatchTables.h
188     anbox/graphics/emugl/DisplayManager.cpp
189     anbox/graphics/emugl/DisplayManager.h
190     anbox/graphics/emugl/ReadBuffer.cpp
191     anbox/graphics/emugl/ReadBuffer.h
192     anbox/graphics/emugl/Renderable.cpp
193     anbox/graphics/emugl/Renderable.h
194     anbox/graphics/emugl/RenderApi.cpp
195     anbox/graphics/emugl/RenderApi.h
196     anbox/graphics/emugl/RenderContext.cpp
197     anbox/graphics/emugl/RenderContext.h
198     anbox/graphics/emugl/RenderControl.cpp
199     anbox/graphics/emugl/RenderControl.h
200     anbox/graphics/emugl/RendererConfig.cpp
201     anbox/graphics/emugl/RendererConfig.h
202     anbox/graphics/emugl/Renderer.cpp
203     anbox/graphics/emugl/Renderer.h
204     anbox/graphics/emugl/RenderThread.cpp
205     anbox/graphics/emugl/RenderThread.h
206     anbox/graphics/emugl/RenderThreadInfo.cpp
207     anbox/graphics/emugl/RenderThreadInfo.h
208     anbox/graphics/emugl/TextureDraw.cpp
209     anbox/graphics/emugl/TextureDraw.h
210     anbox/graphics/emugl/TextureResize.cpp
211     anbox/graphics/emugl/TextureResize.h
212     anbox/graphics/emugl/TimeUtils.cpp
213     anbox/graphics/emugl/TimeUtils.h
214     anbox/graphics/emugl/WindowSurface.cpp
215     anbox/graphics/emugl/WindowSurface.h
216
217     anbox/input/device.cpp
218     anbox/input/device.h
219     anbox/input/manager.cpp
220     anbox/input/manager.h
221
222     anbox/network/base_socket_messenger.cpp
223     anbox/network/base_socket_messenger.h
224     anbox/network/connection_context.cpp
225     anbox/network/connection_context.h
226     anbox/network/connection_creator.cpp
227     anbox/network/connection_creator.h
228     anbox/network/connections.h
229     anbox/network/connector.h
230     anbox/network/credentials.cpp
231     anbox/network/credentials.h
232     anbox/network/delegate_connection_creator.h
233     anbox/network/delegate_message_processor.cpp
234     anbox/network/delegate_message_processor.h
235     anbox/network/fd_socket_transmission.cpp
236     anbox/network/fd_socket_transmission.h
237     anbox/network/local_socket_messenger.cpp
238     anbox/network/local_socket_messenger.h
239     anbox/network/message_processor.h
240     anbox/network/message_receiver.h
241     anbox/network/message_sender.h
242     anbox/network/published_socket_connector.cpp
243     anbox/network/published_socket_connector.h
244     anbox/network/socket_connection.cpp
245     anbox/network/socket_connection.h
246     anbox/network/socket_helper.cpp
247     anbox/network/socket_helper.h
248     anbox/network/socket_messenger.cpp
249     anbox/network/socket_messenger.h
250     anbox/network/tcp_socket_connector.cpp
251     anbox/network/tcp_socket_connector.h
252     anbox/network/tcp_socket_messenger.cpp
253     anbox/network/tcp_socket_messenger.h
254
255     anbox/platform/base_platform.cpp
256     anbox/platform/base_platform.h
257     anbox/platform/null/platform.cpp
258     anbox/platform/null/platform.h
259     anbox/platform/sdl/audio_sink.cpp
260     anbox/platform/sdl/audio_sink.h
261     anbox/platform/sdl/keycode_converter.cpp
262     anbox/platform/sdl/keycode_converter.h
263     anbox/platform/sdl/platform.cpp
264     anbox/platform/sdl/platform.h
265     anbox/platform/sdl/sdl_wrapper.h
266     anbox/platform/sdl/window.cpp
267     anbox/platform/sdl/window.h
268
269     anbox/protobuf/anbox_bridge.proto
270     anbox/protobuf/anbox_container.proto
271     anbox/protobuf/anbox_rpc.proto
272     anbox/protobuf/google_protobuf_guard.cpp
273
274     anbox/qemu/adb_message_processor.cpp
275     anbox/qemu/adb_message_processor.h
276     anbox/qemu/at_parser.cpp
277     anbox/qemu/at_parser.h
278     anbox/qemu/bootanimation_message_processor.cpp
279     anbox/qemu/bootanimation_message_processor.h
280     anbox/qemu/boot_properties_message_processor.cpp
281     anbox/qemu/boot_properties_message_processor.h
282     anbox/qemu/camera_message_processor.cpp
283     anbox/qemu/camera_message_processor.h
284     anbox/qemu/fingerprint_message_processor.cpp
285     anbox/qemu/fingerprint_message_processor.h
286     anbox/qemu/gsm_message_processor.cpp
287     anbox/qemu/gsm_message_processor.h
288     anbox/qemu/hwcontrol_message_processor.cpp
289     anbox/qemu/hwcontrol_message_processor.h
290     anbox/qemu/null_message_processor.cpp
291     anbox/qemu/null_message_processor.h
292     anbox/qemu/pipe_connection_creator.cpp
293     anbox/qemu/pipe_connection_creator.h
294     anbox/qemu/qemud_message_processor.cpp
295     anbox/qemu/qemud_message_processor.h
296     anbox/qemu/sensors_message_processor.cpp
297     anbox/qemu/sensors_message_processor.h
298
299     anbox/rpc/channel.cpp
300     anbox/rpc/channel.h
301     anbox/rpc/connection_creator.cpp
302     anbox/rpc/connection_creator.h
303     anbox/rpc/constants.h
304     anbox/rpc/make_protobuf_object.h
305     anbox/rpc/message_processor.cpp
306     anbox/rpc/message_processor.h
307     anbox/rpc/pending_call_cache.cpp
308     anbox/rpc/pending_call_cache.h
309     anbox/rpc/template_message_processor.h
310
311     anbox/testing/gtest_utils.h
312
313     anbox/ui/splash_screen.cpp
314     anbox/ui/splash_screen.h
315
316     anbox/utils/environment_file.cpp
317     anbox/utils/environment_file.h
318
319     anbox/wm/display.cpp
320     anbox/wm/display.h
321     anbox/wm/manager.cpp
322     anbox/wm/manager.h
323     anbox/wm/multi_window_manager.cpp
324     anbox/wm/multi_window_manager.h
325     anbox/wm/single_window_manager.cpp
326     anbox/wm/single_window_manager.h
327     anbox/wm/stack.cpp
328     anbox/wm/stack.h
329     anbox/wm/task.cpp
330     anbox/wm/task.h
331     anbox/wm/window.cpp
332     anbox/wm/window.h
333     anbox/wm/window_state.cpp
334     anbox/wm/window_state.h
335
336     anbox/cli.cpp
337     anbox/cli.h
338     anbox/daemon.cpp
339     anbox/daemon.h
340     anbox/defer_action.h
341     anbox/do_not_copy_or_move.h
342     anbox/logger.cpp
343     anbox/logger.h
344     anbox/not_reachable.cpp
345     anbox/not_reachable.h
346     anbox/optional.h
347     anbox/utils.cpp
348     anbox/utils.h
349     anbox/runtime.cpp
350     anbox/runtime.h
351     anbox/system_configuration.cpp
352     anbox/system_configuration.h)
353
354 add_library(anbox-core STATIC ${SOURCES})
355 target_link_libraries(anbox-core
356   ${Boost_LDFLAGS}
357   ${Boost_LIBRARIES}
358   ${SDL2_LDFLAGS}
359   ${SDL2_LIBRARIES}
360   ${SDL2_IMAGE_LDFLAGS}
361   ${SDL2_IMAGE_LIBRARIES}
362   ${LXC_LDFLAGS}
363   ${LXC_LIBRARIES}
364   ${MIRCLIENT_LDFLAGS}
365   ${MIRCLIENT_LIBRARIES}
366   ${LIBSYSTEMD_LDFLAGS}
367   ${LIBSYSTEMD_LIBRARIES}
368   cpu_features
369   pthread
370   process-cpp
371   emugl_common
372   GLESv1_dec
373   GLESv2_dec
374   renderControl_dec
375   OpenGLESDispatch
376   OpenglCodecCommon
377   anbox-protobuf
378   xdg)
379
380 add_executable(anbox main.cpp ${BACKWARD_ENABLE})
381 target_link_libraries(anbox
382     anbox-core)
383 add_backward(anbox)
384
385 install(
386   TARGETS anbox
387   RUNTIME DESTINATION bin
388   LIBRARY DESTINATION lib
389   ARCHIVE DESTINATION lib/static)