From a9caec4a927c5966409e1e0828a4b341fc865441 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Mon, 2 Mar 2020 14:17:24 +0100 Subject: [PATCH] CMake: Fix Ninja Multi-Config framework builds Depends on a new bleeding edge feature in as-of-yet unreleased CMake 3.18, that allows building macOS frameworks using the Ninja Multi-Config generator targeting more than one configuration. It uses the new CMAKE_FRAMEWORK_MULTI_CONFIG_POSTFIX_DEBUG property which tells CMake to create properly named debug artifacts in the Multi-Config ninja file. Without it, both debug and release artifacts would have the same location (no _debug) postfix, so it would be unclear which file ends up being compiled as last (the debug or release variant). Change-Id: I3e10832551731a18317da8f9667d96cec3dc3028 Reviewed-by: Simon Hausmann --- cmake/QtSetup.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/QtSetup.cmake b/cmake/QtSetup.cmake index 629c49e2e45..4b5e6328478 100644 --- a/cmake/QtSetup.cmake +++ b/cmake/QtSetup.cmake @@ -37,6 +37,7 @@ if(WIN32) set(CMAKE_DEBUG_POSTFIX "d") elseif(APPLE) set(CMAKE_DEBUG_POSTFIX "_debug") + set(CMAKE_FRAMEWORK_MULTI_CONFIG_POSTFIX_DEBUG "_debug") endif() ## Position independent code: