Merge pull request #1133 from RonEld/1805

Fix Shared Library compilation issue with Cmake
This commit is contained in:
Manuel Pégourié-Gonnard 2022-04-11 09:31:59 +02:00 committed by GitHub
commit eaf3086831
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -0,0 +1,3 @@
Bugfix
* Fix compilation on Windows when building shared library, by setting
library search path to CMAKE_CURRENT_BINARY_DIR.

View File

@ -260,6 +260,7 @@ if(USE_STATIC_MBEDTLS_LIBRARY)
endif(USE_STATIC_MBEDTLS_LIBRARY)
if(USE_SHARED_MBEDTLS_LIBRARY)
set(CMAKE_LIBRARY_PATH ${CMAKE_CURRENT_BINARY_DIR})
add_library(${mbedcrypto_target} SHARED ${src_crypto})
set_target_properties(${mbedcrypto_target} PROPERTIES VERSION 3.1.0 SOVERSION 11)
target_link_libraries(${mbedcrypto_target} PUBLIC ${libs})