aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/async-simple
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/async-simple')
-rw-r--r--vcpkg/ports/async-simple/portfile.cmake34
-rw-r--r--vcpkg/ports/async-simple/usage8
-rw-r--r--vcpkg/ports/async-simple/vcpkg.json17
3 files changed, 59 insertions, 0 deletions
diff --git a/vcpkg/ports/async-simple/portfile.cmake b/vcpkg/ports/async-simple/portfile.cmake
new file mode 100644
index 0000000..cf21ca8
--- /dev/null
+++ b/vcpkg/ports/async-simple/portfile.cmake
@@ -0,0 +1,34 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO alibaba/async_simple
+ REF "${VERSION}"
+ SHA512 0b4e15169e546b590d2386ff5fa51efb207b759474347445ba7e2fdbd1273b61c0a653af5fecf85c3efbcacf09f5c4391c3bc1257c786eb8b7c837db60a9617f
+ HEAD_REF main
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ DISABLE_PARALLEL_CONFIGURE
+ OPTIONS
+ -DASYNC_SIMPLE_ENABLE_TESTS=OFF
+ -DASYNC_SIMPLE_BUILD_DEMO_EXAMPLE=OFF
+ -DASYNC_SIMPLE_ENABLE_ASAN=OFF
+ -DCMAKE_DISABLE_FIND_PACKAGE_Benchmark=ON
+ -DCMAKE_DISABLE_FIND_PACKAGE_Aio=ON
+)
+
+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")
+file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
diff --git a/vcpkg/ports/async-simple/usage b/vcpkg/ports/async-simple/usage
new file mode 100644
index 0000000..e6087ae
--- /dev/null
+++ b/vcpkg/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/vcpkg/ports/async-simple/vcpkg.json b/vcpkg/ports/async-simple/vcpkg.json
new file mode 100644
index 0000000..72c418e
--- /dev/null
+++ b/vcpkg/ports/async-simple/vcpkg.json
@@ -0,0 +1,17 @@
+{
+ "name": "async-simple",
+ "version": "1.4",
+ "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
+ }
+ ]
+}