SSL support for windows
This commit is contained in:
@@ -82,7 +82,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
|||||||
set(VCPKG_TARGET_TRIPLET x64-windows-static)
|
set(VCPKG_TARGET_TRIPLET x64-windows-static)
|
||||||
|
|
||||||
vcpkg_bootstrap()
|
vcpkg_bootstrap()
|
||||||
vcpkg_install_packages(zlib bzip2 libzip libpng sdl2 sdl2-net glew glfw3 nlohmann-json tinyxml2 spdlog)
|
vcpkg_install_packages(zlib bzip2 libzip libpng sdl2 sdl2-net openssl glew glfw3 nlohmann-json tinyxml2 spdlog)
|
||||||
|
|
||||||
if (CMAKE_C_COMPILER_LAUNCHER MATCHES "ccache|sccache")
|
if (CMAKE_C_COMPILER_LAUNCHER MATCHES "ccache|sccache")
|
||||||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT Embedded)
|
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT Embedded)
|
||||||
|
|||||||
@@ -279,9 +279,6 @@ endif()
|
|||||||
################################################################################
|
################################################################################
|
||||||
add_compile_definitions(ASIO_STANDALONE)
|
add_compile_definitions(ASIO_STANDALONE)
|
||||||
|
|
||||||
# TEMPORARY
|
|
||||||
add_compile_definitions(WSWRAP_NO_SSL)
|
|
||||||
|
|
||||||
target_include_directories(${PROJECT_NAME} PRIVATE
|
target_include_directories(${PROJECT_NAME} PRIVATE
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../subprojects/asio/include
|
${CMAKE_CURRENT_SOURCE_DIR}/../subprojects/asio/include
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../subprojects/websocketpp
|
${CMAKE_CURRENT_SOURCE_DIR}/../subprojects/websocketpp
|
||||||
@@ -305,6 +302,13 @@ if (BUILD_REMOTE_CONTROL)
|
|||||||
else()
|
else()
|
||||||
set(SDL2-NET-INCLUDE ${SDL_NET_INCLUDE_DIRS})
|
set(SDL2-NET-INCLUDE ${SDL_NET_INCLUDE_DIRS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(OPENSSL_USE_STATIC_LIBS TRUE)
|
||||||
|
find_package(OpenSSL)
|
||||||
|
if(NOT OPENSSL_FOUND)
|
||||||
|
message(STATUS "OpenSSL not found (it's possible the version installed is too old). Disabling BUILD_REMOTE_CONTROL.")
|
||||||
|
set(BUILD_REMOTE_CONTROL 0)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_include_directories(${PROJECT_NAME} PRIVATE assets
|
target_include_directories(${PROJECT_NAME} PRIVATE assets
|
||||||
@@ -638,6 +642,8 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
|||||||
"SDL2::SDL2;"
|
"SDL2::SDL2;"
|
||||||
"SDL2::SDL2main;"
|
"SDL2::SDL2main;"
|
||||||
"$<$<BOOL:${BUILD_REMOTE_CONTROL}>:SDL2_net::SDL2_net-static>"
|
"$<$<BOOL:${BUILD_REMOTE_CONTROL}>:SDL2_net::SDL2_net-static>"
|
||||||
|
"$<$<BOOL:${BUILD_REMOTE_CONTROL}>:OpenSSL::SSL>"
|
||||||
|
"$<$<BOOL:${BUILD_REMOTE_CONTROL}>:OpenSSL::Crypto>"
|
||||||
"glfw;"
|
"glfw;"
|
||||||
"winmm;"
|
"winmm;"
|
||||||
"imm32;"
|
"imm32;"
|
||||||
|
|||||||
@@ -36,7 +36,8 @@ bool ArchipelagoClient::StartClient() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
apClient = std::unique_ptr<APClient>(
|
apClient = std::unique_ptr<APClient>(
|
||||||
new APClient(uuid, AP_Client_consts::AP_GAME_NAME, CVarGetString(CVAR_REMOTE_ARCHIPELAGO("ServerAddress"), "localhost:38281")));
|
new APClient(uuid, AP_Client_consts::AP_GAME_NAME,
|
||||||
|
CVarGetString(CVAR_REMOTE_ARCHIPELAGO("ServerAddress"), "localhost:38281"), "cacert.pem"));
|
||||||
|
|
||||||
apClient->set_room_info_handler([&]() {
|
apClient->set_room_info_handler([&]() {
|
||||||
std::list<std::string> tags;
|
std::list<std::string> tags;
|
||||||
|
|||||||
3480
soh/soh/Network/Archipelago/cacert.pem
Normal file
3480
soh/soh/Network/Archipelago/cacert.pem
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user