sliders_alpha
sliders_alpha

Reputation: 2454

Cmake : CMAKE_MAKE_PROGRAM is not set

I'm trying to build openCv, I never builded anything before.

I installed gcc in C:\MinGW with ftp://ftp.equation.com/gcc/gcc-7.1.0-64.exe now when I type 'gcc --version' in the command line, I get an awnser.

I then installed CMAKE from https://cmake.org/

I run the GUI and selected my source folder then hit 'configure' that when the error happens.

From my research I should have 'mingw64-make' in my path, it is not because when typing it in the command line produce "not recognized"

I search my drives with UltraSearch and it just returned this :

Name   Path    Size    Last Change File Type
x86_64-w64-mingw32-c++.exe  C:\MinGW\bin\   1,10 MB 11/10/2017  .exe (Application)
x86_64-w64-mingw32-g++.exe  C:\MinGW\bin\   1,10 MB 11/10/2017  .exe (Application)
x86_64-w64-mingw32-gcc-7.1.0.exe    C:\MinGW\bin\   1,10 MB 11/10/2017  .exe (Application)
x86_64-w64-mingw32-gcc-ar.exe   C:\MinGW\bin\   75,00 KB    11/10/2017  .exe (Application)
x86_64-w64-mingw32-gcc-nm.exe   C:\MinGW\bin\   74,50 KB    11/10/2017  .exe (Application)
x86_64-w64-mingw32-gcc-ranlib.exe   C:\MinGW\bin\   74,50 KB    11/10/2017  .exe (Application)
x86_64-w64-mingw32-gcc.exe  C:\MinGW\bin\   1,10 MB 11/10/2017  .exe (Application)
x86_64-w64-mingw32-gfortran.exe C:\MinGW\bin\   1,10 MB 11/10/2017  .exe (Application)

So it look like this mingw64-make is not present in the latest gcc release, what should I do?

Thanks.

Upvotes: 1

Views: 16792

Answers (1)

Darklighter
Darklighter

Reputation: 2192

A make tool – like mingw32-make – is an extra program which is not part of the compiler but is sometimes bundled together with it. In your case it isn’t and you have to get it explicitly.

I’d suggest using the msys2 environment because it allows easy access to everything you need (including the Ninja build system – a make replacement).

From the MINGW64 Shell install via e.g. pacman -S mingw-w64-x86_64-{toolchain,cmake,ninja}.

Then use cmake -G Ninja ….

You will also have mingw32-make.exe, but there is no good reason not to use Ninja with CMake when it’s available.


Alternatively you can obtain a copy of Visual Studio and use the NMake Makefiles… or Visual Studio… generators.

Upvotes: 2

Related Questions