xref: /aosp_15_r20/external/sandboxed-api/oss-internship-2020/curl/examples/CMakeLists.txt (revision ec63e07ab9515d95e79c211197c445ef84cefa6a)
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# All the examples are sandboxed versions of curl's examples
16# (https://curl.haxx.se/libcurl/c/example.html)
17
18# Example 1: simple.c
19add_executable(example1
20  example1.cc
21  ../sandbox.h
22)
23target_link_libraries(example1 PRIVATE
24  curl_sapi
25  curl_util
26  sapi::sapi
27)
28
29# Example 2: getinmemory.c
30add_executable(example2
31  example2.cc
32  ../sandbox.h
33)
34target_link_libraries(example2 PRIVATE
35  curl_sapi
36  curl_util
37  sapi::sapi
38)
39
40# Example 3: simplessl.c
41add_executable(example3
42  example3.cc
43  ../sandbox.h
44)
45target_link_libraries(example3 PRIVATE
46  curl_sapi
47  curl_util
48  sapi::sapi
49)
50
51# Example 4: multi-poll.c
52add_executable(example4
53  example4.cc
54  ../sandbox.h
55)
56target_link_libraries(example4 PRIVATE
57  curl_sapi
58  curl_util
59  sapi::sapi
60)
61
62# Example 5: multithread.c
63add_executable(example5
64  example5.cc
65  ../sandbox.h
66)
67target_link_libraries(example5 PRIVATE
68  curl_sapi
69  curl_util
70  sapi::sapi
71)
72
73# Example 6: simple.c (using transactions)
74add_executable(example6
75  example6.cc
76  ../sandbox.h
77)
78target_link_libraries(example6 PRIVATE
79  curl_sapi
80  curl_util
81  sapi::sapi
82)
83