vcpkg/ports/libuv/CMakeLists.txt
Erwan BERNARD 15776d1d65 [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
2018-05-18 02:03:26 -07:00

71 lines
1.9 KiB
CMake

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)
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
include/uv-unix.h
include/uv-darwin.h
DESTINATION include)
endif()
install(TARGETS libuv
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib)