Fix generating main resources srcdir != builddir