aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/uvw
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/uvw
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/uvw')
-rw-r--r--vcpkg/ports/uvw/fix-find-libuv.patch18
-rw-r--r--vcpkg/ports/uvw/portfile.cmake36
-rw-r--r--vcpkg/ports/uvw/usage4
-rw-r--r--vcpkg/ports/uvw/vcpkg.json18
4 files changed, 76 insertions, 0 deletions
diff --git a/vcpkg/ports/uvw/fix-find-libuv.patch b/vcpkg/ports/uvw/fix-find-libuv.patch
new file mode 100644
index 0000000..d9218d1
--- /dev/null
+++ b/vcpkg/ports/uvw/fix-find-libuv.patch
@@ -0,0 +1,18 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2be8ae8..cda1957 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -194,6 +194,13 @@ if (BUILD_UVW_LIBS)
+ )
+ endif()
+
++find_package(libuv CONFIG REQUIRED)
++if (TARGET libuv::uv)
++ target_link_libraries(uvw PRIVATE libuv::uv)
++else()
++ target_link_libraries(uvw PRIVATE libuv::uv_a)
++endif()
++
+ install(
+ EXPORT uvwConfig
+ NAMESPACE uvw::
diff --git a/vcpkg/ports/uvw/portfile.cmake b/vcpkg/ports/uvw/portfile.cmake
new file mode 100644
index 0000000..472357d
--- /dev/null
+++ b/vcpkg/ports/uvw/portfile.cmake
@@ -0,0 +1,36 @@
+vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO skypjack/uvw
+ REF "v${VERSION}_libuv_v1.48"
+ SHA512 dbf03c63b0693263b77b405e8f6bf4c207795be9bd024bbc06484e523b55257add1eab632067a956d03399d91ee389c46312603e7754b152c4caf51b40f6bec4
+ PATCHES
+ fix-find-libuv.patch
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DBUILD_UVW_LIBS=ON
+ -DBUILD_UVW_SHARED_LIB=OFF
+ -DFETCH_LIBUV=OFF
+ -DFIND_LIBUV=OFF
+)
+
+vcpkg_cmake_install()
+vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/uvw)
+
+vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/uvw/config.h" "#ifndef UVW_AS_LIB" "#define UVW_AS_LIB\n#ifndef UVW_AS_LIB")
+
+file(READ "${CURRENT_PACKAGES_DIR}/share/uvw/uvwConfig.cmake" cmake_config)
+file(WRITE "${CURRENT_PACKAGES_DIR}/share/uvw/uvwConfig.cmake"
+"include(CMakeFindDependencyMacro)
+find_dependency(libuv)
+${cmake_config}
+")
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+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/uvw/usage b/vcpkg/ports/uvw/usage
new file mode 100644
index 0000000..0ff6b9b
--- /dev/null
+++ b/vcpkg/ports/uvw/usage
@@ -0,0 +1,4 @@
+uvw provides CMake targets:
+
+ find_package(uvw CONFIG REQUIRED)
+ target_link_libraries(main PRIVATE uvw::uvw)
diff --git a/vcpkg/ports/uvw/vcpkg.json b/vcpkg/ports/uvw/vcpkg.json
new file mode 100644
index 0000000..60fe652
--- /dev/null
+++ b/vcpkg/ports/uvw/vcpkg.json
@@ -0,0 +1,18 @@
+{
+ "name": "uvw",
+ "version": "3.4.0",
+ "description": "A compilable static library, event based, tiny and easy to use libuv wrapper in modern C++.",
+ "homepage": "https://github.com/skypjack/uvw",
+ "license": "MIT",
+ "dependencies": [
+ "libuv",
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}