mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-08 17:42:09 +03:00
Merge pull request #3407 from RcColes/development
Increase compatibility with external cmake
This commit is contained in:
@@ -5,7 +5,7 @@ set(executables
|
||||
|
||||
foreach(exe IN LISTS executables)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
target_link_libraries(${exe} mbedcrypto)
|
||||
target_link_libraries(${exe} ${mbedcrypto_target})
|
||||
endforeach()
|
||||
|
||||
install(TARGETS ${executables}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
set(libs
|
||||
mbedtls
|
||||
${mbedtls_target}
|
||||
)
|
||||
|
||||
if(USE_PKCS11_HELPER_LIBRARY)
|
||||
|
@@ -5,7 +5,7 @@ set(executables
|
||||
|
||||
foreach(exe IN LISTS executables)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
target_link_libraries(${exe} mbedcrypto)
|
||||
target_link_libraries(${exe} ${mbedcrypto_target})
|
||||
endforeach()
|
||||
|
||||
install(TARGETS ${executables}
|
||||
|
@@ -5,7 +5,7 @@ set(executables_mbedtls
|
||||
|
||||
foreach(exe IN LISTS executables_mbedtls)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
target_link_libraries(${exe} mbedtls)
|
||||
target_link_libraries(${exe} ${mbedtls_target})
|
||||
endforeach()
|
||||
|
||||
set(executables_mbedcrypto
|
||||
@@ -31,7 +31,7 @@ set(executables_mbedcrypto
|
||||
|
||||
foreach(exe IN LISTS executables_mbedcrypto)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
target_link_libraries(${exe} mbedcrypto)
|
||||
target_link_libraries(${exe} ${mbedcrypto_target})
|
||||
endforeach()
|
||||
|
||||
install(TARGETS ${executables_mbedtls} ${executables_mbedcrypto}
|
||||
|
@@ -6,7 +6,7 @@ set(executables
|
||||
|
||||
foreach(exe IN LISTS executables)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
target_link_libraries(${exe} mbedcrypto)
|
||||
target_link_libraries(${exe} ${mbedcrypto_target})
|
||||
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/include)
|
||||
endforeach()
|
||||
|
||||
|
@@ -6,7 +6,7 @@ set(executables
|
||||
|
||||
foreach(exe IN LISTS executables)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
target_link_libraries(${exe} mbedcrypto)
|
||||
target_link_libraries(${exe} ${mbedcrypto_target})
|
||||
endforeach()
|
||||
|
||||
install(TARGETS ${executables}
|
||||
|
@@ -2,7 +2,7 @@ set(THREADS_USE_PTHREADS_WIN32 true)
|
||||
find_package(Threads)
|
||||
|
||||
set(libs
|
||||
mbedtls
|
||||
${mbedtls_target}
|
||||
)
|
||||
|
||||
if(USE_PKCS11_HELPER_LIBRARY)
|
||||
|
@@ -1,5 +1,5 @@
|
||||
set(libs
|
||||
mbedtls
|
||||
${mbedtls_target}
|
||||
)
|
||||
|
||||
if(USE_PKCS11_HELPER_LIBRARY)
|
||||
@@ -33,7 +33,7 @@ foreach(exe IN LISTS executables_libs executables_mbedcrypto)
|
||||
if (${exe_index} GREATER -1)
|
||||
target_link_libraries(${exe} ${libs})
|
||||
else()
|
||||
target_link_libraries(${exe} mbedcrypto)
|
||||
target_link_libraries(${exe} ${mbedcrypto_target})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
|
@@ -1,5 +1,8 @@
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
|
||||
# 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.
|
||||
@@ -8,11 +11,12 @@ set(MBEDTLS_DIR ../../../)
|
||||
# Add Mbed TLS as a subdirectory.
|
||||
add_subdirectory(${MBEDTLS_DIR} build)
|
||||
|
||||
# Link against all the Mbed TLS libraries.
|
||||
# Link against all the Mbed TLS libraries. Verifies that the targets have been
|
||||
# created using the specified prefix
|
||||
set(libs
|
||||
mbedcrypto
|
||||
mbedx509
|
||||
mbedtls
|
||||
subproject_test_mbedcrypto
|
||||
subproject_test_mbedx509
|
||||
subproject_test_mbedtls
|
||||
)
|
||||
|
||||
add_executable(cmake_subproject cmake_subproject.c)
|
||||
|
@@ -1,5 +1,5 @@
|
||||
set(libs
|
||||
mbedcrypto
|
||||
${mbedcrypto_target}
|
||||
)
|
||||
|
||||
set(executables
|
||||
|
@@ -1,5 +1,5 @@
|
||||
set(libs
|
||||
mbedx509
|
||||
${mbedx509_target}
|
||||
)
|
||||
|
||||
if(USE_PKCS11_HELPER_LIBRARY)
|
||||
@@ -23,7 +23,7 @@ foreach(exe IN LISTS executables)
|
||||
target_link_libraries(${exe} ${libs})
|
||||
endforeach()
|
||||
|
||||
target_link_libraries(cert_app mbedtls)
|
||||
target_link_libraries(cert_app ${mbedtls_target})
|
||||
|
||||
install(TARGETS ${executables}
|
||||
DESTINATION "bin"
|
||||
|
Reference in New Issue
Block a user