From 9e8866a2951d0bb73311d86f9cd11d2bcfdb4ac2 Mon Sep 17 00:00:00 2001 From: psyinf Date: Tue, 8 Nov 2022 22:51:22 +0100 Subject: [PATCH] (#14075) Fixed psyinf-gmtl cmake setup * fixed gmtl cmake setup * updated package using CMake namespace and corrected version in CMakeLists * updated source ref --- recipes/psyinf-gmtl/all/conandata.yml | 2 +- recipes/psyinf-gmtl/all/conanfile.py | 7 +++++-- recipes/psyinf-gmtl/all/test_package/CMakeLists.txt | 2 +- recipes/psyinf-gmtl/all/test_v1_package/CMakeLists.txt | 4 ++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/recipes/psyinf-gmtl/all/conandata.yml b/recipes/psyinf-gmtl/all/conandata.yml index ff448e2751be9..42931963c125d 100644 --- a/recipes/psyinf-gmtl/all/conandata.yml +++ b/recipes/psyinf-gmtl/all/conandata.yml @@ -1,4 +1,4 @@ sources: "0.7.1": url: "https://github.com/psyinf/gmtl/archive/refs/tags/0.7.1.tar.gz" - sha256: "64e36b8c41b1829933921cd5a2f2825111840010b6d0e3aaa82c023c8fd7ebd5" + sha256: "e7fbc98d8714251655c1f2ab60d35500ca6c1c57e4887419c99ffb4a49fc5030" diff --git a/recipes/psyinf-gmtl/all/conanfile.py b/recipes/psyinf-gmtl/all/conanfile.py index dfdf4b08eb11f..11203a16c2294 100644 --- a/recipes/psyinf-gmtl/all/conanfile.py +++ b/recipes/psyinf-gmtl/all/conanfile.py @@ -4,7 +4,7 @@ import os -required_conan_version = ">=1.52.0" +required_conan_version = ">=1.50.0" class PackageConan(ConanFile): @@ -39,8 +39,11 @@ def package(self): def package_info(self): self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] + self.cpp_info.names["cmake_find_package"] = "gmtl" + self.cpp_info.names["cmake_find_package_multi"] = "gmtl" + self.cpp_info.set_property("cmake_file_name", "gmtl") - self.cpp_info.set_property("cmake_target_name", "gmtl") + self.cpp_info.set_property("cmake_target_name", "gmtl::gmtl") self.cpp_info.set_property("pkg_config_name", "gmtl") diff --git a/recipes/psyinf-gmtl/all/test_package/CMakeLists.txt b/recipes/psyinf-gmtl/all/test_package/CMakeLists.txt index 774f46c194086..5bb1ba95fb7cc 100644 --- a/recipes/psyinf-gmtl/all/test_package/CMakeLists.txt +++ b/recipes/psyinf-gmtl/all/test_package/CMakeLists.txt @@ -5,4 +5,4 @@ project(test_package CXX) find_package(gmtl REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE gmtl) +target_link_libraries(${PROJECT_NAME} PRIVATE gmtl::gmtl) diff --git a/recipes/psyinf-gmtl/all/test_v1_package/CMakeLists.txt b/recipes/psyinf-gmtl/all/test_v1_package/CMakeLists.txt index 37a3e26d7064a..de05e55dc1517 100644 --- a/recipes/psyinf-gmtl/all/test_v1_package/CMakeLists.txt +++ b/recipes/psyinf-gmtl/all/test_v1_package/CMakeLists.txt @@ -5,7 +5,7 @@ project(test_package CXX) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -find_package(psyinf-gmtl REQUIRED CONFIG) +find_package(gmtl REQUIRED CONFIG) add_executable(${PROJECT_NAME} ../test_package/test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE psyinf-gmtl::psyinf-gmtl) +target_link_libraries(${PROJECT_NAME} PRIVATE gmtl::gmtl)