View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0011773CMakeCCMakepublic2011-01-27 22:002012-07-09 06:52
ReporterDongsheng Song 
Assigned ToDavid Cole 
PriorityhighSeveritymajorReproducibilityalways
StatusclosedResolutionduplicate 
PlatformOSOS Version
Product Version 
Target VersionCMake 2.8.7Fixed in VersionCMake 2.8.7 
Summary0011773: CMake ignore .RC files when cross building
DescriptionFor example:

ADD_LIBRARY(freetds-ct SHARED freetds-ct.def freetds-ct.rc
        blk.c
        cs.c
        ct.c
        ctutil.c)

If I compile on Windows, CMake can use freetds-ct.rc, but when I do a cross compile on Linux:

CFLAGS="-m64" CXXFLAGS="-m64" LDFLAGS="-m64" RCFLAGS="-F pe-x86-64"\
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_C_COMPILER=i686-w64-mingw32-gcc

CMake ignore freetds-ct.rc silently.
TagsNo tags attached.
Attached Filespatch file icon fix_rc_support_workaround.patch [^] (779 bytes) 2011-09-07 11:14 [Show Content]

 Relationships
duplicate of 0012480closedDavid Cole Cmake used invalid path to rc file. 
related to 0012870closedKitware Robot CMakeDetermineRCCompiler does not correctly identify GNU windres when cross-compiling 

  Notes
(0025116)
Dongsheng Song (reporter)
2011-01-27 22:03

Sorry, the category should be 'CMake'.
(0026284)
Denis Pesotsky (reporter)
2011-04-28 19:57
edited on: 2011-04-28 21:33

Same here. Using following toolchain with cmake 2.8.4:

SET(CMAKE_SYSTEM_NAME Windows)

SET(CMAKE_C_COMPILER i486-mingw32-gcc)
SET(CMAKE_CXX_COMPILER i486-mingw32-g++)
SET(CMAKE_RC_COMPILER i486-mingw32-windres)

SET(CMAKE_FIND_ROOT_PATH /usr/i486-mingw32 /home/obey/mingw32 )

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

Following happens:

...
[100%] Building RC object src/CMakeFiles/../qfrost.dir/__/res/win_icon.rc.res
/usr/bin/i486-mingw32-windres: '/foCMakeFiles/../qfrost.dir/__/res/win_icon.rc.res': No such file
/usr/bin/i486-mingw32-windres: can't open `/foCMakeFiles/../qfrost.dir/__/res/win_icon.rc.res' for input
...

upd: uh, probably this is not related to this bag. WTF is /foCMakeFiles?

(0027392)
Vladislav (reporter)
2011-09-07 11:17

Workaround for "/foCMakeFiles" bug.
Use attached patch ("fix_rc_support_workaround.patch") to file "/usr/share/cmake/Modules/CMakeRCInformation.cmake".

To fix original bug, need setup variable CMAKE_RC_COMPILER.
(0027668)
David Cole (manager)
2011-10-28 10:13

Monitor the related Duplicate bug for further information on when this gets fixed... It is presently under investigation.
(0029947)
David Cole (manager)
2012-07-09 06:52

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2011-01-27 22:00 Dongsheng Song New Issue
2011-01-27 22:03 Dongsheng Song Note Added: 0025116
2011-04-28 19:57 Denis Pesotsky Note Added: 0026284
2011-04-28 20:14 Denis Pesotsky Note Edited: 0026284
2011-04-28 21:33 Denis Pesotsky Note Edited: 0026284
2011-09-07 11:14 Vladislav File Added: fix_rc_support_workaround.patch
2011-09-07 11:17 Vladislav Note Added: 0027392
2011-10-28 07:15 David Cole Target Version => CMake 2.8.7
2011-10-28 10:12 David Cole Assigned To => David Cole
2011-10-28 10:12 David Cole Status new => assigned
2011-10-28 10:13 David Cole Note Added: 0027668
2011-10-28 10:13 David Cole Relationship added duplicate of 0012480
2011-10-28 10:13 David Cole Status assigned => resolved
2011-10-28 10:13 David Cole Fixed in Version => CMake 2.8.7
2011-10-28 10:13 David Cole Resolution open => duplicate
2012-01-10 08:41 David Cole Relationship added related to 0012870
2012-07-09 06:52 David Cole Note Added: 0029947
2012-07-09 06:52 David Cole Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team