mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
cmake: mingw: fix openssl linkage
ws32 and friends must come after the openssl libs, and pthread is required for openssl.
This commit is contained in:
parent
9f104efc25
commit
471dbf5280
1 changed files with 6 additions and 3 deletions
|
@ -209,7 +209,7 @@ if (LWS_WITH_SSL)
|
|||
set(OPENSSL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIRS} PARENT_SCOPE)
|
||||
set(VARIA wolfSSL_)
|
||||
|
||||
list(APPEND LIB_LIST "${WOLFSSL_LIBRARIES}")
|
||||
list(INSERT LIB_LIST 0 "${WOLFSSL_LIBRARIES}")
|
||||
message("LIB_LIST ${LIB_LIST}")
|
||||
set(chose_ssl 1)
|
||||
endif()
|
||||
|
@ -222,7 +222,7 @@ if (LWS_WITH_SSL)
|
|||
include_directories("${inc}" "${inc}/mbedtls")
|
||||
endforeach()
|
||||
|
||||
list(APPEND LIB_LIST "${MBEDTLS_LIBRARIES}")
|
||||
list(INSERT LIB_LIST 0 "${MBEDTLS_LIBRARIES}")
|
||||
endif()
|
||||
|
||||
if (LWS_WITH_MBEDTLS)
|
||||
|
@ -250,7 +250,7 @@ if (LWS_WITH_SSL)
|
|||
if (OPENSSL_INCLUDE_DIRS)
|
||||
include_directories("${OPENSSL_INCLUDE_DIRS}")
|
||||
if (NOT LWS_PLAT_FREERTOS)
|
||||
list(APPEND LIB_LIST ${OPENSSL_LIBRARIES})
|
||||
list(INSERT LIB_LIST 0 ${OPENSSL_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if (NOT LWS_WITH_MBEDTLS)
|
||||
|
@ -278,6 +278,9 @@ endif()
|
|||
if (UNIX AND NOT (${CMAKE_SYSTEM_NAME} MATCHES "QNX"))
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} dl)
|
||||
endif()
|
||||
if ((CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) AND NOT (${CMAKE_SYSTEM_NAME} MATCHES "QNX"))
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} pthread)
|
||||
endif()
|
||||
|
||||
if (NOT VARIA)
|
||||
set(VARIA "")
|
||||
|
|
Loading…
Add table
Reference in a new issue