Use get_filename_component(… PATH), try changing file(RELATIVE_PATH …)