summaryrefslogtreecommitdiffstats
path: root/Source/cmFindPackageCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmFindPackageCommand.cxx')
-rw-r--r--Source/cmFindPackageCommand.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index d1517fe..6f3e1d3 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -504,9 +504,7 @@ bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args)
case cmPolicies::NEW: {
// NEW behavior is to honor the <pkg>_ROOT variables.
std::string const rootVar = this->Name + "_ROOT";
- if (const char* pkgRoot = this->Makefile->GetDefinition(rootVar)) {
- cmExpandList(pkgRoot, rootPaths, false);
- }
+ this->Makefile->GetDefExpandList(rootVar, rootPaths, false);
cmSystemTools::GetPath(rootPaths, rootVar.c_str());
} break;
}