1# Copyright 2020 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/examples/zlib:zlib-sapi 16add_sapi_library(zlib-sapi 17 FUNCTIONS deflateInit_ 18 deflate 19 deflateEnd 20 INPUTS "${ZLIB_INCLUDE_DIRS}/zlib.h" 21 LIBRARY ZLIB::ZLIB 22 LIBRARY_NAME Zlib 23 NAMESPACE "sapi::zlib" 24) 25add_library(sapi::zlib_sapi ALIAS zlib-sapi) 26target_link_libraries(zlib-sapi PRIVATE 27 ZLIB::ZLIB 28) 29 30# sandboxed_api/examples/zlib:main_zlib 31add_executable(sapi_main_zlib 32 main_zlib.cc 33) 34set_target_properties(sapi_main_zlib PROPERTIES OUTPUT_NAME main_zlib) 35target_link_libraries(sapi_main_zlib PRIVATE 36 sapi::base 37 absl::flags_parse 38 absl::log 39 absl::log_initialize 40 absl::log_severity 41 absl::status 42 absl::statusor 43 sapi::sapi 44 sapi::status 45 sapi::zlib_sapi 46) 47