build(cmake): install public headers with a header file set

- Add the public headers and the generated Version.h to the file set
  HEADERS of FairMQ
- Install the file set instead of one install(FILES) per header
- The file set gives the include directory include/fairmq; the exported
  target also adds it for CMake versions before 3.23
- The installed headers are the same

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-11-09 23:03:53 +00:00
committed by Dennis Klein
parent 230a614bb1
commit e2a150d9e8
2 changed files with 14 additions and 16 deletions

View File

@@ -217,8 +217,9 @@ The package does not export the example programs.
`FairMQ::FairMQ` gives these usage requirements to the targets that link to it:
- C++17 (`cxx_std_17`).
- The include directories `include/fairmq` and `include` of the prefix. Thus `#include <fairmq/Device.h>` and the deprecated `#include <FairMQDevice.h>` both work. See [Move from the FairMQ* names](/guides/migrate-names/).
- The include directories `include` and `include/fairmq` of the prefix. Thus `#include <fairmq/Device.h>` and the deprecated `#include <FairMQDevice.h>` both work. See [Move from the FairMQ* names](/guides/migrate-names/).
- The [compile definitions](#compile-definitions).
- The public headers in the header file set `HEADERS` of the target. IDEs and tools that read file sets can list them.
- The libraries `Threads::Threads`, `dl`, `rt` (Linux only), `Boost::headers`, `Boost::container`, `Boost::program_options`, `Boost::filesystem`, `Boost::regex` and `FairLogger::FairLogger`.
:::caution[Find the dependencies before you link]