• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
15add_library(minitar_lib SHARED
16  minitar.cc
17  minitar.h
18)
19
20target_link_libraries(minitar_lib PRIVATE
21  archive
22)
23
24add_executable(minitar_original
25  minitar_main.cc
26)
27
28target_link_libraries(minitar_original PRIVATE
29    minitar_lib
30)
31
32add_library(sapi_minitar_lib_shared SHARED
33  ../examples/sapi_minitar.cc
34  ../examples/sapi_minitar.h
35  ../examples/sandbox.h
36)
37
38target_link_libraries(sapi_minitar_lib_shared PUBLIC
39  absl::log
40  libarchive_sapi
41  sandbox2::executor
42  sapi::fileops
43  sapi::file_base
44  sandbox2::util
45  sapi::temp_file
46  sapi::sapi
47)
48
49target_include_directories(sapi_minitar_lib_shared INTERFACE
50  "${PROJECT_SOURCE_DIR}/examples"
51)
52
53add_library(minitar_preload SHARED
54  sapi_minitar.cc
55)
56
57target_link_libraries(minitar_preload PRIVATE
58  sapi_minitar_lib_shared
59)
60