fhanau / Efficient-Compression-Tool

Fast and effective C++ file optimizer
Apache License 2.0
596 stars 41 forks source link

New makefile doesn't work in MSYS2 MinGW #70

Closed AlyoshaVasilieva closed 5 years ago

AlyoshaVasilieva commented 5 years ago

Mozjpeg's cmake will try to create an x86 Visual Studio project under x64 MinGW, leading to a build failure when make can't find a makefile.

I fixed it for my build by changing the cmake line:

mozjpeg:
        cd mozjpeg/; \
        export CC="$(CC)"; \
        cmake -G "Unix Makefiles" .; \
        make

but this would probably break other build systems.

fhanau commented 5 years ago

Thank you, I fixed it. I plan to test building on windows before making more build system changes. With the latest commit, msys makefiles will be used when building on windows. If you want to use MinGW without MSYS (which is probably broken anyway), modify the makefile to use '-G "MinGW Makefiles"'.