ambrosin | 40e7b86 | 2022-10-05 01:44:01 -0700 | [diff] [blame] | 1 | # Library targets. |
| 2 | |
ambrosin | beff374 | 2022-10-04 07:17:40 -0700 | [diff] [blame] | 3 | add_library(create_keyset create_keyset.cc create_keyset.h) |
ambrosin | f6cd35a | 2022-11-07 15:03:08 -0800 | [diff] [blame] | 4 | target_include_directories(create_keyset PUBLIC |
| 5 | "${CMAKE_CURRENT_SOURCE_DIR}" |
| 6 | "${TINK_EXAMPLES_INCLUDE_PATH}") |
ambrosin | beff374 | 2022-10-04 07:17:40 -0700 | [diff] [blame] | 7 | target_link_libraries(create_keyset tink::static) |
| 8 | |
ambrosin | 40e7b86 | 2022-10-05 01:44:01 -0700 | [diff] [blame] | 9 | add_library(load_cleartext_keyset load_cleartext_keyset.cc load_cleartext_keyset.h) |
ambrosin | f6cd35a | 2022-11-07 15:03:08 -0800 | [diff] [blame] | 10 | target_include_directories(load_cleartext_keyset PUBLIC |
| 11 | "${CMAKE_CURRENT_SOURCE_DIR}" |
| 12 | "${TINK_EXAMPLES_INCLUDE_PATH}") |
ambrosin | 40e7b86 | 2022-10-05 01:44:01 -0700 | [diff] [blame] | 13 | target_link_libraries(load_cleartext_keyset tink::static) |
| 14 | |
ambrosin | a78ddb5 | 2022-10-05 04:51:57 -0700 | [diff] [blame] | 15 | add_library(test_util test_util.cc test_util.h) |
ambrosin | f6cd35a | 2022-11-07 15:03:08 -0800 | [diff] [blame] | 16 | target_include_directories(test_util PUBLIC |
| 17 | "${CMAKE_CURRENT_SOURCE_DIR}" |
| 18 | "${TINK_EXAMPLES_INCLUDE_PATH}") |
ambrosin | a78ddb5 | 2022-10-05 04:51:57 -0700 | [diff] [blame] | 19 | target_link_libraries(test_util load_cleartext_keyset tink::static) |
| 20 | |
ambrosin | 40e7b86 | 2022-10-05 01:44:01 -0700 | [diff] [blame] | 21 | add_library(load_encrypted_keyset load_encrypted_keyset.cc load_encrypted_keyset.h) |
ambrosin | f6cd35a | 2022-11-07 15:03:08 -0800 | [diff] [blame] | 22 | target_include_directories(load_encrypted_keyset PUBLIC |
| 23 | "${CMAKE_CURRENT_SOURCE_DIR}" |
| 24 | "${TINK_EXAMPLES_INCLUDE_PATH}") |
ambrosin | 40e7b86 | 2022-10-05 01:44:01 -0700 | [diff] [blame] | 25 | target_link_libraries(load_encrypted_keyset tink::static) |
| 26 | |
ambrosin | a78ddb5 | 2022-10-05 04:51:57 -0700 | [diff] [blame] | 27 | add_library(write_keyset write_keyset.cc write_keyset.h) |
ambrosin | f6cd35a | 2022-11-07 15:03:08 -0800 | [diff] [blame] | 28 | target_include_directories(write_keyset PUBLIC |
| 29 | "${CMAKE_CURRENT_SOURCE_DIR}" |
| 30 | "${TINK_EXAMPLES_INCLUDE_PATH}") |
ambrosin | a78ddb5 | 2022-10-05 04:51:57 -0700 | [diff] [blame] | 31 | target_link_libraries(write_keyset load_cleartext_keyset tink::static) |
| 32 | |
ambrosin | f0b61d3 | 2022-10-06 02:04:37 -0700 | [diff] [blame] | 33 | add_library(obtain_and_use_a_primitive obtain_and_use_a_primitive.cc obtain_and_use_a_primitive.h) |
ambrosin | f6cd35a | 2022-11-07 15:03:08 -0800 | [diff] [blame] | 34 | target_include_directories(obtain_and_use_a_primitive PUBLIC |
| 35 | "${CMAKE_CURRENT_SOURCE_DIR}" |
| 36 | "${TINK_EXAMPLES_INCLUDE_PATH}") |
ambrosin | f0b61d3 | 2022-10-06 02:04:37 -0700 | [diff] [blame] | 37 | target_link_libraries(obtain_and_use_a_primitive tink::static) |
| 38 | |
ambrosin | 9058dba | 2022-12-21 03:16:47 -0800 | [diff] [blame] | 39 | add_library(write_cleartext_keyset write_cleartext_keyset.cc write_cleartext_keyset.h) |
| 40 | target_include_directories(write_cleartext_keyset PUBLIC |
| 41 | "${CMAKE_CURRENT_SOURCE_DIR}" |
| 42 | "${TINK_EXAMPLES_INCLUDE_PATH}") |
| 43 | target_link_libraries(write_cleartext_keyset tink::static) |
| 44 | |
ambrosin | 40e7b86 | 2022-10-05 01:44:01 -0700 | [diff] [blame] | 45 | # Test targets. |
ambrosin | beff374 | 2022-10-04 07:17:40 -0700 | [diff] [blame] | 46 | # NOTE: gmock and gtest_main are already exported by Tink. |
ambrosin | 40e7b86 | 2022-10-05 01:44:01 -0700 | [diff] [blame] | 47 | |
ambrosin | beff374 | 2022-10-04 07:17:40 -0700 | [diff] [blame] | 48 | add_executable(create_keyset_test create_keyset_test.cc) |
| 49 | add_test(NAME create_keyset_test COMMAND create_keyset_test WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) |
| 50 | target_link_libraries(create_keyset_test create_keyset gmock gtest_main) |
| 51 | |
ambrosin | 40e7b86 | 2022-10-05 01:44:01 -0700 | [diff] [blame] | 52 | add_executable(load_cleartext_keyset_test load_cleartext_keyset_test.cc) |
| 53 | add_test(NAME load_cleartext_keyset_test COMMAND load_cleartext_keyset_test WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) |
| 54 | target_link_libraries(load_cleartext_keyset_test load_cleartext_keyset gmock gtest_main) |
| 55 | |
| 56 | add_executable(load_encrypted_keyset_test load_encrypted_keyset_test.cc) |
| 57 | add_test(NAME load_encrypted_keyset_test COMMAND load_encrypted_keyset_test WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) |
ambrosin | a78ddb5 | 2022-10-05 04:51:57 -0700 | [diff] [blame] | 58 | target_link_libraries(load_encrypted_keyset_test test_util load_encrypted_keyset load_cleartext_keyset gmock gtest_main) |
| 59 | |
| 60 | add_executable(write_keyset_test write_keyset_test.cc) |
| 61 | add_test(NAME write_keyset_test COMMAND write_keyset_test WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) |
| 62 | target_link_libraries(write_keyset_test test_util write_keyset load_cleartext_keyset load_encrypted_keyset gmock gtest_main) |
ambrosin | 40e7b86 | 2022-10-05 01:44:01 -0700 | [diff] [blame] | 63 | |
ambrosin | f0b61d3 | 2022-10-06 02:04:37 -0700 | [diff] [blame] | 64 | add_executable(obtain_and_use_a_primitive_test obtain_and_use_a_primitive_test.cc) |
| 65 | add_test(NAME obtain_and_use_a_primitive_test COMMAND obtain_and_use_a_primitive_test WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) |
| 66 | target_link_libraries(obtain_and_use_a_primitive_test obtain_and_use_a_primitive load_cleartext_keyset gmock gtest_main) |
ambrosin | 9058dba | 2022-12-21 03:16:47 -0800 | [diff] [blame] | 67 | |
| 68 | add_executable(write_cleartext_keyset_test write_cleartext_keyset_test.cc) |
| 69 | add_test(NAME write_cleartext_keyset_test COMMAND write_cleartext_keyset_test WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) |
| 70 | target_link_libraries(write_cleartext_keyset_test write_cleartext_keyset load_cleartext_keyset gmock gtest_main) |