Add the generate_export_header command.

http://www.cmake.org/cmake/help/v3.0/module/GenerateExportHeader.html?highlight=generate_export_header