In my setup, the xrc resource file is generated from another file (wxformbuilder format) by a custom command, which calls wxformbuilder to convert it to xrc. This one is input to WXWIDGETS_ADD_RESOURCES.

Since WXWIDGETS_ADD_RESOURCES tries to read from xrc BEFORE it is created by wxformbuilder, an error occurs. The resource is not created because cmake is informed about the dependency at the end of the macro (in add_custom_command that calls wxrc). If I comment out the big foreach loop where the resource file is read, everything works fine, albeit now we don't have the dependency information of the files associated with the resource.

I cannot come with a solution to this with current cmake support. Ideally the call of file(READ ...) should trigger the file generation if it doesn't exist or its dependencies were modified. Is it reasonable to do it this way?

Regards,
rod

_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to