From 81549baff4a25da3d279e2a240d9878c04857270 Mon Sep 17 00:00:00 2001 From: Heiko Lewin Date: Thu, 16 Jun 2022 20:16:49 +0200 Subject: 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 --- Source/cmCoreTryCompile.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index 1e84a0b..dc58fef 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -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) { -- cgit v0.12