Skip to content

Toolchains don't find VS Ninja install #99

@aozgaa

Description

@aozgaa

Building on my Win10 machine yield errors like this for all generators:

CMake Error: CMake was unable to find a build program corresponding to "Ninja Multi-Config".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!
no such file or directory
CMake Error: Generator: execution of make failed. Make command was:  -f build-Debug.ninja
no such file or directory
CMake Error: Generator: execution of make failed. Make command was:  -f build-Release.ninja
no such file or directory
CMake Error: Generator: execution of make failed. Make command was:  -f build-RelWithDebInfo.ninja
Preset CMake variables:

This can be fixed by using the ninja.exe included with Visual Studio (Build Tools). On my machine with default install paths, it is located at:

 C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja\ninja.exe

Or in terms of the cmake variables in the toolchain files:

${VS_INSTALLATION_PATH}\\Common7\\IDE\\CommonExtensions\\Microsoft\\CMake\\Ninja

A sample patch that searches for the VS install of ninja is available at aozgaa@0ec36e1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions