From 584737544787b0d05d6d48f64b01816df62cfaa0 Mon Sep 17 00:00:00 2001 From: Anonymous275 Date: Fri, 1 Dec 2023 16:19:28 +0000 Subject: [PATCH] add vcpkg entry --- .github/workflows/cmake-windows.yml | 2 +- CMakeLists.txt | 5 +++-- src/Network/HttpAPI.cpp | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cmake-windows.yml b/.github/workflows/cmake-windows.yml index 9ad3025..656cf3f 100644 --- a/.github/workflows/cmake-windows.yml +++ b/.github/workflows/cmake-windows.yml @@ -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' diff --git a/CMakeLists.txt b/CMakeLists.txt index d7de35e..65374bb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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") diff --git a/src/Network/HttpAPI.cpp b/src/Network/HttpAPI.cpp index 7cb6a1d..5e3ab3f 100644 --- a/src/Network/HttpAPI.cpp +++ b/src/Network/HttpAPI.cpp @@ -4,7 +4,7 @@ /// #define CPPHTTPLIB_OPENSSL_SUPPORT #include "HttpAPI.h" -#include +#include #include #include #include