Hi,
On Sun, Apr 17, 2022 at 01:58:20PM -0700, geisserml <
geis...@gmail.com> wrote:
> Could you please explain how you are able to build pdfium with
> system-provided ICU?
We (libreoffice) only consume the pdfium C++ source, but we build the
code using our own build system (as GN is not available in our build
environment):
https://github.com/libreoffice/core/blob/49ee1c889665c3539fa9a1c99a865a42fc08ee97/external/pdfium/Library_pdfium.mk#L32
https://github.com/libreoffice/core/blob/49ee1c889665c3539fa9a1c99a865a42fc08ee97/external/pdfium/Library_pdfium.mk#L592-L593
> While `use_system_zlib = true` works as expected in my
args.gn,
> generate-ninja tells me that the option `use_system_icuuc` does not exist.
> However, when calling ldd on `/usr/lib/libreoffice/program/libpdfiumlo.so`,
> I see it is linked against `libicuuc.so`.
> What have I overlooked? Do you have a patch that adds this option, or was
> it present in an older version of pdfium and is now removed?
pdfium already supports the -DUSE_SYSTEM_ICUUC build flag: if that's
provided, then it'll build against the system ICU. I did this a while
ago in pdfium.git commit fc0bbda00d476ba0c0b43dd88fd1d1a1d11577cc (core:
allow building against system icu-uc, 2018-05-16).
I'm not sure about linking as what to link is specific to the build
system and I'm not that familiar with GN. If you're interested in
looking into the GN bits, so it works similar to e.g.
system_libjpeg_config, that would be probably useful for those who use
GN to build the code.
Regards,
Miklos