diff options
author | Brad King <brad.king@kitware.com> | 2008-06-09 15:58:29 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-06-09 15:58:29 (GMT) |
commit | 6706f84cd997d39026080e47e4944072add7f925 (patch) | |
tree | e047d48fd75fbcb0a58f50fdffc3359226710c7e /Source/cmFindProgramCommand.cxx | |
parent | d53e5dec3748e1d800dae595dcb78f2c4d55f788 (diff) | |
download | CMake-6706f84cd997d39026080e47e4944072add7f925.zip CMake-6706f84cd997d39026080e47e4944072add7f925.tar.gz CMake-6706f84cd997d39026080e47e4944072add7f925.tar.bz2 |
ENH: Refactor find_* command framework/appbundle search order impl.
- CMAKE_FIND_FRAMEWORK and CMAKE_FIND_APPBUNDLE are supposed to specify
whether to find frameworks/appbundles FIRST, LAST, ONLY, or NEVER.
- Previously this affected only the placement of CMAKE_FRAMEWORK_PATH
and CMAKE_APPBUNDLE_PATH with respect to the other path specifiers.
- Now it behaves as documented. The entire search path is inspected for
each kind of program, library, or header before trying the next kind.
- Additionally the ONLY mode is now honored for headers so that users
do not end up with a library in framework and a header from elsewhere.
Diffstat (limited to 'Source/cmFindProgramCommand.cxx')
-rw-r--r-- | Source/cmFindProgramCommand.cxx | 7 |
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; } |