install and export source only targets
I've got a C-dll (a dynamic library with a C interface) and for convenience (and prevent ABI incompatibilites) a C++ wrapper. The C++ wrapper-files (*.cpp, .hpp) as well as the C-dll (.so, or *.dll) are installed by cmake.
The boilerplate for the c++ wrapper is handled by CMake (generating
fooTargets.cmake etc). But currently I have to install the c++ wrapper files by hand (
install(FILES..))and create a target in the
foo-config.cmake.in file. The wrapper is a static library that can then be linked.
I'd like to have a way to define and install a target, that consists only of source files, that can either be added directly to the user target or will be built in the user project and can be linked against