Skip to content

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

Description

This prevents rebuilding a child repository each time sight is installed. To achieve this, a custom target was added to generate the library headers without *_API macros in the build folder, and then copy these at install. Previously, we modified the files directly in the install folders, which led to always modify the timestamp of the headers, thus triggering the rebuild.

How to test it?

  • Install Sight
  • Build your project
  • Install Sight again: in the log, observe header files are not copied and marked as already up-to-date
  • Build your project again: observe nothing is rebuilt
  • Modify one header of Sight in a library
  • Install Sight again: in the log, look for your header and observe only this file is installed and the other are marked as already up-to-date

Related issue(s)

Closes #1255 (closed)

Merge request reports