File: CMakeLists.txt

package info (click to toggle)
mbedtls 3.6.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 50,424 kB
  • sloc: ansic: 164,526; sh: 25,295; python: 14,825; makefile: 2,761; perl: 1,043; tcl: 4
file content (23 lines) | stat: -rw-r--r-- 776 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
cmake_minimum_required(VERSION 3.5.1)

# Test the target renaming support by adding a prefix to the targets built
set(MBEDTLS_TARGET_PREFIX subproject_test_)

# We use the parent Mbed TLS directory as the MBEDTLS_DIR for this test. Other
# projects that use Mbed TLS as a subproject are likely to add by their own
# relative paths.
set(MBEDTLS_DIR ../../../)

# Add Mbed TLS as a subdirectory.
add_subdirectory(${MBEDTLS_DIR} build)

# Link against all the Mbed TLS libraries. Verifies that the targets have been
# created using the specified prefix
set(libs
    subproject_test_mbedcrypto
    subproject_test_mbedx509
    subproject_test_mbedtls
)

add_executable(cmake_subproject cmake_subproject.c)
target_link_libraries(cmake_subproject ${libs} ${CMAKE_THREAD_LIBS_INIT})