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