1# Copyright 2019 Google LLC. All Rights Reserved. 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/network_proxy:server 16add_library(sandbox2_network_proxy_server ${SAPI_LIB_TYPE} 17 server.cc 18 server.h 19) 20add_library(sandbox2::network_proxy_server ALIAS sandbox2_network_proxy_server) 21target_link_libraries(sandbox2_network_proxy_server 22 PRIVATE absl::status 23 sapi::fileops 24 sapi::base 25 PUBLIC absl::any_invocable 26 sandbox2::comms 27 sandbox2::network_proxy_filtering 28) 29 30# sandboxed_api/sandbox2/network_proxy:filtering 31add_library(sandbox2_network_proxy_filtering ${SAPI_LIB_TYPE} 32 filtering.cc 33 filtering.h 34) 35add_library(sandbox2::network_proxy_filtering ALIAS sandbox2_network_proxy_filtering) 36target_link_libraries(sandbox2_network_proxy_filtering 37 PRIVATE absl::status 38 sandbox2::comms 39 sapi::fileops 40 sapi::base 41 PUBLIC absl::statusor 42 absl::log 43 sapi::strerror 44 sapi::status 45) 46 47# sandboxed_api/sandbox2/network_proxy:client 48add_library(sandbox2_network_proxy_client ${SAPI_LIB_TYPE} 49 client.cc 50 client.h 51) 52add_library(sandbox2::network_proxy_client ALIAS sandbox2_network_proxy_client) 53target_link_libraries(sandbox2_network_proxy_client 54 PUBLIC absl::core_headers 55 absl::status 56 absl::statusor 57 absl::synchronization 58 sandbox2::comms 59 sandbox2::syscall_trap 60 sapi::fileops 61 PRIVATE absl::strings 62 absl::log 63 sapi::base 64 sapi::status 65) 66 67# sandboxed_api/sandbox2/network_proxy:testing 68add_library(sandbox2_network_proxy_testing ${SAPI_LIB_TYPE} 69 testing.cc 70 testing.h 71) 72add_library(sandbox2::network_proxy_testing ALIAS sandbox2_network_proxy_testing) 73target_link_libraries(sandbox2_network_proxy_testing 74 PUBLIC sapi::fileops 75 sapi::thread 76 absl::statusor 77 PRIVATE absl::check 78 absl::core_headers 79 absl::memory 80 absl::status 81 absl::strings 82 sapi::status 83 sapi::base 84) 85 86if(BUILD_TESTING AND SAPI_BUILD_TESTING) 87 # sandboxed_api/sandbox2/network_proxy:filtering_test 88 add_executable(sandbox2_filtering_test 89 filtering_test.cc 90 ) 91 set_target_properties(sandbox2_filtering_test PROPERTIES 92 OUTPUT_NAME filtering_test 93 ) 94 target_link_libraries(sandbox2_filtering_test PRIVATE 95 absl::check 96 absl::strings 97 sandbox2::network_proxy_filtering 98 sapi::testing 99 sapi::base 100 sapi::status_matchers 101 sapi::test_main 102 ) 103 gtest_discover_tests_xcompile(sandbox2_filtering_test) 104endif() 105