diff --git a/recipes/scc/all/conandata.yml b/recipes/scc/all/conandata.yml index a1a4747714b51d..a57987445327d1 100644 --- a/recipes/scc/all/conandata.yml +++ b/recipes/scc/all/conandata.yml @@ -1,8 +1,15 @@ sources: + "2023.06": + url: "https://github.com/Minres/SystemC-Components/releases/download/2023.06/SCC-2023.06-full.tar.gz" + sha256: "6d1a842f474daa512030d61526e83182f9289b977a3a7cb88ed151050c33c4e9" "2022.08": url: "https://github.com/Minres/SystemC-Components/releases/download/2022.08/systemc-components.tar.gz" sha256: "825dfc38e7b00df34330f01ba38f5913e1a88c5002344e433b972faf0e6c4501" patches: + "2023.06": + - patch_file: "patches/2023.06-fix-conan-targets.patch" + patch_description: "add find_package()-s and disable automatic Conan setup" + patch_type: "conan" "2022.08": - patch_file: "patches/2022.08-fix-conan-targets.patch" patch_description: "add find_package()-s and disable automatic Conan setup" diff --git a/recipes/scc/all/conanfile.py b/recipes/scc/all/conanfile.py index 569c5b19d3636f..a72cffea9b601f 100644 --- a/recipes/scc/all/conanfile.py +++ b/recipes/scc/all/conanfile.py @@ -49,12 +49,14 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("fmt/10.1.1") + self.requires("fmt/8.1.1") self.requires("zlib/1.2.13") self.requires("boost/1.83.0") self.requires("gsl-lite/0.41.0") self.requires("spdlog/1.12.0") self.requires("systemc/2.3.4") + if Version(self.version) >= "2023.06": + self.requires("yaml-cpp/0.8.0") def validate(self): if self.settings.compiler.get_safe("cppstd"): @@ -80,8 +82,10 @@ def generate(self): if self.settings.os == "Windows": tc.variables["SCC_LIMIT_TRACE_TYPE_LIST"] = True tc.generate() - tc = CMakeDeps(self) - tc.generate() + deps = CMakeDeps(self) + deps.set_property("systemc", "cmake_file_name", "SystemC") + deps.set_property("yaml-cpp", "cmake_target_name", "yaml-cpp::yaml-cpp") + deps.generate() def build(self): apply_conandata_patches(self) diff --git a/recipes/scc/all/patches/2022.08-fix-conan-targets.patch b/recipes/scc/all/patches/2022.08-fix-conan-targets.patch index c85291bd0f282b..a932458397b469 100644 --- a/recipes/scc/all/patches/2022.08-fix-conan-targets.patch +++ b/recipes/scc/all/patches/2022.08-fix-conan-targets.patch @@ -8,7 +8,7 @@ +find_package(fmt REQUIRED CONFIG) +find_package(spdlog REQUIRED CONFIG) +find_package(Boost REQUIRED CONFIG) -+find_package(systemc REQUIRED CONFIG) ++find_package(SystemC REQUIRED CONFIG) +if(TRUE) +elseif(CMAKE_PROJECT_NAME STREQUAL "scc") message(STATUS "Building SCC in standalone mode") diff --git a/recipes/scc/all/patches/2023.06-fix-conan-targets.patch b/recipes/scc/all/patches/2023.06-fix-conan-targets.patch new file mode 100644 index 00000000000000..6fd22d074bb473 --- /dev/null +++ b/recipes/scc/all/patches/2023.06-fix-conan-targets.patch @@ -0,0 +1,15 @@ +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -24,5 +24,11 @@ + include(Common) + +-if(CMAKE_PROJECT_NAME STREQUAL "scc") ++find_package(fmt REQUIRED CONFIG) ++find_package(spdlog REQUIRED CONFIG) ++find_package(Boost REQUIRED CONFIG) ++find_package(SystemC REQUIRED CONFIG) ++find_package(yaml-cpp REQUIRED CONFIG) ++if(TRUE) ++elseif(CMAKE_PROJECT_NAME STREQUAL "scc") + message(STATUS "Building SCC in standalone mode") + include(GNUInstallDirs) diff --git a/recipes/scc/config.yml b/recipes/scc/config.yml index f8b19962361c1e..7725c765a29827 100644 --- a/recipes/scc/config.yml +++ b/recipes/scc/config.yml @@ -1,3 +1,5 @@ versions: + "2023.06": + folder: all "2022.08": - folder: "all" + folder: all