I've been trying to build OpenCV-4.5.1 from source with CMake 3.20.0-rc3. I could run mingw32-make
after configuring and generating the files from cmake
, but this error always pops up when I try to run mingw32-make install
.
D:\build1>mingw32-make install
3rdparty/openjpeg/openjp2/CMakeFiles/libopenjp2.dir/compiler_depend.make:4: *** multiple target patterns. Stop.
mingw32-make[1]: *** [CMakeFiles\Makefile2:3433: 3rdparty/openjpeg/openjp2/CMakeFiles/libopenjp2.dir/all] Error 2
mingw32-make: *** [makefile:165: all] Error 2
I tried looking through the makefiles shown in the cmd but its really long and I have really no idea what to look into. From the google searches I've done it seems like it's to do with syntax error in the makefiles. Can you guys help me out with this?
Edit: first 5 lines of 3rdparty/openjpeg/openjp2/CMakeFiles/libopenjp2.dir/compiler_depend.make
# CMAKE generated file: DO NOT EDIT!
# Generated by "MinGW Makefiles" Generator, CMake Version 3.20
3rdparty/openjpeg/openjp2/CMakeFiles/libopenjp2.dir/bio.c.obj: C:/Users/XXXX/Downloads/opencv-4.5.1/3rdparty/openjpeg/openjp2/bio.c \
C\\:\\Users\\XXXX\\Downloads\\opencv-4.5.1\\3rdparty\\openjpeg\\openjp2\\bio.c \
C:
etc.) You should look through the instructions of the package for special instructions compiling on Windows. Most likely you'll need to use cygwin or some other UNIX-based environment, not cmd.com. – MadScientist3rdparty/openjpeg/openjp2/CMakeFiles/libopenjp2.dir/compiler_depend.make
(the error message refers exactly to that line). – Tsyvarev