This EXPORT stuff is buggy. Reporting to kitware, and will probably do this differently / more modularly later anyhow.