In case you're interested, the very similar Qt4Macro.cmake file (QT4_ADD_RESOURCES) that I based this off is found here: https://gitorious.org/cmake/cmake/source/c56854aa0e9ba08140fcf806008ea473b879a1c1:Modules/Qt4Macros.cmake#L205