From e0e075df775c10b7238a8c86105504badde55334 Mon Sep 17 00:00:00 2001 From: Andrey Filipenkov Date: Sat, 22 Oct 2022 16:54:07 +0300 Subject: [PATCH] [Conan] save install folder to CMake variable --- cmake_modules/VCMIUtils.cmake | 2 +- conanfile.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake_modules/VCMIUtils.cmake b/cmake_modules/VCMIUtils.cmake index 50ace693d..55516601f 100644 --- a/cmake_modules/VCMIUtils.cmake +++ b/cmake_modules/VCMIUtils.cmake @@ -142,7 +142,7 @@ function(vcmi_install_conan_deps install_dir) endif() install(CODE " execute_process(COMMAND - conan imports \"${CMAKE_SOURCE_DIR}\" --install-folder \"${CMAKE_SOURCE_DIR}/conan-generated\" --import-folder \"${install_dir}\" + conan imports \"${CMAKE_SOURCE_DIR}\" --install-folder \"${CONAN_INSTALL_FOLDER}\" --import-folder \"${install_dir}\" ) file(REMOVE \"${install_dir}/conan_imports_manifest.txt\") ") diff --git a/conanfile.py b/conanfile.py index c733ab611..fd6108234 100644 --- a/conanfile.py +++ b/conanfile.py @@ -192,6 +192,7 @@ class VCMI(ConanFile): def generate(self): tc = CMakeToolchain(self) tc.variables["USING_CONAN"] = True + tc.variables["CONAN_INSTALL_FOLDER"] = self.install_folder tc.generate() deps = CMakeDeps(self)