MarkSchofield / WindowsToolchain

A repository containing a CMake toolchain for using MSVC
MIT License
106 stars 19 forks source link

Set CMAKE_RC_COMPILER_INIT - not CMAKE_RC_COMPILER #24

Closed MarkSchofield closed 2 years ago

MarkSchofield commented 2 years ago

Windows.Kits.cmake attempts to configure rc.exe as the resource compiler, but when using the Clang toolchain sometimes llvm-rc is used instead - as called out in #20. By setting CMAKE_RC_COMPILER_INIT (and not CMAKE_RC_COMPILER) rc.exe is used in all cases.

This issue was discovered when trying to get a CI Workflow setup (tracked by #22) since the CMAKE_RC_FLAGS_INIT variable is set to /nologo which llvm-rc doesn't support. The CI should provide some test coverage of this scenario.