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/examples/static:static_sandbox 16add_executable(sandbox2_static_sandbox 17 static_sandbox.cc 18) 19add_executable(sandbox2::static_sandbox ALIAS sandbox2_static_sandbox) 20add_dependencies(sandbox2_static_sandbox 21 sandbox2::static_bin 22) 23target_link_libraries(sandbox2_static_sandbox PRIVATE 24 absl::check 25 absl::flags 26 absl::flags_parse 27 absl::log 28 absl::log_globals 29 absl::log_initialize 30 absl::log_severity 31 absl::time 32 sandbox2::bpf_helper 33 sapi::runfiles 34 sandbox2::sandbox2 35 sapi::base 36) 37 38# sandboxed_api/sandbox2/examples/static:static_bin 39add_executable(sandbox2_static_bin 40 static_bin.cc 41) 42set_target_properties(sandbox2_static_bin PROPERTIES OUTPUT_NAME static_bin) 43add_executable(sandbox2::static_bin ALIAS sandbox2_static_bin) 44target_link_libraries(sandbox2_static_bin PRIVATE 45 sapi::base 46 -static-pie # Fully static link 47) 48