1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-22 22:13:35 +02:00

[Conan] save install folder to CMake variable

This commit is contained in:
Andrey Filipenkov 2022-10-22 16:54:07 +03:00
parent d1ab611b4f
commit e0e075df77
2 changed files with 2 additions and 1 deletions

View File

@ -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\")
")

View File

@ -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)