diff --git a/recipes/aws-sdk-cpp/all/conandata.yml b/recipes/aws-sdk-cpp/all/conandata.yml index f47475c47e0b87..5e5940d87df8e6 100644 --- a/recipes/aws-sdk-cpp/all/conandata.yml +++ b/recipes/aws-sdk-cpp/all/conandata.yml @@ -9,6 +9,8 @@ patches: "1.9.100": - base_path: source_subfolder patch_file: patches/1.9.100-0001-disable-sort-links.patch + - base_path: source_subfolder + patch_file: patches/1.9.100-0002-aws-plugin-conf.patch "1.8.130": - base_path: source_subfolder patch_file: patches/1.8.130-0001-disable-sort-links.patch @@ -18,3 +20,5 @@ patches: patch_file: patches/1.8.130-0003-disable-cmake-install-rpath-use-link-path.patch - base_path: source_subfolder patch_file: patches/1.8.130-0004-improve-pulseaudio-detection.patch + - base_path: source_subfolder + patch_file: patches/1.8.130-0005-aws-plugin-conf.patch diff --git a/recipes/aws-sdk-cpp/all/conanfile.py b/recipes/aws-sdk-cpp/all/conanfile.py index 7e8c15f6278bec..b18f73d6326bce 100644 --- a/recipes/aws-sdk-cpp/all/conanfile.py +++ b/recipes/aws-sdk-cpp/all/conanfile.py @@ -412,6 +412,7 @@ def _create_project_cmake_module(self): "cmake/compiler_settings.cmake", "cmake/initialize_project_version.cmake", "cmake/utilities.cmake", + "cmake/sdk_plugin_conf.cmake", "toolchains/cmakeProjectConfig.cmake", "toolchains/pkg-config.pc.in", "aws-cpp-sdk-core/include/aws/core/VersionConfig.h" @@ -424,43 +425,6 @@ def _create_project_cmake_module(self): rename(self, os.path.join("toolchains", "cmakeProjectConfig.cmake"), os.path.join("toolchains", "cmakeProjectConf.cmake")) tools.replace_in_file(os.path.join("cmake", "utilities.cmake"), "cmakeProjectConfig.cmake", "cmakeProjectConf.cmake") - # create a cmake module to load the files above - contents = textwrap.dedent(""" - get_filename_component(AWS_NATIVE_SDK_ROOT ${CMAKE_CURRENT_LIST_DIR} DIRECTORY) - set(SIMPLE_INSTALL TRUE) - - if (CMAKE_INSTALL_BINDIR) - set(BINARY_DIRECTORY "${CMAKE_INSTALL_BINDIR}") - endif() - - if (CMAKE_INSTALL_LIBDIR) - set(LIBRARY_DIRECTORY "${CMAKE_INSTALL_LIBDIR}") - endif() - - if (CMAKE_INSTALL_INCLUDEDIR) - set(INCLUDE_DIRECTORY "${CMAKE_INSTALL_INCLUDEDIR}") - endif() - - if(BUILD_SHARED_LIBS) - set(ARCHIVE_DIRECTORY "${BINARY_DIRECTORY}") - else() - set(ARCHIVE_DIRECTORY "${LIBRARY_DIRECTORY}") - endif() - - if(DEFINED CMAKE_CXX_STANDARD) - set(STANDARD_DEFAULT ${CMAKE_CXX_STANDARD}) - else() - set(STANDARD_DEFAULT "11") - endif() - set(CPP_STANDARD ${STANDARD_DEFAULT} CACHE STRING "Flag to upgrade the C++ standard used. The default is 11. The minimum is 11.") - - include(CMakePackageConfigHelpers) - include(initialize_project_version) - include(utilities) - include(compiler_settings) - """) - tools.save(os.path.join(self.package_folder, self._res_folder, "cmake", "add_project.cmake"), content=contents) - def package(self): self.copy("LICENSE", dst="licenses", src=self._source_subfolder) cmake = self._configure_cmake() @@ -539,4 +503,4 @@ def package_info(self): self.cpp_info.components["plugin_scripts"].builddirs.extend([ os.path.join(self._res_folder, "cmake"), os.path.join(self._res_folder, "toolchains")]) - self.cpp_info.components["plugin_scripts"].build_modules.append(os.path.join(self._res_folder, "cmake", "add_project.cmake")) + self.cpp_info.components["plugin_scripts"].build_modules.append(os.path.join(self._res_folder, "cmake", "sdk_plugin_conf.cmake")) diff --git a/recipes/aws-sdk-cpp/all/patches/1.8.130-0005-aws-plugin-conf.patch b/recipes/aws-sdk-cpp/all/patches/1.8.130-0005-aws-plugin-conf.patch new file mode 100644 index 00000000000000..b3eccfe69cc45a --- /dev/null +++ b/recipes/aws-sdk-cpp/all/patches/1.8.130-0005-aws-plugin-conf.patch @@ -0,0 +1,44 @@ +commit 1179cb040d6b9292d30eb7d444298cd286f9f574 +Author: dvirtz +Date: Tue Nov 16 21:38:45 2021 +0200 + + add a file to configure SDK plugins + +diff --git a/cmake/sdk_plugin_conf.cmake b/cmake/sdk_plugin_conf.cmake +new file mode 100644 +index 0000000000..474ead75bd +--- /dev/null ++++ b/cmake/sdk_plugin_conf.cmake +@@ -0,0 +1,32 @@ ++get_filename_component(AWS_NATIVE_SDK_ROOT ${CMAKE_CURRENT_LIST_DIR} DIRECTORY) ++set(SIMPLE_INSTALL TRUE) ++ ++if (CMAKE_INSTALL_BINDIR) ++ set(BINARY_DIRECTORY "${CMAKE_INSTALL_BINDIR}") ++endif() ++ ++if (CMAKE_INSTALL_LIBDIR) ++ set(LIBRARY_DIRECTORY "${CMAKE_INSTALL_LIBDIR}") ++endif() ++ ++if (CMAKE_INSTALL_INCLUDEDIR) ++ set(INCLUDE_DIRECTORY "${CMAKE_INSTALL_INCLUDEDIR}") ++endif() ++ ++if(BUILD_SHARED_LIBS) ++ set(ARCHIVE_DIRECTORY "${BINARY_DIRECTORY}") ++else() ++ set(ARCHIVE_DIRECTORY "${LIBRARY_DIRECTORY}") ++endif() ++ ++if(DEFINED CMAKE_CXX_STANDARD) ++ set(STANDARD_DEFAULT ${CMAKE_CXX_STANDARD}) ++else() ++ set(STANDARD_DEFAULT "11") ++endif() ++set(CPP_STANDARD ${STANDARD_DEFAULT} CACHE STRING "Flag to upgrade the C++ standard used. The default is 11. The minimum is 11.") ++ ++include(CMakePackageConfigHelpers) ++include(initialize_project_version) ++include(utilities) ++include(compiler_settings) diff --git a/recipes/aws-sdk-cpp/all/patches/1.9.100-0002-aws-plugin-conf.patch b/recipes/aws-sdk-cpp/all/patches/1.9.100-0002-aws-plugin-conf.patch new file mode 100644 index 00000000000000..b3eccfe69cc45a --- /dev/null +++ b/recipes/aws-sdk-cpp/all/patches/1.9.100-0002-aws-plugin-conf.patch @@ -0,0 +1,44 @@ +commit 1179cb040d6b9292d30eb7d444298cd286f9f574 +Author: dvirtz +Date: Tue Nov 16 21:38:45 2021 +0200 + + add a file to configure SDK plugins + +diff --git a/cmake/sdk_plugin_conf.cmake b/cmake/sdk_plugin_conf.cmake +new file mode 100644 +index 0000000000..474ead75bd +--- /dev/null ++++ b/cmake/sdk_plugin_conf.cmake +@@ -0,0 +1,32 @@ ++get_filename_component(AWS_NATIVE_SDK_ROOT ${CMAKE_CURRENT_LIST_DIR} DIRECTORY) ++set(SIMPLE_INSTALL TRUE) ++ ++if (CMAKE_INSTALL_BINDIR) ++ set(BINARY_DIRECTORY "${CMAKE_INSTALL_BINDIR}") ++endif() ++ ++if (CMAKE_INSTALL_LIBDIR) ++ set(LIBRARY_DIRECTORY "${CMAKE_INSTALL_LIBDIR}") ++endif() ++ ++if (CMAKE_INSTALL_INCLUDEDIR) ++ set(INCLUDE_DIRECTORY "${CMAKE_INSTALL_INCLUDEDIR}") ++endif() ++ ++if(BUILD_SHARED_LIBS) ++ set(ARCHIVE_DIRECTORY "${BINARY_DIRECTORY}") ++else() ++ set(ARCHIVE_DIRECTORY "${LIBRARY_DIRECTORY}") ++endif() ++ ++if(DEFINED CMAKE_CXX_STANDARD) ++ set(STANDARD_DEFAULT ${CMAKE_CXX_STANDARD}) ++else() ++ set(STANDARD_DEFAULT "11") ++endif() ++set(CPP_STANDARD ${STANDARD_DEFAULT} CACHE STRING "Flag to upgrade the C++ standard used. The default is 11. The minimum is 11.") ++ ++include(CMakePackageConfigHelpers) ++include(initialize_project_version) ++include(utilities) ++include(compiler_settings)