MantisBT - CMake
View Issue Details
0014967CMakeCMakepublic2014-06-10 09:592016-06-10 14:31
Javier 
Kitware Robot 
normalmajoralways
closedmoved 
WindowsWindows7
CMake 2.8.12.2 
 
0014967: VS 2005 Generator for OBJECT target create name.rc.res object but the compiler generates name.res files
When I add an OBJECT target with an .rc file, the VS2005 generator adds the following in the .vcproj file:

<File RelativePath="something\BuildDLL.rc">
  <FileConfiguration Name="Debug|Win32">
    <Tool
       Name="VCResourceCompilerTool"
       ObjectFile="$(IntDir)/BuildDLL.rc.res"
     />

However, when building this target in VS, BuildDLL.rc is compiled into BuildDLL.res, so build fails because it can't find BuildDLL.rc.res.
1) Create an OBJECT target with a resource file, ie name.rc.
2) Generate a solution with VS2005 geneartor.
3) Build.
No tags attached.
Issue History
2014-06-10 09:59JavierNew Issue
2014-06-10 11:14Brad KingNote Added: 0036153
2016-06-10 14:29Kitware RobotNote Added: 0042564
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0036153)
Brad King   
2014-06-10 11:14   
It looks like resource files are not supported in OBJECT libraries in general. I just tried with the VS 12 2013 generator and it expects name.obj instead of name.res.

Just to make sure we're talking about the same thing, please provide an example CMakeLists.txt snippet producing the behavior you report.
(0042564)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.