diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/scripts/test_ports/vcpkg-ci-tgbot-cpp | |
Diffstat (limited to 'vcpkg/scripts/test_ports/vcpkg-ci-tgbot-cpp')
4 files changed, 38 insertions, 0 deletions
diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-tgbot-cpp/portfile.cmake b/vcpkg/scripts/test_ports/vcpkg-ci-tgbot-cpp/portfile.cmake new file mode 100644 index 0000000..8a2079b --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-tgbot-cpp/portfile.cmake @@ -0,0 +1,5 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) +vcpkg_cmake_configure( + SOURCE_PATH "${CURRENT_PORT_DIR}/project" +) +vcpkg_cmake_build() diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-tgbot-cpp/project/CMakeLists.txt b/vcpkg/scripts/test_ports/vcpkg-ci-tgbot-cpp/project/CMakeLists.txt new file mode 100644 index 0000000..ceedefc --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-tgbot-cpp/project/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 3.25.1)
+project(tgbot-cpp-test CXX)
+set(CMAKE_CXX_STANDARD 14)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+find_package(Threads)
+find_package(Boost COMPONENTS system REQUIRED)
+find_package(CURL REQUIRED)
+find_package(TgBot CONFIG REQUIRED)
+add_executable(main main.cpp)
+target_compile_definitions(main PRIVATE HAVE_CURL)
+target_link_libraries(main PRIVATE TgBot::TgBot)
diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-tgbot-cpp/project/main.cpp b/vcpkg/scripts/test_ports/vcpkg-ci-tgbot-cpp/project/main.cpp new file mode 100644 index 0000000..dfe54c5 --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-tgbot-cpp/project/main.cpp @@ -0,0 +1,10 @@ +#include <tgbot/tgbot.h>
+using namespace TgBot;
+int main()
+{
+ CurlHttpClient curlHttpClient;
+ Bot bot("TOKEN", curlHttpClient);
+ bot.getApi().deleteWebhook();
+ auto fileContent = FileTools::read("file.txt");
+ return 0;
+}
diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-tgbot-cpp/vcpkg.json b/vcpkg/scripts/test_ports/vcpkg-ci-tgbot-cpp/vcpkg.json new file mode 100644 index 0000000..845adad --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-tgbot-cpp/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "vcpkg-ci-tgbot-cpp", + "version-string": "ci", + "description": "Validates tgbot-cpp", + "dependencies": [ + "tgbot-cpp", + { + "name": "vcpkg-cmake", + "host": true + } + ] +} |