2020-02-20 23:45:22 +08:00
|
|
|
# Copyright 2019 Google LLC. All Rights Reserved.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
2022-01-28 17:38:27 +08:00
|
|
|
# https://www.apache.org/licenses/LICENSE-2.0
|
2020-02-20 23:45:22 +08:00
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2/network_proxy:server
|
2020-12-15 01:15:40 +08:00
|
|
|
add_library(sandbox2_network_proxy_server ${SAPI_LIB_TYPE}
|
2020-02-20 23:45:22 +08:00
|
|
|
server.cc
|
|
|
|
server.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::network_proxy_server ALIAS sandbox2_network_proxy_server)
|
|
|
|
target_link_libraries(sandbox2_network_proxy_server PRIVATE
|
|
|
|
sandbox2::comms
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::fileops
|
2020-02-20 23:45:22 +08:00
|
|
|
sandbox2::network_proxy_filtering
|
|
|
|
sapi::base
|
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2/network_proxy:filtering
|
2020-12-15 01:15:40 +08:00
|
|
|
add_library(sandbox2_network_proxy_filtering ${SAPI_LIB_TYPE}
|
2020-02-20 23:45:22 +08:00
|
|
|
filtering.cc
|
|
|
|
filtering.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::network_proxy_filtering ALIAS sandbox2_network_proxy_filtering)
|
2020-09-03 22:40:09 +08:00
|
|
|
target_link_libraries(sandbox2_network_proxy_filtering
|
2022-10-12 20:22:51 +08:00
|
|
|
PRIVATE absl::status
|
2020-09-03 22:40:09 +08:00
|
|
|
sandbox2::comms
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::fileops
|
2020-09-03 22:40:09 +08:00
|
|
|
sapi::base
|
2020-12-15 01:15:40 +08:00
|
|
|
PUBLIC absl::statusor
|
2022-10-20 21:48:06 +08:00
|
|
|
absl::log
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::strerror
|
2020-12-15 01:15:40 +08:00
|
|
|
sapi::status
|
2020-02-20 23:45:22 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2/network_proxy:client
|
2020-12-15 01:15:40 +08:00
|
|
|
add_library(sandbox2_network_proxy_client ${SAPI_LIB_TYPE}
|
2020-02-20 23:45:22 +08:00
|
|
|
client.cc
|
|
|
|
client.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::network_proxy_client ALIAS sandbox2_network_proxy_client)
|
|
|
|
target_link_libraries(sandbox2_network_proxy_client PRIVATE
|
|
|
|
absl::strings
|
|
|
|
absl::synchronization
|
2022-10-20 21:48:06 +08:00
|
|
|
absl::log
|
2020-02-20 23:45:22 +08:00
|
|
|
sandbox2::comms
|
2022-11-30 21:47:09 +08:00
|
|
|
sandbox2::syscall_trap
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::strerror
|
2020-02-20 23:45:22 +08:00
|
|
|
sapi::base
|
|
|
|
sapi::status
|
|
|
|
)
|
|
|
|
|
2022-04-21 16:17:08 +08:00
|
|
|
if(BUILD_TESTING AND SAPI_BUILD_TESTING)
|
2020-02-20 23:45:22 +08:00
|
|
|
# sandboxed_api/sandbox2/network_proxy:filtering_test
|
2020-12-14 17:13:03 +08:00
|
|
|
add_executable(sandbox2_filtering_test
|
2020-02-20 23:45:22 +08:00
|
|
|
filtering_test.cc
|
|
|
|
)
|
2020-12-14 17:13:03 +08:00
|
|
|
set_target_properties(sandbox2_filtering_test PROPERTIES
|
|
|
|
OUTPUT_NAME filtering_test
|
|
|
|
)
|
|
|
|
target_link_libraries(sandbox2_filtering_test PRIVATE
|
2022-10-20 21:48:06 +08:00
|
|
|
absl::check
|
2020-02-20 23:45:22 +08:00
|
|
|
absl::strings
|
|
|
|
sandbox2::network_proxy_filtering
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::testing
|
2020-02-20 23:45:22 +08:00
|
|
|
sapi::base
|
|
|
|
sapi::status_matchers
|
|
|
|
sapi::test_main
|
|
|
|
)
|
2020-12-15 01:15:40 +08:00
|
|
|
gtest_discover_tests_xcompile(sandbox2_filtering_test)
|
2020-02-20 23:45:22 +08:00
|
|
|
endif()
|