Skip to content

Commit

Permalink
[unity]wolfssl使用静态库
Browse files Browse the repository at this point in the history
  • Loading branch information
chexiongsheng committed Sep 9, 2024
1 parent aa576fa commit d0b082f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions unity/native_src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ if ( WITH_WEBSOCKET EQUAL 2 )
)
set(WOLFSSL_EXAMPLES OFF)
set(WOLFSSL_CRYPT_TESTS OFF)
#set(BUILD_SHARED_LIBS OFF)
set(BUILD_SHARED_LIBS OFF)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

FetchContent_MakeAvailable(wolfssl)

Expand All @@ -236,11 +237,11 @@ if ( WITH_WEBSOCKET EQUAL 2 )
target_include_directories(puerts PRIVATE ${wolfssl_SOURCE_DIR}/wolfssl)

list(APPEND PUERTS_COMPILE_DEFINITIONS WITH_WEBSOCKET_SSL OPENSSL_EXTRA OPENSSL_ALL WOLFSSL_OPENSSH PUERTS_USE_WOLFSSL)
#if(WIN32)
# For Windows link ws2_32
# target_link_libraries(puerts
# $<$<PLATFORM_ID:Windows>:ws2_32 crypt32>)
#endif()

if ( WIN32 AND NOT CYGWIN AND NOT ( CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" ) AND NOT ANDROID AND NOT MSYS)
set_property(TARGET wolfssl PROPERTY
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif ()
endif ()

option ( USING_V8 "using v8" ON )
Expand Down

0 comments on commit d0b082f

Please sign in to comment.