Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tl-function-ref: modernize #9158

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions recipes/tl-function-ref/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from conans import ConanFile, tools
import os

required_conan_version = ">=1.33.0"
required_conan_version = ">=1.43.0"


class TlfunctionrefConan(ConanFile):
Expand All @@ -11,7 +11,7 @@ class TlfunctionrefConan(ConanFile):
topics = ("function_ref", "callable")
homepage = "https://github.com/TartanLlama/function_ref"
url = "https://github.com/conan-io/conan-center-index"
settings = "compiler"
settings = "os", "arch", "compiler", "build_type"
no_copy_source = True

@property
Expand All @@ -34,9 +34,14 @@ def package(self):
self.copy("*", dst="include", src=os.path.join(self._source_subfolder, "include"))

def package_info(self):
self.cpp_info.set_property("cmake_file_name", "tl-function-ref")
self.cpp_info.set_property("cmake_target_name", "tl::function-ref")

# TODO: to remove in conan v2 once cmake_find_package* generators removed
self.cpp_info.filenames["cmake_find_package"] = "tl-function-ref"
self.cpp_info.filenames["cmake_find_package_multi"] = "tl-function-ref"
self.cpp_info.names["cmake_find_package"] = "tl"
self.cpp_info.names["cmake_find_package_multi"] = "tl"
self.cpp_info.components["function-ref"].names["cmake_find_package"] = "function-ref"
self.cpp_info.components["function-ref"].names["cmake_find_package_multi"] = "function-ref"
self.cpp_info.components["function-ref"].set_property("cmake_target_name", "tl::function-ref")
2 changes: 1 addition & 1 deletion recipes/tl-function-ref/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)