diff --git a/recipes/uvw/all/conandata.yml b/recipes/uvw/all/conandata.yml index 4130a1aca6e4bb..f854a4bf389272 100644 --- a/recipes/uvw/all/conandata.yml +++ b/recipes/uvw/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.1.0": + url: "https://github.com/skypjack/uvw/archive/v3.1.0_libuv_v1.45.tar.gz" + sha256: "0a612bd243150fbbe1365cdaf48203d32061c1d14f93825a31876b183922f93b" "2.12.1": url: "https://github.com/skypjack/uvw/archive/v2.12.1_libuv_v1.44.tar.gz" sha256: "3460842778e91e7d2fae4201e49e4521e9d94fbbf3891ae6c52d3c9fc0673598" diff --git a/recipes/uvw/all/conanfile.py b/recipes/uvw/all/conanfile.py index 6b312583aebcd6..80186b62e3cfae 100644 --- a/recipes/uvw/all/conanfile.py +++ b/recipes/uvw/all/conanfile.py @@ -13,13 +13,13 @@ class UvwConan(ConanFile): name = "uvw" description = "Header-only, event based, tiny and easy to use libuv wrapper in modern C++." - topics = ("libuv", "io", "networking", "header-only",) license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/skypjack/uvw" + topics = ("libuv", "io", "networking", "header-only",) package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" no_copy_source = True - settings = "compiler" @property def _min_cppstd(self): @@ -29,6 +29,7 @@ def _min_cppstd(self): def _compilers_minimum_version(self): return { "Visual Studio": "15", + "msvc": "191", "gcc": "7", "clang": "5", "apple-clang": "10", @@ -37,6 +38,7 @@ def _compilers_minimum_version(self): @property def _required_libuv_version(self): return { + "3.1.0": "1.45.0", "2.12.1": "1.44.2", "2.11.0": "1.43.0", "2.10.0": "1.42.0", diff --git a/recipes/uvw/all/test_package/CMakeLists.txt b/recipes/uvw/all/test_package/CMakeLists.txt index 2040ab68d4259d..1bad80ec9ab42b 100644 --- a/recipes/uvw/all/test_package/CMakeLists.txt +++ b/recipes/uvw/all/test_package/CMakeLists.txt @@ -1,8 +1,11 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.8) +project(test_package LANGUAGES CXX) find_package(uvw REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} uvw::uvw) +target_link_libraries(${PROJECT_NAME} PRIVATE uvw::uvw) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +if(uvw_VERSION VERSION_GREATER_EQUAL "3.0.0") + target_compile_definitions(${PROJECT_NAME} PRIVATE UVW_API_3_0) +endif() diff --git a/recipes/uvw/all/test_package/test_package.cpp b/recipes/uvw/all/test_package/test_package.cpp index 79042982db2f22..864863c297929e 100644 --- a/recipes/uvw/all/test_package/test_package.cpp +++ b/recipes/uvw/all/test_package/test_package.cpp @@ -1,5 +1,9 @@ #include int main() { +#ifdef UVW_API_3_0 + uvw::loop::get_default(); +#else uvw::Loop::getDefault(); +#endif } diff --git a/recipes/uvw/config.yml b/recipes/uvw/config.yml index 92580e1d6336d8..e703f58ea9d085 100644 --- a/recipes/uvw/config.yml +++ b/recipes/uvw/config.yml @@ -1,4 +1,6 @@ versions: + "3.1.0": + folder: "all" "2.12.1": folder: "all" "2.11.0":