CMake in cross/compile Wine MSVC fails to perform initial compilations due to MT / sign
Linux Debian Buster CMake 3.13.4
I'm using approach described in MSVC in Wine(script with shc to run MSVC programs in Wine).
When CMake performs initial compilation (verification of C/CXX compilers) it fails during MT phase. I've discovered that it prepends all mt options with / sign. While mt - (ie. version 10.0.10011.16384 and 6.3.9600.17336) expects - sign. In CMake code I see that those / sign are hardcoded (like /nologo option) Then I modified above mentioned shc script so it will change / sign in calling command to - sign. Question is - how this pass on Windows? How to do it so it will pass on Linux in Wine without need of additional converting script? Second - If I don't use include_directories/link_directories in toolchain fail, those system libraries aren't included in CMake initial compilation during configuration phase. setting CMAKE_FIND_ROOT_PATH and CMAKE_FIND_ROOT_PATH_MODE_* doesn't help. How to do it more cleanly? Third - Obviously MT is taken only from PATH. I've noticed in code that --mt/rc= are parsed during vs_link_exe, but I couldn't find any information how to introduce them from outside. I see that CMAKE_RC_COMPILER is used in CMake 3.14+, yet there's no CMAKE_MT_COMPILER for cross-compilation cases.