[CMake] CMake & win32 rc files
Rolf Eike Beer
eike at sf-mail.de
Tue May 3 16:06:16 EDT 2011
Am Dienstag, 3. Mai 2011, 15:53:44 schrieb Gabriele Greco:
> I've seen that my win32 binaries crossbuilt with cmake do not have icons, so
>
> > I googled around for this problem and I found this:
> >
> > 0011773: CMake ignore .RC files when cross building
> >
> > It seems it's not yet solved, what I'm asking here if there is a
> > workaround, something like to build with a custom command the rc file (I
> > can do it), and then add it to the project binary with add_executable
> > (this doesn't work).
>
> Just to describe the problem with some additional details:
>
> I added to my CMakeLists.txt:
>
> add_custom_target(icon.o
> COMMAND ${CMAKE_RC_COMPILER} icon.rc icon.o
> DEPENDS monitor.ico
> SOURCES icon.rc
> )
>
> Then I tried to add it to the project both as "source" in add_executable(
> ... icon.o) (1), and as library in target_link_libraries (... icon.o) (2)
>
> CMake give the following error for (1):
>
> Cannot find source file "icon.o". Tried extensions .c .C .c++ .cc .cpp
> .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx
You should probably add it by ${CMAKE_CURRENT_BINARY_DIR}/icon.o
Eike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110503/3e5b6a4b/attachment.pgp>
More information about the CMake
mailing list