Skip to content

Commit

Permalink
(conan-io#17790) uvw: add version 3.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
toge authored and pezy committed Jul 15, 2023
1 parent 6095865 commit 9d906e8
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
3 changes: 3 additions & 0 deletions recipes/uvw/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
6 changes: 4 additions & 2 deletions recipes/uvw/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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",
Expand All @@ -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",
Expand Down
9 changes: 6 additions & 3 deletions recipes/uvw/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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()
4 changes: 4 additions & 0 deletions recipes/uvw/all/test_package/test_package.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#include <uvw.hpp>

int main() {
#ifdef UVW_API_3_0
uvw::loop::get_default();
#else
uvw::Loop::getDefault();
#endif
}
2 changes: 2 additions & 0 deletions recipes/uvw/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"3.1.0":
folder: "all"
"2.12.1":
folder: "all"
"2.11.0":
Expand Down

0 comments on commit 9d906e8

Please sign in to comment.