diff options
Diffstat (limited to 'vcpkg/scripts/test_ports/vcpkg-ci-openvpn3')
4 files changed, 44 insertions, 0 deletions
diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-openvpn3/portfile.cmake b/vcpkg/scripts/test_ports/vcpkg-ci-openvpn3/portfile.cmake new file mode 100644 index 0000000..bc78596 --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-openvpn3/portfile.cmake @@ -0,0 +1,4 @@ +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-openvpn3/project/CMakeLists.txt b/vcpkg/scripts/test_ports/vcpkg-ci-openvpn3/project/CMakeLists.txt new file mode 100644 index 0000000..4d66529 --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-openvpn3/project/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.7) +project(openvpn3-test CXX) + +add_executable(main main.cpp) + +find_package(unofficial-openvpn3 CONFIG REQUIRED) +target_link_libraries(main PRIVATE unofficial::openvpn3::ovpncli) diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-openvpn3/project/main.cpp b/vcpkg/scripts/test_ports/vcpkg-ci-openvpn3/project/main.cpp new file mode 100644 index 0000000..ba1584a --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-openvpn3/project/main.cpp @@ -0,0 +1,21 @@ +#include <openvpn/ovpncli.hpp> + +using namespace openvpn::ClientAPI; + +// Cf. https://github.com/OpenVPN/openvpn3/blob/master/README.rst#openvpn-3-client-core +class Client : public OpenVPNClient +{ +public: + void acc_event(const AppCustomControlMessageEvent &) override {} + void event(const Event&) override {} + void external_pki_cert_request(ExternalPKICertRequest &) override {} + void external_pki_sign_request(ExternalPKISignRequest &) override {} + void log(const LogInfo&) override {} + bool pause_on_connection_timeout() override { return false; } +}; + +int main() +{ + Client c; + return OpenVPNClient::stats_n(); +} diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-openvpn3/vcpkg.json b/vcpkg/scripts/test_ports/vcpkg-ci-openvpn3/vcpkg.json new file mode 100644 index 0000000..81c8f5f --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-openvpn3/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "vcpkg-ci-openvpn3", + "version-string": "ci", + "description": "Validates openvpn3", + "dependencies": [ + "openvpn3", + { + "name": "vcpkg-cmake", + "host": true + } + ] +} |