xref: /aosp_15_r20/external/tink/cc/examples/CMakeLists.txt (revision e7b1675dde1b92d52ec075b0a92829627f2c52a5)
1cmake_minimum_required(VERSION 3.13)
2
3project(Examples CXX)
4
5set(CMAKE_CXX_STANDARD 14)
6set(CMAKE_CXX_STANDARD_REQUIRED ON)
7
8set(CMAKE_BUILD_TYPE Release)
9
10# Import Tink as an in-tree dependency.
11add_subdirectory(../.. tink)
12
13# Make sure we have bash.
14find_program(BASH_PROGRAM bash REQUIRED)
15
16# Include path at the base of the examples folder.
17set(TINK_EXAMPLES_INCLUDE_PATH "${CMAKE_SOURCE_DIR}")
18
19include(FetchContent)
20
21FetchContent_Declare(
22  googletest
23  URL       https://github.com/google/googletest/archive/refs/tags/release-1.11.0.tar.gz
24  URL_HASH  SHA256=b4870bf121ff7795ba20d20bcdd8627b8e088f2d1dab299a031c1034eddc93d5
25)
26
27FetchContent_GetProperties(googletest)
28if(NOT googletest_POPULATED)
29  FetchContent_Populate(googletest)
30  add_subdirectory(
31    ${googletest_SOURCE_DIR}
32    ${googletest_BINARY_DIR}
33    EXCLUDE_FROM_ALL)
34endif()
35
36enable_testing()
37
38add_subdirectory(aead)
39add_subdirectory(digital_signatures)
40add_subdirectory(hybrid_encryption)
41add_subdirectory(jwt)
42add_subdirectory(mac)
43add_subdirectory(util)
44add_subdirectory(walkthrough)
45