xref: /aosp_15_r20/external/sandboxed-api/sandboxed_api/sandbox2/unwind/CMakeLists.txt (revision ec63e07ab9515d95e79c211197c445ef84cefa6a)
1# Copyright 2019 Google LLC
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15# sandboxed_api/sandbox2/unwind:ptrace_hook
16add_library(sandbox2_ptrace_hook STATIC
17  ptrace_hook.cc
18  ptrace_hook.h
19)
20add_library(sandbox2::ptrace_hook ALIAS sandbox2_ptrace_hook)
21target_link_libraries(sandbox2_ptrace_hook
22  PRIVATE sapi::base
23          sandbox2::syscall_trap
24  PUBLIC absl::strings
25)
26
27# sandboxed_api/sandbox2/unwind:unwind
28add_library(sandbox2_unwind STATIC
29  unwind.cc
30  unwind.h
31)
32add_library(sandbox2::unwind ALIAS sandbox2_unwind)
33target_link_libraries(sandbox2_unwind PRIVATE
34  absl::cleanup
35  absl::status
36  absl::statusor
37  absl::strings
38  sandbox2::comms
39  sandbox2::maps_parser
40  sandbox2::minielf
41  sandbox2::ptrace_hook
42  sandbox2::unwind_proto
43  sapi::base
44  sapi::config
45  sapi::file_helpers
46  sapi::raw_logging
47  sapi::status
48  unwind::unwind_ptrace
49)
50
51# sandboxed_api/sandbox2/unwind:unwind_proto
52sapi_protobuf_generate_cpp(_sandbox2_unwind_pb_h _sandbox2_unwind_pb_cc
53  unwind.proto
54)
55add_library(sandbox2_unwind_proto STATIC
56  ${_sandbox2_unwind_pb_cc}
57  ${_sandbox2_unwind_pb_h}
58)
59add_library(sandbox2::unwind_proto ALIAS sandbox2_unwind_proto)
60target_link_libraries(sandbox2_unwind_proto PRIVATE
61  protobuf::libprotobuf
62  sapi::base
63)
64