summaryrefslogtreecommitdiffstats
path: root/Source/cmFindProgramCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmFindProgramCommand.cxx')
-rw-r--r--Source/cmFindProgramCommand.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/cmFindProgramCommand.cxx b/Source/cmFindProgramCommand.cxx
index c2b7ca7..6ba97fb 100644
--- a/Source/cmFindProgramCommand.cxx
+++ b/Source/cmFindProgramCommand.cxx
@@ -97,8 +97,7 @@ std::string cmFindProgramCommand::FindProgram(std::vector<std::string> names)
{
std::string program = "";
- // First/last order taken care of in cmFindBase when the paths are setup.
- if(this->SearchAppBundleFirst || this->SearchAppBundleLast)
+ if(this->SearchAppBundleFirst || this->SearchAppBundleOnly)
{
program = FindAppBundle(names);
}
@@ -107,6 +106,10 @@ std::string cmFindProgramCommand::FindProgram(std::vector<std::string> names)
program = cmSystemTools::FindProgram(names, this->SearchPaths, true);
}
+ if(program.empty() && this->SearchAppBundleLast)
+ {
+ program = this->FindAppBundle(names);
+ }
return program;
}