Re: Please help creating shared *and* static library with cmake
Hi,
On 04/08/2016 05:30 PM, Andreas Tille wrote:
> I need to package libsdsl[1] as some precondition for a Debian Med
> package. The default cmake build only creates a static library and I
> found a patch to create a shared library. But since library packages
> should include both I wonder how to get both shared and static library
> without doing to much tricky things.
in the "cgal" package I basically build the package twice:
override_dh_auto_configure-arch:
mkdir -p static
cd static && cmake .. -DBUILD_SHARED_LIBS=FALSE
mkdir -p shared
cd shared && cmake .. -DBUILD_SHARED_LIBS=TRUE -DCMAKE_SKIP_RPATH=TRUE
override_dh_auto_build-arch:
$(MAKE) $(NJOBS) -C static
$(MAKE) $(NJOBS) -C shared
override_dh_install-arch:
$(MAKE) -C static DESTDIR=$(CURDIR)/debian/tmp install
$(MAKE) -C shared DESTDIR=$(CURDIR)/debian/tmp install
Not sure what you mean with "found a patch to create a shared library". Are you
saying that your project files do not support -DBUILD_SHARED_LIBS?
Joachim
Reply to: