[CMake] using `install()` with EXPORT and COMPONENT
Stefan Seefeld
stefan at seefeld.name
Sat Sep 28 16:38:02 EDT 2019
Hello,
I'm working on a library project that will be packaged in multiple
components. A "runtime" component will contain the (shared) library, an
a "dev" component the associated headers (and perhaps other
development-only artefacts).
I have successfully used the `install()` command to install these two
sets of artefacts, i.e. calling `install(... COMPONENT runtime)`, as
well as `install(... COMPONENT dev)`.
However, I'm now looking into calling `install(TARGETS ... EXPORT ...)`.
The documentation explains how the list of installed headerfiles can
actually be inferred from the target itself (if the
target_include_directories have been appropriately set). However, I
can't call that function more than once on the same target, and thus I
seem to have no way to split the installation into multiple components.
Does anyone know what I'm missing ? What is the suggested way to package
a project into the usual "runtime" and "dev" components ?
Many thanks,
Stefan
--
...ich hab' noch einen Koffer in Berlin...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20190928/5d228102/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .signature.png
Type: image/png
Size: 2754 bytes
Desc: not available
URL: <https://cmake.org/pipermail/cmake/attachments/20190928/5d228102/attachment.png>
More information about the CMake
mailing list