mirror of
https://github.com/yuzu-emu/mbedtls
synced 2024-11-24 09:38:26 +00:00
Add LINK_WITH_PTHREAD to CMakeList for explicitly adding pthread linking
This commit is contained in:
parent
911c5dcfeb
commit
d6917f0eb3
1 changed files with 8 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
option(USE_STATIC_POLARSSL_LIBRARY "Build PolarSSL static library." ON)
|
||||
option(USE_SHARED_POLARSSL_LIBRARY "Build PolarSSL shared library." OFF)
|
||||
option(LINK_WITH_PTHREAD "Explicitly link PolarSSL library to pthread." OFF)
|
||||
|
||||
set(src
|
||||
aes.c
|
||||
|
@ -102,6 +103,9 @@ if(USE_STATIC_POLARSSL_LIBRARY)
|
|||
target_link_libraries(${polarssl_static_target} ${ZLIB_LIBRARIES})
|
||||
endif(ZLIB_FOUND)
|
||||
|
||||
if(LINK_WITH_PTHREAD)
|
||||
target_link_libraries(${polarssl_static_target} pthread)
|
||||
endif()
|
||||
|
||||
install(TARGETS ${polarssl_static_target}
|
||||
DESTINATION ${LIB_INSTALL_DIR}
|
||||
|
@ -118,6 +122,10 @@ if(USE_SHARED_POLARSSL_LIBRARY)
|
|||
target_link_libraries(polarssl ${ZLIB_LIBRARIES})
|
||||
endif(ZLIB_FOUND)
|
||||
|
||||
if(LINK_WITH_PTHREAD)
|
||||
target_link_libraries(polarssl pthread)
|
||||
endif()
|
||||
|
||||
install(TARGETS polarssl
|
||||
DESTINATION ${LIB_INSTALL_DIR}
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
|
|
Loading…
Reference in a new issue