mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 13:51:33 -06:00
try_compile: Fix COPY_FILE with app-bundles on non-macOS hosts
Cross compiling from eg linux to apple-platforms requires handling of .app-Bundles. Fixes: #23597
This commit is contained in:
@@ -1117,7 +1117,8 @@ void cmCoreTryCompile::FindOutputFile(const std::string& targetName,
|
||||
searchDirs.emplace_back(std::move(tmp));
|
||||
}
|
||||
searchDirs.emplace_back("/Debug");
|
||||
#if defined(__APPLE__)
|
||||
|
||||
// handle app-bundles (for targeting apple-platforms)
|
||||
std::string app = "/" + targetName + ".app";
|
||||
if (cmNonempty(config)) {
|
||||
std::string tmp = cmStrCat('/', *config, app);
|
||||
@@ -1126,7 +1127,7 @@ void cmCoreTryCompile::FindOutputFile(const std::string& targetName,
|
||||
std::string tmp = "/Debug" + app;
|
||||
searchDirs.emplace_back(std::move(tmp));
|
||||
searchDirs.emplace_back(std::move(app));
|
||||
#endif
|
||||
|
||||
searchDirs.emplace_back("/Development");
|
||||
|
||||
for (std::string const& sdir : searchDirs) {
|
||||
|
||||
Reference in New Issue
Block a user