diff --git a/ports/cpp-smtpclient-library/portfile.cmake b/ports/cpp-smtpclient-library/portfile.cmake new file mode 100644 index 0000000000..eaad3b56a0 --- /dev/null +++ b/ports/cpp-smtpclient-library/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jeremydumais/CPP-SMTPClient-library + REF "v${VERSION}" + SHA512 1f1b28519e9cc4c37746dcb083ac00180ef249cffd60feb8f13365c9655b2c66f4c05c46e5fd7953254a20d4708eb1e80ea883a205411554ae23f5709935f901 + HEAD_REF master +) + +# Configure with explicit install dirs to avoid absolute /smtpclient +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DCMAKE_INSTALL_INCLUDEDIR=include # must be initialized + -DBUILD_TESTING=OFF # avoid gtest download/build in vcpkg +) +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(PACKAGE_NAME "smtpclient" CONFIG_PATH "lib/cmake/smtpclient") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/smtpclient/cpp/example") + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/cpp-smtpclient-library/usage b/ports/cpp-smtpclient-library/usage new file mode 100644 index 0000000000..789e9ba984 --- /dev/null +++ b/ports/cpp-smtpclient-library/usage @@ -0,0 +1,4 @@ +cpp-smtpclient-library provides CMake targets: + + find_package(smtpclient CONFIG REQUIRED) + target_link_libraries(main PRIVATE smtpclient::smtpclient) diff --git a/ports/cpp-smtpclient-library/vcpkg.json b/ports/cpp-smtpclient-library/vcpkg.json new file mode 100644 index 0000000000..32cb0641d1 --- /dev/null +++ b/ports/cpp-smtpclient-library/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "cpp-smtpclient-library", + "version": "1.1.13", + "description": "An SMTP client library built in C++ that support authentication and secure connections", + "homepage": "https://github.com/jeremydumais/CPP-SMTPClient-library", + "license": "MIT AND Zlib", + "supports": "!uwp", + "dependencies": [ + "openssl", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 5075aa4527..b087cadc5d 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2024,6 +2024,10 @@ "baseline": "4.3.1", "port-version": 5 }, + "cpp-smtpclient-library": { + "baseline": "1.1.13", + "port-version": 0 + }, "cpp-sort": { "baseline": "2.0.0", "port-version": 0 diff --git a/versions/c-/cpp-smtpclient-library.json b/versions/c-/cpp-smtpclient-library.json new file mode 100644 index 0000000000..ef9ae16258 --- /dev/null +++ b/versions/c-/cpp-smtpclient-library.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "3901222e417fcc4beec6d627908ed9308ed02e76", + "version": "1.1.13", + "port-version": 0 + } + ] +}