add vcpkg entry

This commit is contained in:
Anonymous275
2023-12-01 16:19:28 +00:00
parent da9e32f15f
commit 5847375447
3 changed files with 5 additions and 4 deletions

View File

@@ -18,7 +18,7 @@ jobs:
uses: lukka/run-vcpkg@v7
id: runvcpkg
with:
vcpkgArguments: 'zlib discord-rpc nlohmann-json openssl minhook'
vcpkgArguments: 'zlib discord-rpc nlohmann-json openssl minhook cpp-httplib'
vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg'
vcpkgGitCommitId: '16ee2ecb31788c336ace8bb14c21801efb6836e4'
vcpkgTriplet: 'x64-windows-static'

View File

@@ -11,6 +11,7 @@ if (WIN32)
find_package(OpenSSL REQUIRED)
find_package(minhook CONFIG REQUIRED)
find_package(nlohmann_json CONFIG REQUIRED)
find_package(httplib CONFIG REQUIRED)
#-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static
set(VcpkgRoot ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET})
include_directories(${VcpkgRoot}/include)
@@ -18,7 +19,7 @@ if (WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUNICODE")
endif(WIN32)
add_subdirectory(include/cpp-httplib)
add_subdirectory(include/tomlplusplus)
set(CMAKE_CXX_STANDARD 20)
@@ -50,7 +51,7 @@ if (WIN32)
endif()
target_link_libraries(${PROJECT_NAME} PRIVATE
ZLIB::ZLIB OpenSSL::SSL OpenSSL::Crypto ws2_32
Dbghelp comsuppw minhook::minhook nlohmann_json nlohmann_json::nlohmann_json)
Dbghelp comsuppw minhook::minhook nlohmann_json httplib::httplib)
else(WIN32) #MINGW
add_definitions("-D_WIN32_WINNT=0x0600")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Os -s --static")

View File

@@ -4,7 +4,7 @@
///
#define CPPHTTPLIB_OPENSSL_SUPPORT
#include "HttpAPI.h"
#include <cpp-httplib/httplib.h>
#include <httplib.h>
#include <cmath>
#include <fstream>
#include <iostream>