mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-17 13:57:49 +08:00
24 lines
976 B
CMake
24 lines
976 B
CMake
_find_package(${ARGS})
|
|
if(WIN32 AND NOT MINGW)
|
|
find_package(PThreads4W)
|
|
string(FIND "${MBEDTLS_CRYPTO_LIBRARY}" "${PThreads4W_LIBRARY}" pthreads_in_mbedtls)
|
|
if(pthreads_in_mbedtls EQUAL "-1")
|
|
list(APPEND MBEDTLS_CRYPTO_LIBRARY ${PThreads4W_LIBRARY})
|
|
endif()
|
|
string(FIND "${MBEDTLS_LIBRARIES}" "${PThreads4W_LIBRARY}" pthreads_in_mbedtls)
|
|
if(pthreads_in_mbedtls EQUAL "-1")
|
|
list(APPEND MBEDTLS_LIBRARIES ${PThreads4W_LIBRARY})
|
|
endif()
|
|
else()
|
|
set(THREADS_PREFER_PTHREAD_FLAG 1)
|
|
find_package(Threads)
|
|
string(FIND "${MBEDTLS_CRYPTO_LIBRARY}" "${CMAKE_THREAD_LIBS_INIT}" pthreads_in_mbedtls)
|
|
if(pthreads_in_mbedtls EQUAL "-1")
|
|
list(APPEND MBEDTLS_CRYPTO_LIBRARY ${CMAKE_THREAD_LIBS_INIT})
|
|
endif()
|
|
string(FIND "${MBEDTLS_LIBRARIES}" "${CMAKE_THREAD_LIBS_INIT}" pthreads_in_mbedtls)
|
|
if(pthreads_in_mbedtls EQUAL "-1")
|
|
list(APPEND MBEDTLS_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
|
|
endif()
|
|
endif()
|