[CMake] Compiling .rc file WITHOUT linking
Eric Lemings
eric at rebit.com
Fri Jan 16 12:25:53 EST 2009
Ted Berg wrote:
> Eric Lemings wrote:
>> Greetings,
>>
>> How do you compile a .rc file into a .res file without linking it into a
>> library or executable?
>>
>
> Your paths and rc options may vary:
>
> find_program( RC_EXECUTABLE NAMES rc )
> set( BINARY_RES_DIR ${PROJECT_BINARY_DIR}/resources )
>
> add_custom_command(
> OUTPUT ${BINARY_RES_DIR}/Resource.res
> COMMAND ${RC_EXECUTABLE} /l 0x409 /v
> /fo"${BINARY_RES_DIR}/Resource.res" ${PROJECT_SOURCE_DIR}/Resource.rc
> DEPENDS ${PROJECT_SOURCE_DIR}/Resource.rc
> )
>
> add_custom_target(
> build_resources
> DEPENDS ${BINARY_RES_DIR}/Resource.res
> )
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
Yep, I wound up doing much the same thing.
Eric.
More information about the CMake
mailing list