cmake-3.8 build failed with mingw-w64
Starting with cmake-3.8.0 building on mingw-w64 failed. cmake-3.8.1 also affected.
./bootstrap --parallel=5 --prefix=/mingw --system-libs --no-system-jsoncpp --no-qt-gui
...
g++ -I/build/cmake-3.8.1/Bootstrap.cmk -I/build/cmake-3.8.1/Source -I/build/cmake-3.8.1/Utilities -c /build/cmake-3.8.1/Source/cmFindFileCommand.cxx -o cmFindFileCommand.o
D:/msys2_x64/build/cmake-3.8.1/Source/cmFileCommand.cxx: In function 'std::__cxx11::string fix_file_url_windows(const string&)':
D:/msys2_x64/build/cmake-3.8.1/Source/cmFileCommand.cxx:84:29: error: 'CP_ACP' was not declared in this scope
WideCharToMultiByte(CP_ACP, 0, wurl.c_str(), -1, NULL, 0, NULL, NULL);
^~~~~~
D:/msys2_x64/build/cmake-3.8.1/Source/cmFileCommand.cxx:84:9: error: 'WideCharToMultiByte' was not declared in this scope
WideCharToMultiByte(CP_ACP, 0, wurl.c_str(), -1, NULL, 0, NULL, NULL);
^~~~~~~~~~~~~~~~~~~
g++ -I/build/cmake-3.8.1/Bootstrap.cmk -I/build/cmake-3.8.1/Source -I/build/cmake-3.8.1/Utilities -c /build/cmake-3.8.1/Source/cmFindLibraryCommand.cxx -o cmFindLibraryCommand.o
make: *** [Makefile:108: cmFileCommand.o] Ошибка 1
make: *** Ожидание завершения заданий…
Using:
- gcc-7.1.0, gcc-6.3.0
- mingw-w64-5.0.2
My version of patch in attachments.
P.S. I'm using my own build tool, than also install all necessary dependencies (including toolchain) for cmake (https://sourceforge.net/projects/mingwportage/). This tool is similar to gentoo's emerge.