From 79e088a50d7fc57cf836d2af261f0b01897dc0e8 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Wed, 21 Sep 2022 14:05:14 +0200 Subject: [PATCH] (#13023) assimp: fix rapidjson discovery & link * fix discovery & link of rapidjson * remove requires workaroud in package_info() it has been fixed in conan 1.51.1 --- recipes/assimp/5.x/conanfile.py | 27 +------------------ .../patches/0001-unvendor-deps-5.0.x.patch | 4 +-- .../patches/0003-unvendor-deps-5.1.x.patch | 4 +-- .../patches/0004-unvendor-deps-5.1.6.patch | 4 +-- .../patches/0006-unvendor-deps-5.2.x.patch | 4 +-- 5 files changed, 9 insertions(+), 34 deletions(-) diff --git a/recipes/assimp/5.x/conanfile.py b/recipes/assimp/5.x/conanfile.py index b306ed9818cf2..0e423ced4847b 100644 --- a/recipes/assimp/5.x/conanfile.py +++ b/recipes/assimp/5.x/conanfile.py @@ -7,7 +7,7 @@ from conans import tools as tools_legacy import os -required_conan_version = ">=1.50.2 <1.51.0 || >=1.51.2" +required_conan_version = ">=1.51.2" class AssimpConan(ConanFile): @@ -282,28 +282,3 @@ def package_info(self): stdcpp_library = tools_legacy.stdcpp_library(self) if stdcpp_library: self.cpp_info.system_libs.append(stdcpp_library) - - # FIXME: shouldn't be necessary. - # It's a workaround to support conan v1 generators - self.cpp_info.requires.append("minizip::minizip") - self.cpp_info.requires.append("utfcpp::utfcpp") - if Version(self.version) < "5.1.0": - self.cpp_info.requires.append("irrxml::irrxml") - else: - self.cpp_info.requires.append("pugixml::pugixml") - if self._depends_on_kuba_zip: - self.cpp_info.requires.append("kuba-zip::kuba-zip") - if self._depends_on_poly2tri: - self.cpp_info.requires.append("poly2tri::poly2tri") - if self._depends_on_rapidjson: - self.cpp_info.requires.append("rapidjson::rapidjson") - if self._depends_on_zlib: - self.cpp_info.requires.append("zlib::zlib") - if self._depends_on_draco: - self.cpp_info.requires.append("draco::draco") - if self._depends_on_clipper: - self.cpp_info.requires.append("clipper::clipper") - if self._depends_on_stb: - self.cpp_info.requires.append("stb::stb") - if self._depends_on_openddlparser: - self.cpp_info.requires.append("openddl-parser::openddl-parser") diff --git a/recipes/assimp/5.x/patches/0001-unvendor-deps-5.0.x.patch b/recipes/assimp/5.x/patches/0001-unvendor-deps-5.0.x.patch index 6df76c40d3bc9..1445d96a11b7c 100644 --- a/recipes/assimp/5.x/patches/0001-unvendor-deps-5.0.x.patch +++ b/recipes/assimp/5.x/patches/0001-unvendor-deps-5.0.x.patch @@ -110,7 +110,7 @@ - INCLUDE_DIRECTORIES( "../contrib/rapidjson/include" ) - INCLUDE_DIRECTORIES( "../contrib" ) + if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ find_package(rapidjson REQUIRED CONFIG) ++ find_package(RapidJSON REQUIRED CONFIG) + endif() ENDIF(HUNTER_ENABLED) @@ -158,7 +158,7 @@ + target_link_libraries(assimp zip::zip) + endif() + if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ target_link_libraries(assimp rapidjson::rapidjson) ++ target_link_libraries(assimp rapidjson) + endif() ENDIF(HUNTER_ENABLED) diff --git a/recipes/assimp/5.x/patches/0003-unvendor-deps-5.1.x.patch b/recipes/assimp/5.x/patches/0003-unvendor-deps-5.1.x.patch index e5355147d8c36..fdd67862ddb24 100644 --- a/recipes/assimp/5.x/patches/0003-unvendor-deps-5.1.x.patch +++ b/recipes/assimp/5.x/patches/0003-unvendor-deps-5.1.x.patch @@ -198,7 +198,7 @@ ELSE() - INCLUDE_DIRECTORIES("../contrib/rapidjson/include") + if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ find_package(rapidjson REQUIRED CONFIG) ++ find_package(RapidJSON REQUIRED CONFIG) + endif() ADD_DEFINITIONS( -DRAPIDJSON_HAS_STDSTRING=1) option( ASSIMP_RAPIDJSON_NO_MEMBER_ITERATOR "Suppress rapidjson warning on MSVC (NOTE: breaks android build)" ON ) @@ -288,7 +288,7 @@ + target_link_libraries(assimp openddlparser::openddlparser) + endif() + if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ target_link_libraries(assimp rapidjson::rapidjson) ++ target_link_libraries(assimp rapidjson) + endif() + if(ASSIMP_BUILD_M3D_IMPORTER OR ASSIMP_BUILD_M3D_EXPORTER OR ASSIMP_BUILD_PBRT_EXPORTER) + target_link_libraries(assimp stb::stb) diff --git a/recipes/assimp/5.x/patches/0004-unvendor-deps-5.1.6.patch b/recipes/assimp/5.x/patches/0004-unvendor-deps-5.1.6.patch index 5e1a3a2bcfaf2..67d2f67fd3661 100644 --- a/recipes/assimp/5.x/patches/0004-unvendor-deps-5.1.6.patch +++ b/recipes/assimp/5.x/patches/0004-unvendor-deps-5.1.6.patch @@ -185,7 +185,7 @@ ELSE() - INCLUDE_DIRECTORIES("../contrib/rapidjson/include") + if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ find_package(rapidjson REQUIRED CONFIG) ++ find_package(RapidJSON REQUIRED CONFIG) + endif() ADD_DEFINITIONS( -DRAPIDJSON_HAS_STDSTRING=1) option( ASSIMP_RAPIDJSON_NO_MEMBER_ITERATOR "Suppress rapidjson warning on MSVC (NOTE: breaks android build)" ON ) @@ -275,7 +275,7 @@ + target_link_libraries(assimp openddlparser::openddlparser) + endif() + if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ target_link_libraries(assimp rapidjson::rapidjson) ++ target_link_libraries(assimp rapidjson) + endif() + if(ASSIMP_BUILD_M3D_IMPORTER OR ASSIMP_BUILD_M3D_EXPORTER OR ASSIMP_BUILD_PBRT_EXPORTER) + target_link_libraries(assimp stb::stb) diff --git a/recipes/assimp/5.x/patches/0006-unvendor-deps-5.2.x.patch b/recipes/assimp/5.x/patches/0006-unvendor-deps-5.2.x.patch index 3fc4c7ba34b08..2a1e7bc39e620 100644 --- a/recipes/assimp/5.x/patches/0006-unvendor-deps-5.2.x.patch +++ b/recipes/assimp/5.x/patches/0006-unvendor-deps-5.2.x.patch @@ -185,7 +185,7 @@ ELSE() - INCLUDE_DIRECTORIES("../contrib/rapidjson/include") + if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ find_package(rapidjson REQUIRED CONFIG) ++ find_package(RapidJSON REQUIRED CONFIG) + endif() ADD_DEFINITIONS( -DRAPIDJSON_HAS_STDSTRING=1) option( ASSIMP_RAPIDJSON_NO_MEMBER_ITERATOR "Suppress rapidjson warning on MSVC (NOTE: breaks android build)" ON ) @@ -275,7 +275,7 @@ + target_link_libraries(assimp openddlparser::openddlparser) + endif() + if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ target_link_libraries(assimp rapidjson::rapidjson) ++ target_link_libraries(assimp rapidjson) + endif() + if(ASSIMP_BUILD_M3D_IMPORTER OR ASSIMP_BUILD_M3D_EXPORTER OR ASSIMP_BUILD_PBRT_EXPORTER) + target_link_libraries(assimp stb::stb)