Skip to content

Commit

Permalink
apply to 'cmake_paths' generator too
Browse files Browse the repository at this point in the history
  • Loading branch information
jgsogo committed Jan 7, 2020
1 parent c4d3d61 commit 1228ccb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions conans/client/generators/cmake_paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ def content(self):
# The CONAN_XXX_ROOT variables are needed because the FindXXX.cmake or XXXConfig.cmake
# in a package could have been "patched" with the `cmake.patch_config_paths()`
# replacing absolute paths with CONAN_XXX_ROOT variables.
for _, dep_cpp_info in self.deps_build_info.dependencies:
var_name = "CONAN_{}_ROOT".format(dep_cpp_info.get_name("cmake_paths").upper())
for name, dep_cpp_info in self.deps_build_info.dependencies:
var_name = "CONAN_{}_ROOT".format(dep_cpp_info.get_name("cmake_paths", name).upper())
lines.append('set({} {})'.format(var_name, DepsCppCmake(dep_cpp_info).rootpath))

# We want to prioritize the FindXXX.cmake files:
Expand Down
2 changes: 1 addition & 1 deletion conans/model/build_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def framework_paths(self):
return self._framework_paths

def get_name(self, generator, pkg_name=None):
fallback_name = self.name if generator not in ["cmake", "cmake_multi"] else pkg_name # FIXME: Remove in v1.22 (https://github.com/conan-io/conan/issues/6269#issuecomment-570182130)
fallback_name = self.name if generator not in ["cmake", "cmake_multi", "cmake_paths"] else pkg_name # FIXME: Remove in v1.22 (https://github.com/conan-io/conan/issues/6269#issuecomment-570182130)
return self.names.get(generator, fallback_name)

# Compatibility for 'cppflags' (old style property to allow decoration)
Expand Down

0 comments on commit 1228ccb

Please sign in to comment.