[poppler] Fix building static libraries with cmake

suzuki toshiya mpsuzuki at hiroshima-u.ac.jp
Wed Jan 10 15:34:25 UTC 2018


Dear Albert,

Thank you for consideration about the archive library issue.

> So this patch doubles compilation time because everything is compiled twice?
> 
> I don't think i want that.

When poppler was built by autoconf, always (on the platform supporting
both of shared & archive libraries) a source was compiled twice, one
for shared and another for archive, because autoconf enables both libraries
by default. So I think this is not critical regression which has never
happened. Maybe it was very popular cases in 3 months ago.

But, if the majority of poppler maintainers are unwilling to make
"one-source-twice-compiling" as the default building (because they are
not interested in the archive library), I propose to include the switch
to compile archive libraries which is set to off by default. I think
even such switch (set to off by default) is still helpful.

Regards,
mpsuzuki

Albert Astals Cid wrote:
> El dimecres, 1 de novembre de 2017, a les 11:55:41 CET, Jeroen Ooms va 
> escriure:
>> Several projects use static builds of poppler-cpp to ship standalone
>> pdf applications, but since the switch to cmake it is no longer
>> possible to build static libs.
>>
>> Setting -DBUILD_SHARED_LIBS=OFF in cmake only builds a static
>> libpoppler.a, however libpoppler-cpp still gets built as a dynamic
>> library (because SHARED is hardcoded in CMakeLists.txt).
>>
>> It would be really great of cmake could build both the static and the
>> shared libraries, like many other C/C++ libs do. The patch below
>> implements this:
>>
>>   Human readable view:
>> https://github.com/tsdgeos/poppler_mirror/pull/2/files Patch file:
>> https://github.com/tsdgeos/poppler_mirror/pull/2.patch
>>
>> What can I do to get this patch reviewed?
> 
> So this patch doubles compilation time because everything is compiled twice?
> 
> I don't think i want that.
> 
> Cheers,
>   Albert
> 
>> _______________________________________________
>> poppler mailing list
>> poppler at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/poppler
> 
> 
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/poppler



More information about the poppler mailing list