Skip to content

Resolve "(build): install should not always copy header files (again)"

Description

This is an alternative solution to solve issues listed in #1255 (closed).

It consists in fully qualifying the export macros, by prefixing with the project. This removes the need to do any fancy pre-install processing phase on Windows.

Breaking change(s)

The drawback of this approach is that it requires an update of all header files:

  • to replace *_API macros with SIGHT_*_API macros
  • to prefix all config.hpp include directives with the sight folder as well, and thus to move the generated config.hpp in such include build folder, also to avoid conflicts in child projects. This requires a small update of sheldon.

These changes must also be brought on child repositories (already done).

Extra changes

  • Modules should not export anything, since it is forbidden to link with them;
  • However, for windows, at least one symbol needs to be exported otherwise the .lib is not generated. When running ninja, it keeps linking those libraries instead of returning "No work to do."
  • Consequently, all export macros were removed from services, and only the plugin class export some symbols.

How to test it?

Simply build. Merge-requests for child repositories are available.

Related issue(s)

Closes #1255 (closed)

Edited by Flavien BRIDAULT

Merge request reports