| 3087 | } |
| 3088 | |
| 3089 | bool FindCMakeResourcesInInstallTree(std::string const& exe_dir) |
| 3090 | { |
| 3091 | // Install tree has |
| 3092 | // - "<prefix><CMAKE_BIN_DIR>/cmake" |
| 3093 | // - "<prefix><CMAKE_DATA_DIR>" |
| 3094 | // - "<prefix><CMAKE_DOC_DIR>" |
| 3095 | if (cmHasLiteralSuffix(exe_dir, CMAKE_BIN_DIR)) { |
| 3096 | std::string const prefix = |
| 3097 | exe_dir.substr(0, exe_dir.size() - cmStrLen(CMAKE_BIN_DIR)); |
| 3098 | // Set cmSystemToolsCMakeRoot set to the location expected in an |
| 3099 | // install tree, even if it does not exist, so that |
| 3100 | // cmake::AddCMakePaths can print the location in its error message. |
| 3101 | cmSystemToolsCMakeRoot = cmStrCat(prefix, CMAKE_DATA_DIR); |
| 3102 | if (cmSystemTools::FileExists( |
| 3103 | cmStrCat(cmSystemToolsCMakeRoot, "/Modules/CMake.cmake"))) { |
| 3104 | if (cmSystemTools::FileExists( |
| 3105 | cmStrCat(prefix, CMAKE_DOC_DIR "/html/index.html"))) { |
| 3106 | cmSystemToolsHTMLDoc = cmStrCat(prefix, CMAKE_DOC_DIR "/html"); |
| 3107 | } |
| 3108 | return true; |
| 3109 | } |
| 3110 | } |
| 3111 | return false; |
| 3112 | } |
| 3113 | |
| 3114 | void FindCMakeResourcesInBuildTree(std::string const& exe_dir) |
| 3115 | { |
no test coverage detected
searching dependent graphs…