aboutsummaryrefslogtreecommitdiff
path: root/ports/libuv
diff options
context:
space:
mode:
authorAlexander Neumann <30894796+Neumann-A@users.noreply.github.com>2020-04-17 23:13:24 +0200
committerGitHub <noreply@github.com>2020-04-17 14:13:24 -0700
commit4d8237b89ccefca3e50000406eebdc36d27aac07 (patch)
tree86cb4ff0fc224e60a63516cf08b7f840aef4b670 /ports/libuv
parent5f77f3e92b93f849bb73afeff77127a4f47f089e (diff)
downloadvcpkg-4d8237b89ccefca3e50000406eebdc36d27aac07.tar.gz
vcpkg-4d8237b89ccefca3e50000406eebdc36d27aac07.zip
[libarchive, libuv]Fix static linkage (#10769)
* [libarchive] fix static linkage of libarchive in dependent ports (non yet) * [libuv] fix static builds of dependent ports * modernize portfiles * remove POSIX_REGEX_LIB=NONE since it is added elsewhere * remove debug message
Diffstat (limited to 'ports/libuv')
-rw-r--r--ports/libuv/CONTROL2
-rw-r--r--ports/libuv/portfile.cmake7
-rw-r--r--ports/libuv/vcpkg-cmake-wrapper.cmake16
3 files changed, 20 insertions, 5 deletions
diff --git a/ports/libuv/CONTROL b/ports/libuv/CONTROL
index 7d9d1b1f3..efae9098f 100644
--- a/ports/libuv/CONTROL
+++ b/ports/libuv/CONTROL
@@ -1,4 +1,4 @@
Source: libuv
-Version: 1.34.2
+Version: 1.34.2-1
Homepage: https://github.com/libuv/libuv
Description: libuv is a multi-platform support library with a focus on asynchronous I/O.
diff --git a/ports/libuv/portfile.cmake b/ports/libuv/portfile.cmake
index 697e1e551..4cc164c31 100644
--- a/ports/libuv/portfile.cmake
+++ b/ports/libuv/portfile.cmake
@@ -1,5 +1,3 @@
-include(vcpkg_common_functions)
-
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO libuv/libuv
@@ -32,8 +30,9 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
string(REPLACE "defined(USING_UV_SHARED)" "1" UV_H "${UV_H}")
else()
string(REPLACE "defined(USING_UV_SHARED)" "0" UV_H "${UV_H}")
+ configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY)
endif()
file(WRITE ${CURRENT_PACKAGES_DIR}/include/uv.h "${UV_H}")
-file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libuv)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/libuv/LICENSE ${CURRENT_PACKAGES_DIR}/share/libuv/copyright)
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
+
diff --git a/ports/libuv/vcpkg-cmake-wrapper.cmake b/ports/libuv/vcpkg-cmake-wrapper.cmake
new file mode 100644
index 000000000..10b6e6498
--- /dev/null
+++ b/ports/libuv/vcpkg-cmake-wrapper.cmake
@@ -0,0 +1,16 @@
+_find_package(${ARGS})
+
+if(WIN32)
+ list(APPEND LibUV_LIBRARIES iphlpapi psapi shell32 userenv ws2_32)
+ if(TARGET LibUV::LibUV)
+ target_link_libraries(LibUV::LibUV INTERFACE iphlpapi psapi shell32 userenv ws2_32)
+ endif()
+endif()
+include(CMakeFindDependencyMacro)
+find_dependency(Threads)
+list(APPEND LibUV_LIBRARIES Threads::Threads)
+if(TARGET LibUV::LibUV)
+ target_link_libraries(LibUV::LibUV INTERFACE Threads::Threads)
+endif()
+
+