mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 20:53:02 +08:00
[libuv] add libuv for linux (#3437)
* [libuv] add libuv for linux [libuv] add linux in not skip header * inject VCPKG_CMAKE_SYSTEM_NAME, add darwin * remove message * [vlpp] Fix Linux build * Add VSCode workspace file to .gitignore [ci skip] * [imgui] Update to 1.60 * Update for ExprTk package * Update for StrTk package * Use CMAKE_EXECUTABLE_SUFFIX * FixpmdkFailure * Update sol2 to 2.20.0 * Improve unsupported toolchain error message * [brotli] Fix Linux build * [lz4] update to 1.8.2 * [lz4] fix version number [zstd] update to 1.3.4 * Update CHANGELOG and bump version to v0.0.111 * [ceres] Fix build on Linux. Closes #3490 * ace 6.4.8 * ports/ace/CONTROL: * ports/ace/portfile.cmake: * [abseil][aws-sdk-cpp][folly][jsonnet][ms-gsl][mujs][openimageio][re2][rs-core-lib][thrift][unicorn-lib][zeromq] Upgrades [robin-map] Initial commit * [sfml] update to 2.5.0 * Support azure-storage-cpp 4.0.0 * [catch-classic] Update to 1.12.2 * [bootstrap-vcpkg.sh] Find g++-8. Fixes #3486. * [boost-modular-build-helper] Pass address-model=64 on all 64-bit platforms. * [brotli][folly][sol] Fix regressions on master * [blosc] Fix accidentally using local vendored copies * [bootstrap.sh] Fix whitespace-in-path issues * [openvr] update to 1.0.15 * [rocksdb] fix zlib findpackage * [vcpkg] Significantly reduce usage of powershell. Reduce console font switching bug * Fix signature of hashing function * [openexr] Fix linux build * [curl] update to 7.60.0 * [wtl] Fix capitalization in file copy script * adding a blog link in the doc * [ps1] Add missing "include" * [vcpkg.exe] Don't error if vswhere.exe is not found * Fix typo * added ignore 4703 warning to fix uwp builds (#3279) * added ignore 4703 warning to fix uwp builds * [protobuf] Bump version to include patchfile * [vcpkg edit] Fix whitespace-in-path issue * Update CHANGELOG and bump version to v0.0.112 * [ps1] Fix error when vs140comntools is not available * [pmdk] Fix v140 requirement * [grpc] Fix uwp (#3281) * 2018.05.17 updates * [libuv] CMake simplification
This commit is contained in:
parent
0aad7df944
commit
15776d1d65
@ -2,24 +2,68 @@ cmake_minimum_required(VERSION 3.5)
|
||||
project(libuv C)
|
||||
|
||||
file(GLOB UV_SOURCES_COMMON src/*.c)
|
||||
|
||||
file(GLOB UV_SOURCES_UNIX
|
||||
src/unix/async.c
|
||||
src/unix/core.c
|
||||
src/unix/dl.c
|
||||
src/unix/fs.c
|
||||
src/unix/getaddrinfo.c
|
||||
src/unix/getnameinfo.c
|
||||
src/unix/loop.c
|
||||
src/unix/loop-watcher.c
|
||||
src/unix/pipe.c
|
||||
src/unix/poll.c
|
||||
src/unix/process.c
|
||||
src/unix/signal.c
|
||||
src/unix/stream.c
|
||||
src/unix/tcp.c
|
||||
src/unix/thread.c
|
||||
src/unix/timer.c
|
||||
src/unix/tty.c
|
||||
src/unix/udp.c
|
||||
src/unix/proctitle.c
|
||||
)
|
||||
file(GLOB UV_SOURCES_LINUX
|
||||
src/unix/linux-core.c
|
||||
src/unix/linux-inotify.c
|
||||
src/unix/linux-syscalls.c
|
||||
)
|
||||
file(GLOB UV_SOURCES_DARWIN
|
||||
src/unix/kqueue.c
|
||||
src/unix/darwin.c
|
||||
src/unix/fsevents.c
|
||||
src/unix/pthread-barrier.c
|
||||
src/unix/darwin-proctitle.c
|
||||
)
|
||||
file(GLOB UV_SOURCES_WIN src/win/*.c)
|
||||
|
||||
add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_WIN})
|
||||
target_compile_definitions(libuv PRIVATE WIN32_LEAN_AND_MEAN "_WIN32_WINNT=0x0600")
|
||||
target_link_libraries(libuv iphlpapi psapi shell32 userenv ws2_32)
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_WIN})
|
||||
target_compile_definitions(libuv PRIVATE WIN32_LEAN_AND_MEAN "_WIN32_WINNT=0x0600")
|
||||
target_link_libraries(libuv iphlpapi psapi shell32 userenv ws2_32)
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_UNIX} ${UV_SOURCES_DARWIN})
|
||||
else() # Assume some Linux variant
|
||||
add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_UNIX} ${UV_SOURCES_LINUX})
|
||||
endif()
|
||||
|
||||
target_include_directories(libuv PUBLIC ./include PRIVATE ./src)
|
||||
set_target_properties(libuv PROPERTIES DEFINE_SYMBOL BUILDING_UV_SHARED)
|
||||
|
||||
if(NOT UV_SKIP_HEADERS)
|
||||
install(FILES
|
||||
include/tree.h
|
||||
include/uv.h
|
||||
include/uv-version.h
|
||||
include/uv-errno.h
|
||||
include/uv-threadpool.h
|
||||
include/uv-win.h
|
||||
DESTINATION include)
|
||||
include/tree.h
|
||||
include/uv.h
|
||||
include/uv-version.h
|
||||
include/uv-errno.h
|
||||
include/uv-threadpool.h
|
||||
include/uv-win.h
|
||||
include/uv-unix.h
|
||||
include/uv-darwin.h
|
||||
DESTINATION include)
|
||||
endif()
|
||||
|
||||
install(TARGETS libuv
|
||||
RUNTIME DESTINATION bin
|
||||
ARCHIVE DESTINATION lib
|
||||
|
@ -1,3 +1,3 @@
|
||||
Source: libuv
|
||||
Version: 1.20.3
|
||||
Version: 1.20.3-1
|
||||
Description: libuv is a multi-platform support library with a focus on asynchronous I/O.
|
||||
|
@ -1,10 +1,12 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO libuv/libuv
|
||||
REF v1.20.3
|
||||
SHA512 60ebc0059ec9fdd022aa9d60b2a0340f29e037bf79fa08707f6f2ecca9ec263c7a6466bdc1f94e0875a6a627ee749efa86117dedb22119676a7bafed8b5d77a0
|
||||
HEAD_REF v1.x)
|
||||
HEAD_REF v1.x
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
@ -12,7 +14,8 @@ vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS_DEBUG
|
||||
-DUV_SKIP_HEADERS=ON)
|
||||
-DUV_SKIP_HEADERS=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
|
Loading…
Reference in New Issue
Block a user