[Cmake] Troubles figure out how to include .RES files for .NET

Bill Hoffman bill.hoffman at kitware.com
Mon Apr 28 09:13:49 EDT 2003


>
>I mostly meant that the SOURCE_FILES command seemed more convenient than
>using the SET command plus a SET_SOURCE_FILE_PROPERTIES command.
>
>While we're on the topic of convenience, it would  be nice if the
>SOURCE_FILES command took a wildcard. Sure, that can lead to accidently
>including extra files, but for the vast majority of the libraries I have to
>maintain, it would be a huge convenience.

You can use AUX_SOURCE_DIRECTORY for a wild card command.

>>
>
>Thanks, that works correctly (with the caveat that you either need to use
>the infamous SOURCE_FILES command instead of SET_SOURCE_FILE_PROPERTIES, or
>that there must be a missing line in the example that somehow adds "foo.rc"
>into the set of source files. I tried it with just
>SET_SOURCE_FILE_PROPERTIES, and that doesn't work.)

It is added here: 
ADD_LIBRARY(FOO foo.rc  foo.cxx) 

You could of course use a SET with the list, then pass the list
into SET_SOURCE_FILE_PROPERTIES.   I would stay clear of SOURCE_FILES as
we may remove it at some point in the future.

SET(RCLIST foo.rc )
SET_SOURCE_FILE_PROPERTIES(${RCLIST} GENERATED)


-Bill







More information about the CMake mailing list