mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-05 19:35:48 +03:00
Add MBEDTLS_TARGET_PREFIX to 3rdparty CMake
MBEDTLS_TARGET_PREFIX is prepended to the CMake targets for Mbed TLS except for targets in 3rdparty. Change this so that 3rdparty targets use the prefix as well. This allows multiple copies of Mbed TLS to be used in the same CMake tree when using code in the 3rdparty directory. Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
8
3rdparty/everest/CMakeLists.txt
vendored
8
3rdparty/everest/CMakeLists.txt
vendored
@@ -1,9 +1,11 @@
|
||||
add_library(everest
|
||||
set(everest_target "${MBEDTLS_TARGET_PREFIX}everest")
|
||||
|
||||
add_library(${everest_target}
|
||||
library/everest.c
|
||||
library/x25519.c
|
||||
library/Hacl_Curve25519_joined.c)
|
||||
|
||||
target_include_directories(everest
|
||||
target_include_directories(${everest_target}
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<BUILD_INTERFACE:${MBEDTLS_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
@@ -21,7 +23,7 @@ if(INSTALL_MBEDTLS_HEADERS)
|
||||
|
||||
endif(INSTALL_MBEDTLS_HEADERS)
|
||||
|
||||
install(TARGETS everest
|
||||
install(TARGETS ${everest_target}
|
||||
EXPORT MbedTLSTargets
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
|
||||
|
8
3rdparty/p256-m/CMakeLists.txt
vendored
8
3rdparty/p256-m/CMakeLists.txt
vendored
@@ -1,8 +1,10 @@
|
||||
add_library(p256m
|
||||
set(p256m_target ${MBEDTLS_TARGET_PREFIX}p256m)
|
||||
|
||||
add_library(${p256m_target}
|
||||
p256-m_driver_entrypoints.c
|
||||
p256-m/p256-m.c)
|
||||
|
||||
target_include_directories(p256m
|
||||
target_include_directories(${p256m_target}
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/p256-m>
|
||||
$<BUILD_INTERFACE:${MBEDTLS_DIR}/include>
|
||||
@@ -19,7 +21,7 @@ if(INSTALL_MBEDTLS_HEADERS)
|
||||
|
||||
endif(INSTALL_MBEDTLS_HEADERS)
|
||||
|
||||
install(TARGETS p256m
|
||||
install(TARGETS ${p256m_target}
|
||||
EXPORT MbedTLSTargets
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
|
||||
|
Reference in New Issue
Block a user