mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 03:07:29 +02:00
Merge pull request #8377 from dgarske/cmake_win32
Fix for building wolfSSL with CMake on MINGW and MSYS
This commit is contained in:
@ -2409,17 +2409,20 @@ target_include_directories(wolfssl
|
|||||||
|
|
||||||
target_link_libraries(wolfssl PUBLIC ${WOLFSSL_LINK_LIBS})
|
target_link_libraries(wolfssl PUBLIC ${WOLFSSL_LINK_LIBS})
|
||||||
|
|
||||||
if(WIN32)
|
if (WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "^MSYS" OR ${CMAKE_SYSTEM_NAME} MATCHES "^MINGW")
|
||||||
# For Windows link ws2_32
|
# For Windows link required libraries
|
||||||
|
message("Building on Windows/MSYS/MINGW")
|
||||||
target_link_libraries(wolfssl PUBLIC
|
target_link_libraries(wolfssl PUBLIC
|
||||||
$<$<PLATFORM_ID:Windows>:ws2_32 crypt32 advapi32>)
|
ws2_32 crypt32 advapi32)
|
||||||
elseif(APPLE)
|
elseif(APPLE)
|
||||||
|
message("Building on Apple")
|
||||||
if(WOLFSSL_SYS_CA_CERTS)
|
if(WOLFSSL_SYS_CA_CERTS)
|
||||||
target_link_libraries(wolfssl PUBLIC
|
target_link_libraries(wolfssl PUBLIC
|
||||||
${CORE_FOUNDATION_FRAMEWORK}
|
${CORE_FOUNDATION_FRAMEWORK}
|
||||||
${SECURITY_FRAMEWORK})
|
${SECURITY_FRAMEWORK})
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
|
message("Building on Linux (or other)")
|
||||||
if(WOLFSSL_DH AND NOT WOLFSSL_DH_CONST)
|
if(WOLFSSL_DH AND NOT WOLFSSL_DH_CONST)
|
||||||
# DH requires math (m) library
|
# DH requires math (m) library
|
||||||
target_link_libraries(wolfssl
|
target_link_libraries(wolfssl
|
||||||
|
Reference in New Issue
Block a user