[Qt-creator] {macOS} Where to set CMAKE_MAKE_PROGRAM?

Eike Ziller Eike.Ziller at qt.io
Wed Apr 8 09:15:41 CEST 2020



> On Apr 7, 2020, at 21:39, Andy <asmaloney at gmail.com> wrote:
> 
> (Using Qt Creator 4.11.2)
> 
> I've recently switched to building with ninja. I have it installed using homebrew and it is in my PATH.
> 
> When I try to set up a cmake-based project with Creator, I get this:
> 
> CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
> 
> I found this bug report, but it is closed and doesn't seem to provide a solution:
> 
> https://bugreports.qt.io/browse/QTCREATORBUG-17566
> 
> I have tried setting CMAKE_MAKE_PROGRAM in my kit's "Environment", but that didn't do anything.
> 
> Where am I supposed to set this so Creator can find ninja?

The issue here is that macOS uses different environments for applications started from Finder / Spotlight / Dock, than what you get in Terminal.
There are multiple possible solutions to your issue:

- Run Qt Creator from the Terminal environment. E.g. open Terminal, run “open ~/path/to/Qt\ Creator.app”.
- Set the PATH in your kit. In the environment setting of the Kit, add “PATH=/usr/local/bin:${PATH}”
- Set CMAKE_MAKE_PROGRAM in the kit’s cmake configuration. That’s at the bottom of the kit settings, “CMake Configuration”, where also CMAKE_CXX_COMPILER and other things are set.

You could also change the PATH or CMAKE_MAKE_PROGRAM in the corresponding settings in your project’s build configuration.

Br, Eike

-- 
Eike Ziller
Principal Software Engineer

The Qt Company GmbH
Erich-Thilo-Straße 10
D-12489 Berlin
eike.ziller at qt.io
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B



More information about the Qt-creator mailing list