diff --git a/recipes/sol2/3.x.x/conandata.yml b/recipes/sol2/3.x.x/conandata.yml index 5a775c3a6b7fd..50a2646061989 100644 --- a/recipes/sol2/3.x.x/conandata.yml +++ b/recipes/sol2/3.x.x/conandata.yml @@ -1,16 +1,19 @@ sources: - "3.0.3": - url: "https://github.com/ThePhD/sol2/archive/v3.0.3.tar.gz" - sha256: "bf089e50387edfc70063e24fd7fbb693cceba4a50147d864fabedd1b33483582" - "3.2.0": - url: "https://github.com/ThePhD/sol2/archive/v3.2.0.tar.gz" - sha256: "733f03d82df6e0e8a15967831840d240dcb2c606982bec753bd173a9cc1b3435" - "3.2.1": - url: "https://github.com/ThePhD/sol2/archive/v3.2.1.tar.gz" - sha256: "b10f88dc1246f74a10348faef7d2c06e2784693307df74dcd87c4641cf6a6828" - "3.2.2": - url: "https://github.com/ThePhD/sol2/archive/v3.2.2.tar.gz" - sha256: "141790dae0c1821dd2dbac3595433de49ba72545845efc3ec7d88de8b0a3b2da" + "3.3.0": + url: "https://github.com/ThePhD/sol2/archive/v3.3.0.tar.gz" + sha256: "b82c5de030e18cb2bcbcefcd5f45afd526920c517a96413f0b59b4332d752a1e" "3.2.3": url: "https://github.com/ThePhD/sol2/archive/v3.2.3.tar.gz" sha256: "f74158f92996f476786be9c9e83f8275129bb1da2a8d517d050421ac160a4b9e" + "3.2.2": + url: "https://github.com/ThePhD/sol2/archive/v3.2.2.tar.gz" + sha256: "141790dae0c1821dd2dbac3595433de49ba72545845efc3ec7d88de8b0a3b2da" + "3.2.1": + url: "https://github.com/ThePhD/sol2/archive/v3.2.1.tar.gz" + sha256: "b10f88dc1246f74a10348faef7d2c06e2784693307df74dcd87c4641cf6a6828" + "3.2.0": + url: "https://github.com/ThePhD/sol2/archive/v3.2.0.tar.gz" + sha256: "733f03d82df6e0e8a15967831840d240dcb2c606982bec753bd173a9cc1b3435" + "3.0.3": + url: "https://github.com/ThePhD/sol2/archive/v3.0.3.tar.gz" + sha256: "bf089e50387edfc70063e24fd7fbb693cceba4a50147d864fabedd1b33483582" diff --git a/recipes/sol2/3.x.x/conanfile.py b/recipes/sol2/3.x.x/conanfile.py index 1965c7cdc0eba..d12e6df5494fc 100644 --- a/recipes/sol2/3.x.x/conanfile.py +++ b/recipes/sol2/3.x.x/conanfile.py @@ -2,15 +2,16 @@ from conans.errors import ConanInvalidConfiguration import os +required_conan_version = ">=1.33.0" class Sol2Conan(ConanFile): name = "sol2" + description = "a C++ <-> Lua API wrapper with advanced features and top notch performance" + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/ThePhD/sol2" - description = "C++17 Lua bindings" - topics = ("conan", "lua", "c++", "bindings") - settings = "compiler" - license = "MIT" + topics = ("lua", "c++", "bindings") + settings = "os", "arch", "compiler", "build_type" no_copy_source = True @property @@ -21,12 +22,12 @@ def _source_subfolder(self): def _compilers_minimum_version(self): return { "gcc": "7", - "Visual Studio": "15.7", + "Visual Studio": "15.7" if tools.Version(self.version) < "3.3.0" else "16", "clang": "6", "apple-clang": "10", } - def configure(self): + def validate(self): if self.settings.compiler.get_safe("cppstd"): tools.check_min_cppstd(self, "17") @@ -46,15 +47,17 @@ def lazy_lt_semver(v1, v2): self.settings.compiler.version)) def requirements(self): - self.requires("lua/5.3.5") + if tools.Version(self.version) < "3.2.0": + self.requires("lua/5.3.5") + else: + self.requires("lua/5.4.4") def package_id(self): self.info.header_only() def source(self): - tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = self.name + "-" + self.version - os.rename(extracted_dir, self._source_subfolder) + tools.get(**self.conan_data["sources"][self.version], + destination=self._source_subfolder, strip_root=True) def package(self): self.copy("LICENSE.txt", src=self._source_subfolder, dst="licenses") diff --git a/recipes/sol2/3.x.x/test_package/CMakeLists.txt b/recipes/sol2/3.x.x/test_package/CMakeLists.txt index 9adc910e1396d..4bba4f17aa534 100644 --- a/recipes/sol2/3.x.x/test_package/CMakeLists.txt +++ b/recipes/sol2/3.x.x/test_package/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.8) project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) @@ -7,5 +7,5 @@ conan_basic_setup(TARGETS) find_package(sol2 REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) target_link_libraries(${PROJECT_NAME} sol2::sol2) diff --git a/recipes/sol2/3.x.x/test_package/conanfile.py b/recipes/sol2/3.x.x/test_package/conanfile.py index 7e2dfe859bb27..38f4483872d47 100644 --- a/recipes/sol2/3.x.x/test_package/conanfile.py +++ b/recipes/sol2/3.x.x/test_package/conanfile.py @@ -3,7 +3,7 @@ class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" + settings = "os", "arch", "compiler", "build_type" generators = "cmake", "cmake_find_package_multi" def build(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/sol2/config.yml b/recipes/sol2/config.yml index 3d23ec464674f..192c933dc9f53 100644 --- a/recipes/sol2/config.yml +++ b/recipes/sol2/config.yml @@ -1,13 +1,15 @@ versions: - "2.20.6": - folder: "2.x.x" - "3.0.3": + "3.3.0": folder: "3.x.x" - "3.2.0": + "3.2.3": + folder: "3.x.x" + "3.2.2": folder: "3.x.x" "3.2.1": folder: "3.x.x" - "3.2.2": + "3.2.0": folder: "3.x.x" - "3.2.3": + "3.0.3": folder: "3.x.x" + "2.20.6": + folder: "2.x.x"