From 98fd9c2a1013f358da4cadc1e6a971bcafccfd23 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 3 Jan 2022 09:34:14 +0900 Subject: [PATCH] (#8596) zstr: add version 1.0.5 --- recipes/zstr/all/conandata.yml | 3 +++ recipes/zstr/all/conanfile.py | 4 ++-- recipes/zstr/all/test_package/CMakeLists.txt | 6 ++++-- recipes/zstr/all/test_package/conanfile.py | 4 ++-- recipes/zstr/config.yml | 2 ++ 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/recipes/zstr/all/conandata.yml b/recipes/zstr/all/conandata.yml index 553bc17b6dd49..8acc19410f565 100644 --- a/recipes/zstr/all/conandata.yml +++ b/recipes/zstr/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.5": + url: "https://github.com/mateidavid/zstr/archive/refs/tags/v1.0.5.tar.gz" + sha256: "c6ae65f1ed97f8fe2e9b0fa7d71a0980151e3936ec50d17403b8d233efa8276d" "1.0.4": url: "https://github.com/mateidavid/zstr/archive/refs/tags/v1.0.4.tar.gz" sha256: "a594a3a9c192a6d9e93f9585910d41f7ee6791eb7c454d40c922656324b3058e" diff --git a/recipes/zstr/all/conanfile.py b/recipes/zstr/all/conanfile.py index 547ef9dedb075..0ebaef1c69c26 100644 --- a/recipes/zstr/all/conanfile.py +++ b/recipes/zstr/all/conanfile.py @@ -8,7 +8,7 @@ class ZstrConan(ConanFile): name = "zstr" description = "A C++ header-only ZLib wrapper." license = "MIT" - topics = ("conan", "zstr", "zlib", "compression") + topics = ("zstr", "zlib", "compression") homepage = "https://github.com/mateidavid/zstr" url = "https://github.com/conan-io/conan-center-index" settings = "compiler" @@ -18,7 +18,7 @@ class ZstrConan(ConanFile): def _source_subfolder(self): return "source_subfolder" - def configure(self): + def validate(self): if self.settings.compiler.get_safe("cppstd"): tools.check_min_cppstd(self, 11) diff --git a/recipes/zstr/all/test_package/CMakeLists.txt b/recipes/zstr/all/test_package/CMakeLists.txt index 33ae887aa6aea..ed1a400183c92 100644 --- a/recipes/zstr/all/test_package/CMakeLists.txt +++ b/recipes/zstr/all/test_package/CMakeLists.txt @@ -2,8 +2,10 @@ cmake_minimum_required(VERSION 3.1) project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +conan_basic_setup(TARGETS) + +find_package(zstr CONFIG REQUIRED) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} zstr::zstr) set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/zstr/all/test_package/conanfile.py b/recipes/zstr/all/test_package/conanfile.py index 5216332f39f5c..38f4483872d47 100644 --- a/recipes/zstr/all/test_package/conanfile.py +++ b/recipes/zstr/all/test_package/conanfile.py @@ -4,7 +4,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake" + generators = "cmake", "cmake_find_package_multi" def build(self): cmake = CMake(self) @@ -12,6 +12,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): + if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") self.run(bin_path, run_environment=True) diff --git a/recipes/zstr/config.yml b/recipes/zstr/config.yml index c20e44b006f1a..267193202c4e1 100644 --- a/recipes/zstr/config.yml +++ b/recipes/zstr/config.yml @@ -1,3 +1,5 @@ versions: + "1.0.5": + folder: all "1.0.4": folder: all