MantisBT - CMake
View Issue Details
0012480CMakeCMakepublic2011-10-02 10:572012-07-09 06:52
Vladislav 
David Cole 
highblockalways
closedfixed 
host: Linux, target: Windows
CMake 2.8.5 
CMake 2.8.7CMake 2.8.7 
0012480: Cmake used invalid path to rc file.
At compiler MinGW usage at compilation of rc-files cmake uses a wrong way at which always there is a substring "/foCMakeFiles".

It arises because of usage in a file "/usr/share/cmake/Modules/CMakeRCInformation.cmake" parameters for the rc-compiler from Microsoft Visual Studio which isn't compatible with windres from MinGW.

For the problem resolution it is possible to use a patch "fix_rc_support_workaround.patch".
No tags attached.
has duplicate 0011773closed David Cole CMake ignore .RC files when cross building 
related to 0012870closed Kitware Robot CMakeDetermineRCCompiler does not correctly identify GNU windres when cross-compiling 
patch fix_rc_support_workaround.patch (779) 2011-10-02 10:57
https://public.kitware.com/Bug/file/4062/fix_rc_support_workaround.patch
Issue History
2011-10-02 10:57VladislavNew Issue
2011-10-02 10:57VladislavFile Added: fix_rc_support_workaround.patch
2011-10-03 10:36David ColeAssigned To => David Cole
2011-10-03 10:36David ColeStatusnew => assigned
2011-10-25 22:59David ColeTarget Version => CMake 2.8.7
2011-10-26 11:45David ColeNote Added: 0027655
2011-10-26 13:53VladislavNote Added: 0027656
2011-10-28 10:13David ColeRelationship addedhas duplicate 0011773
2011-12-13 20:04David ColeNote Added: 0027979
2011-12-13 20:04David ColeStatusassigned => resolved
2011-12-13 20:04David ColeResolutionopen => fixed
2011-12-16 17:19David ColeFixed in Version => CMake 2.8.7
2012-01-10 08:40David ColeRelationship addedrelated to 0012870
2012-07-09 06:52David ColeNote Added: 0029946
2012-07-09 06:52David ColeStatusresolved => closed

Notes
(0027655)
David Cole   
2011-10-26 11:45   
Modules/Platform/Windows-windres.cmake contains this line:

  SET(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <FLAGS> <DEFINES> <SOURCE> <OBJECT>")

Why is that not sufficient?

Is there a Linux windres? Do we also need a Linux-windres.cmake file, or is the Windows one supposed to be included in this scenario?

Alternatively, if your situation is unique in some way, you could provide this rule in a user rules override file...
(0027656)
Vladislav   
2011-10-26 13:53   
I am using cross compiling in openSUSE with MinGW.

The detailed analysis has shown has shown that the initiating patch was not absolutely true.

In MinGW windres can be named on a miscellaneous. On it the code:
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL) in file CMakeRCInformation.cmake can work not correctly, trying to include, for example "Platform/Windows-i686-w64-mingw32-windres".


Condition adding will be the correct fix:
IF("${CMAKE_BASE_NAME}" MATCHES "windres")
  SET(CMAKE_BASE_NAME "windres")
ENDIF("${CMAKE_BASE_NAME}" MATCHES "windres")
After a line "GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_RC_COMPILER} NAME_WE)".
(0027979)
David Cole   
2011-12-13 20:04   
Fix pushed to 'next':

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6ddb1e5b9a3eff941ad12d29609839871fe518ed [^]
(0029946)
David Cole   
2012-07-09 06:52   
Closing resolved issues that have not been updated in more than 4 months.