diff --git a/cmake/ConanInline.cmake b/cmake/ConanInline.cmake index 97692e08..375a96dc 100644 --- a/cmake/ConanInline.cmake +++ b/cmake/ConanInline.cmake @@ -50,9 +50,13 @@ macro(conan_setup) cmake_parse_arguments(MARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) - set(conanfile_cmake ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) set(conanfile_cmake_paths ${CMAKE_BINARY_DIR}/conan_paths.cmake) + set(conanfile_cmake ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) + if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/conanbuildinfo.cmake) + set(conanfile_cmake ${CMAKE_CURRENT_BINARY_DIR}/conanbuildinfo.cmake) + endif() + if(EXISTS "${conanfile_cmake_paths}") include(${conanfile_cmake_paths}) elseif(EXISTS "${conanfile_cmake}")