CMAKE/MingW VS2017 vcvarsall.bat problem
After switching to VS2017/Windows 10 the project I'm working on failed to generate a DLL file because libtool could not find the .DEF file.
After some research it turned out CMake calls vcvarsall.bat which changes the current directory to %USERPROFILE%\Source while the .DEF file is in the CMAKE_BINARY_DIR
Copying the file by hand to %USERPROFILE%\Source solves the problem but is not a long time solution.