Merge resource file related changes from cmake branch part 2