Thanks to visit codestin.com
Credit goes to github.com

Skip to content

dvetutnev/libuv-cmake

 
 

Repository files navigation

CMake build for libuv

Build status Build Status

This is not officically supported by the libuv project, and issues encountered using this should NOT be reported to the libuv upstream project - instead report issues here.

This repository contains a CMakeLists.txt capable of building libuv without requiring the use of Autotools or GYP. It may be of use to projects which use CMake and want to take a dependency on libuv without requiring switching build systems to GYP, or using an ExternalProject in CMake. It is of particular use for people wanting completion from an IDE such as CLion, which relies on CMake as the project file format.

It is currently known to work on Mac OS X, Linux and Windows.

The position from the UV maintainers appears to be that there will not be a supported CMake build added. I will try to maintain this as new stable versions of libuv are released, as it is used in my own projects. The current version is v1.12.0.

Usage

  • Add this repository as a submodules (libuv itself is pulled in as a submodule of this repository), or archive the contents of this repository and it's submodules and copy them into your own project.
  • Add lines similar to the following to your CMakeLists.txt file:
add_subdirectory(vendor/libuv-cmake)
include_directories(vendor/libuv-cmake/libuv/include)
  • The uv target is produced by the CMakeLists.txt file - it can be linked using the following:
target_link_libraries(my_target uv)
  • By default the tests and benchmarks for libuv are not built. To enable them, set the LIBUV_BUILD_TESTS option to ON.

Contributing

  • Please report issues to the issue tracker on this repository, and NOT to the upstream project.
  • Please open pull requests on this repository.

About

A CMake build for libuv

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CMake 100.0%