package cmake build, shared and static libs
Hi all,
I'd like to create a library package using dh with CMake, and I would
like the build process to produce the library both statically and
dynamically linked.
CMake's rationale here is:
Recompile the whole thing, because:
"In practice, most libraries have different defines and compiler flags
for the shared vs. static cases. So you would have to build all your
library objects twice anyways."
<http://www.cmake.org/Wiki/CMake_FAQ#Can_I_build_both_shared_and_static_libraries_with_one_ADD_LIBRARY_command.3F>
There are ways for building both versions, but they involve either
(a) patching the CMake files of the package or
(b) calling cmake twice (with BUILD_SHARED_LIBS:ON and
BUILD_SHARED_LIBS:OFF, respectively).
Patching is certainly not preferable, so I guess I'll have to go with (b).
Are there other options?
This seems to be a rather common task. Is there (or should there) be
functionality for this in `dh`?
Cheers,
Nico
Reply to: