开发者

CMake doesn't find windres.exe (MingW), CMAKE_RC_COMPILER

开发者 https://www.devze.com 2023-03-26 23:39 出处:网络
is there any specific reason why CMake doesn\'t find windres.exe from MingW as the RC compiler? The MingW dir is in my PATH variable, windres.exe does exist.

is there any specific reason why CMake doesn't find windres.exe from MingW as the RC compiler? The MingW dir is in my PATH variable, windres.exe does exist.

I always have to set the CMAKE_RC_COMPILER variable by hand to windres.exe in the cmake GUI.

After googling quite a while now, I only found out that more people have this problem, but I never found any real solution...

I have the latest cmake (2.8.5).

Only thing I found was: http://public.kitware.com/Bug/view.php?id=406开发者_C百科8 but the things describes there don't work for me.


One workaround is to edit the CMakeCache.txt

//RC compiler.
CMAKE_RC_COMPILER:FILEPATH=g:/dev/Rtools/MinGW/bin/windres.exe

(or whatever the path to your MinGW install happens to be)

Then run cmake again


For MinGW, use cmake -G "MinGW Makefiles" source-directory/

If you have MSYS installed, use cmake -G "MSYS Makefiles" source-directory/

No plumbing needed.


Many bug fixes have been merged into CMake related to "windres" since the 2.8.5 release.

Try using CMake 2.8.12 or later: it should work with windres "out of the box" at this point.

0

精彩评论

暂无评论...
验证码 换一张
取 消