diff --git a/ports/async-simple/portfile.cmake b/ports/async-simple/portfile.cmake new file mode 100644 index 0000000000..22bd4a5187 --- /dev/null +++ b/ports/async-simple/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO alibaba/async_simple + REF "v${VERSION}" + SHA512 7686d8c98e5e87cf88c24488e4c0b528b29011ef48c25156c57695208dab75ee2f28b6f36e2612db2bf4644b50f4c1d4a7ebc54f16bc035cb106239d5b335c77 + HEAD_REF main +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DASYNC_SIMPLE_ENABLE_TESTS=OFF + -DASYNC_SIMPLE_BUILD_DEMO_EXAMPLE=OFF + -DASYNC_SIMPLE_ENABLE_ASAN=OFF +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(PACKAGE_NAME "async_simple") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(GLOB LIBS "${CURRENT_PACKAGES_DIR}/debug/lib/*async_simple*") + +list(LENGTH LIBS LIB_CNT) +if (LIB_CNT EQUAL 0) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") +endif() + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") +configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" COPYONLY) \ No newline at end of file diff --git a/ports/async-simple/usage b/ports/async-simple/usage new file mode 100644 index 0000000000..e6087ae64f --- /dev/null +++ b/ports/async-simple/usage @@ -0,0 +1,8 @@ +async-simple provides CMake targets: + +find_package(async_simple CONFIG REQUIRED) +target_link_libraries(main PRIVATE async_simple::async_simple_static) +# Or you can use header-only version(async_simple::uthread is not allowed to use in this version) +target_link_libraries(main PRIVATE async_simple::async_simple_header_only) +# Or you can also use dynamic linkage: +target_link_libraries(main PRIVATE async_simple::async_simple) diff --git a/ports/async-simple/vcpkg.json b/ports/async-simple/vcpkg.json new file mode 100644 index 0000000000..643650d5ad --- /dev/null +++ b/ports/async-simple/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "async-simple", + "version": "1.3", + "description": "Simple, light-weight and easy-to-use asynchronous components.", + "homepage": "https://github.com/alibaba/async_simple", + "license": "Apache-2.0", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/versions/a-/async-simple.json b/versions/a-/async-simple.json new file mode 100644 index 0000000000..7c4fe94b2f --- /dev/null +++ b/versions/a-/async-simple.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "f2ba1d445f31f11bc0311be0de36f56fc40531da", + "version": "1.3", + "port-version": 0 + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 61b27bbb4b..3f1f3311fd 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -280,6 +280,10 @@ "baseline": "4.0.0", "port-version": 0 }, + "async-simple": { + "baseline": "1.3", + "port-version": 0 + }, "asynch": { "baseline": "2019-09-21", "port-version": 3