diff options
author | dimdim11 <dimdim11@yandex-team.com> | 2024-08-19 10:27:36 +0300 |
---|---|---|
committer | dimdim11 <dimdim11@yandex-team.com> | 2024-08-19 10:39:53 +0300 |
commit | 5a0dda49c9caa747ff41bfd010bc95d2809a136b (patch) | |
tree | 913965bc6f1f2c76936fdf7830a56d3ce69109f6 | |
parent | 8cd355bb423ef1b67f07b50276100dadc92a1f2c (diff) | |
download | ydb-5a0dda49c9caa747ff41bfd010bc95d2809a136b.tar.gz |
Fix imports for Conan2
Fix imports for Conan2
5619216073dcb9297a4f22dbeb52a38cd8479eca
-rw-r--r-- | build/export_generators/cmake/conan_imports.jinja | 25 | ||||
-rw-r--r-- | build/export_generators/cmake/conanfile.py.jinja | 1 |
2 files changed, 23 insertions, 3 deletions
diff --git a/build/export_generators/cmake/conan_imports.jinja b/build/export_generators/cmake/conan_imports.jinja index 183db1531d..3674fe82ac 100644 --- a/build/export_generators/cmake/conan_imports.jinja +++ b/build/export_generators/cmake/conan_imports.jinja @@ -5,8 +5,29 @@ {%- set srcdir_and_mask = rsplit(search, ",", 2) -%} {%- set srcdir = srcdir_and_mask[0]|trim -%} {%- set mask = srcdir_and_mask[1]|trim -%} -{%- if use_conan2 %} - {{ shift }}copy(self, pattern="{{ mask }}", src=dep.cpp_info.bindirs[0], dst=self.build_folder + "../../../../{{ dstdir }}") +{%- if use_conan2 -%} +{%- if "bin" in srcdir %} + for bindir in dep.cpp_info.bindirs: + {{ shift }}copy(self, pattern="{{ mask }}", src=bindir, dst=self.build_folder + "../../../../{{ dstdir }}") +{%- elif "res" in srcdir %} + for resdir in dep.cpp_info.resdirs: + {{ shift }}copy(self, pattern="{{ mask }}", src=resdir, dst=self.build_folder + "../../../../{{ dstdir }}") +{%- elif "build" in srcdir %} + for builddir in dep.cpp_info.builddirs: + {{ shift }}copy(self, pattern="{{ mask }}", src=builddir, dst=self.build_folder + "../../../../{{ dstdir }}") +{%- elif ("src" in srcdir) or ("source" in srcdir) %} + for srcdir in dep.cpp_info.srcdirs: + {{ shift }}copy(self, pattern="{{ mask }}", src=srcdir, dst=self.build_folder + "../../../../{{ dstdir }}") +{%- elif "lib" in srcdir %} + for libdir in dep.cpp_info.libdirs: + {{ shift }}copy(self, pattern="{{ mask }}", src=libdir, dst=self.build_folder + "../../../../{{ dstdir }}") +{%- elif "include" in srcdir %} + for includedir in dep.cpp_info.includedirs: + {{ shift }}copy(self, pattern="{{ mask }}", src=includedir, dst=self.build_folder + "../../../../{{ dstdir }}") +{%- elif "frame" in srcdir %} + for framedir in dep.cpp_info.frameworkdirs: + {{ shift }}copy(self, pattern="{{ mask }}", src=framedir, dst=self.build_folder + "../../../../{{ dstdir }}") +{%- endif -%} {%- else %} {{ shift }}self.copy(pattern="{{ mask }}", src="{{ srcdir }}", dst="{{ dstdir }}") {%- endif -%} diff --git a/build/export_generators/cmake/conanfile.py.jinja b/build/export_generators/cmake/conanfile.py.jinja index 86aca44c79..29f9a17c83 100644 --- a/build/export_generators/cmake/conanfile.py.jinja +++ b/build/export_generators/cmake/conanfile.py.jinja @@ -75,7 +75,6 @@ class App(ConanFile): {%- endfor %} for dep in self.dependencies.values(): - if dep.cpp_info.bindirs: {%- if conan.imports|length -%} {%- set conan_imports = conan.imports -%} {%- set shift = "" -%} |