From e87d6507b8f372432e17b9e6dd8d0afd3ca6d5c7 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Tue, 18 Apr 2023 22:19:08 +0200 Subject: [PATCH] add AWS_HTTP_USE_IMPORT_EXPORT interface definition if shared --- recipes/aws-c-http/all/conanfile.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/recipes/aws-c-http/all/conanfile.py b/recipes/aws-c-http/all/conanfile.py index 5f4b5242c4dbe..704def9f36c27 100644 --- a/recipes/aws-c-http/all/conanfile.py +++ b/recipes/aws-c-http/all/conanfile.py @@ -80,17 +80,21 @@ def package_info(self): self.cpp_info.set_property("cmake_file_name", "aws-c-http") self.cpp_info.set_property("cmake_target_name", "AWS::aws-c-http") + # TODO: back to global scope in conan v2 + self.cpp_info.components["aws-c-http-lib"].libs = ["aws-c-http"] + if self.options.shared: + self.cpp_info.components["aws-c-http-lib"].defines.append("AWS_HTTP_USE_IMPORT_EXPORT") + + # TODO: to remove in conan v2 self.cpp_info.filenames["cmake_find_package"] = "aws-c-http" self.cpp_info.filenames["cmake_find_package_multi"] = "aws-c-http" self.cpp_info.names["cmake_find_package"] = "AWS" self.cpp_info.names["cmake_find_package_multi"] = "AWS" - self.cpp_info.components["aws-c-http-lib"].set_property("cmake_target_name", "AWS::aws-c-http") self.cpp_info.components["aws-c-http-lib"].names["cmake_find_package"] = "aws-c-http" self.cpp_info.components["aws-c-http-lib"].names["cmake_find_package_multi"] = "aws-c-http" - self.cpp_info.components["aws-c-http-lib"].libs = ["aws-c-http"] self.cpp_info.components["aws-c-http-lib"].requires = [ - "aws-c-common::aws-c-common-lib", - "aws-c-compression::aws-c-compression-lib", - "aws-c-io::aws-c-io-lib" + "aws-c-common::aws-c-common", + "aws-c-compression::aws-c-compression", + "aws-c-io::aws-c-io", ]