Debian Codegraph @

others/mbedtls/tf-psa-crypto/drivers/p256-m/CMakeLists.txt

raw
1 set(p256-m_target "${TF_PSA_CRYPTO_TARGET_PREFIX}p256-m")
2 if (USE_STATIC_TF_PSA_CRYPTO_LIBRARY)
3 set(p256-m_static_target ${p256-m_target})
4 endif()
5 set(target_libraries ${p256-m_target})
6 if(USE_STATIC_TF_PSA_CRYPTO_LIBRARY AND USE_SHARED_TF_PSA_CRYPTO_LIBRARY)
7 string(APPEND p256-m_static_target "_static")
8 list(APPEND target_libraries ${p256-m_static_target})
9 endif()
10
11 foreach (target IN LISTS target_libraries)
12 add_library(${target} OBJECT
13 p256-m_driver_entrypoints.c
14 p256-m/p256-m.c)
15
16 tf_psa_crypto_set_base_compile_options(${target})
17
18 target_include_directories(${target}
19 PUBLIC p256-m
20 # Add the build-tree include directory before the source-tree one
21 # so that generated headers in the build tree take precedence.
22 PRIVATE ${PROJECT_BINARY_DIR}/include
23 ${PROJECT_SOURCE_DIR}/include
24 ${PROJECT_SOURCE_DIR}/core
25 ${PROJECT_SOURCE_DIR}/dispatch
26 ${TF_PSA_CRYPTO_DRIVERS_INCLUDE_DIRS}
27 )
28 tf_psa_crypto_set_config_files_compile_definitions(${target})
29 if(TF_PSA_CRYPTO_TEST_DRIVER)
30 add_dependencies(${target} ${TF_PSA_CRYPTO_TEST_DRIVER_GENERATION_TARGETS})
31 endif()
32 endforeach(target)
33
34 if(USE_SHARED_TF_PSA_CRYPTO_LIBRARY)
35 set_property(TARGET ${p256-m_target} PROPERTY POSITION_INDEPENDENT_CODE ON)
36 endif(USE_SHARED_TF_PSA_CRYPTO_LIBRARY)