[CMake] combining multiple build variants into the same package (and install prefix)
stefan
stefan at seefeld.name
Tue Nov 5 09:44:36 EST 2019
Hello,
I'm trying to repackage an upstream project that's using CMake. The
project is set up to allow me to specify whether to build shared or
static libs using the BUILD_SHARED_LIBS when invoking cmake. However,
rather than generating two separate packages for the two variants, I'd
like to combine both into a single package. The built artefacts
themselves allow that, as the only difference is that one variant
produces *.so files and the other *.a. Everything else (notably headers)
should be identical. This means I can join both into the same install
prefix.
The difficulty arises with the generated cmake helper files that define
the targets for downstream projects, as both build variant would
generate the same target names, but one referring to the shared libs,
the other to the static libs.
Is there a way to rename one set of exported target names to allow both
to co-exist without having to install the build variants into distinct
install prefixes ?
Thanks,
Stefan
--
...ich hab' noch einen Koffer in Berlin...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20191105/0e99055c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.png
Type: image/png
Size: 1478 bytes
Desc: not available
URL: <https://cmake.org/pipermail/cmake/attachments/20191105/0e99055c/attachment.png>
More information about the CMake
mailing list