[CMake] MingW Update for resource compilation.

J Decker d3ck0r at gmail.com
Sat Mar 6 10:17:37 EST 2010


On Fri, Mar 5, 2010 at 10:20 PM, J Decker <d3ck0r at gmail.com> wrote:
> All of the examples indicating ENABLE_LANGUAGE(RC) have the compiler
> set afterwards, and it turns out that the following lines work much
> better...
>
> I Added these to WIndows-GNU.cmake
>
> SET(CMAKE_RC_COMPILER "windres")
> SET(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> <DEFINES> -O
> coff -o <OBJECT> <SOURCE>")
> ENABLE_LANGUAGE(RC)
>
>
> by specifying -O coff, it outputs .obj format file containing the
> resources, and the link works.
>

This was working in my cygwin configurations also, but I can't test if
resource compilation under cygwin would work well with these.

> only thing that's really wrong with this is that <FLAGS> is the full
> set of C definitions, and it may be different with more or less in
> reality.
>


More information about the CMake mailing list