Given the target moduletarget
add_library(moduletarget)
target_sources(moduletarget PUBLIC
FILE_SET module
TYPE CXX_MODULES
FILES "some/module/source.cppm")
installing the target will also install the libmoduletarget.a
artifact.
Given the still rather unstable nature of modules, I would prefer to instead just install the .cppm
file as normal and provide the moduletarget
target without installing the static/shared artifact, so that the consumer compiles the .cppm
themselves.
I did not find a way to have the install omit the ARCHIVE
or RUNTIME
artifacts, so would this be possible, or rather, is there a better approach?