LanguageTool: don't crash if REST protocol isn't set
[LibreOffice.git] / RepositoryExternal.mk
blob7b0926a64f23e3f3e9c29b6ab896a6699bcfd03a
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 # This file incorporates work covered by the following license notice:
11 # Licensed to the Apache Software Foundation (ASF) under one or more
12 # contributor license agreements. See the NOTICE file distributed
13 # with this work for additional information regarding copyright
14 # ownership. The ASF licenses this file to you under the Apache
15 # License, Version 2.0 (the "License"); you may not use this file
16 # except in compliance with the License. You may obtain a copy of
17 # the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 # this file describes all the external libraries
21 # depending on the configure options these may be taken from the system,
22 # or the internal/bundled copy may be built.
24 # for every external, a function gb_LinkTarget__use_FOO is defined,
25 # once for the system case, once for the internal case.
27 # in the system case, no libraries should be registered, but the target-local
28 # variable LIBS should be set to FOO_LIBS, and INCLUDES to FOO_CFLAGS.
31 ifeq ($(CPUNAME),X86_64)
32 wnt_arch_subdir_optional=x64/
33 wnt_arch_subdir_mandatory=x64
34 else ifeq ($(CPUNAME),INTEL)
35 wnt_arch_subdir_mandatory=Win32
36 endif
38 # External headers
40 ifneq ($(SYSTEM_ODBC_HEADERS),)
42 define gb_LinkTarget__use_odbc_headers
43 $(call gb_LinkTarget_add_defs,$(1),\
44 -DSYSTEM_ODBC_HEADERS \
47 endef
49 else # !SYSTEM_ODBC_HEADERS
51 define gb_LinkTarget__use_odbc_headers
52 $(call gb_LinkTarget_set_include,$(1),\
53 -I$(SRCDIR)/external/iODBC/inc \
54 $$(INCLUDE) \
57 endef
59 endif # SYSTEM_ODBC_HEADERS
61 ifneq ($(SYSTEM_MDDS),)
63 gb_ExternalProject__use_mdds_headers :=
65 define gb_LinkTarget__use_mdds_headers
66 $(call gb_LinkTarget_set_include,$(1),\
67 $(MDDS_CFLAGS) \
68 $$(INCLUDE) \
71 endef
73 else # !SYSTEM_MDDS
75 define gb_ExternalProject__use_mdds_headers
76 $(call gb_ExternalProject_use_unpacked,$(1),mdds)
78 endef
80 define gb_LinkTarget__use_mdds_headers
81 $(call gb_LinkTarget_use_unpacked,$(1),mdds)
82 $(call gb_LinkTarget_set_include,$(1),\
83 $(MDDS_CFLAGS) \
84 $$(INCLUDE) \
87 endef
89 endif # SYSTEM_MDDS
91 ifneq ($(SYSTEM_GLM),)
93 define gb_LinkTarget__use_glm_headers
94 $(call gb_LinkTarget_add_defs,$(1),\
95 -DGLM_FORCE_CTOR_INIT \
98 endef
100 gb_ExternalProject__use_glm_headers :=
102 else
104 define gb_LinkTarget__use_glm_headers
105 $(call gb_LinkTarget_add_defs,$(1),\
106 -DGLM_FORCE_CTOR_INIT \
108 $(call gb_LinkTarget_use_unpacked,$(1),glm)
109 $(call gb_LinkTarget_set_include,$(1),\
110 $(GLM_CFLAGS) \
111 $$(INCLUDE) \
114 endef
116 define gb_ExternalProject__use_glm_headers
117 $(call gb_ExternalProject_use_unpacked,$(1),glm)
119 endef
121 endif
123 ifneq ($(ENABLE_SKIA),)
124 define gb_LinkTarget__use_skia
125 $(call gb_LinkTarget_set_include,$(1),\
126 -I$(call gb_UnpackedTarball_get_dir,skia)/include/core \
127 -I$(call gb_UnpackedTarball_get_dir,skia)/include/effects \
128 -I$(call gb_UnpackedTarball_get_dir,skia)/include/gpu \
129 -I$(call gb_UnpackedTarball_get_dir,skia)/include/config \
130 -I$(call gb_UnpackedTarball_get_dir,skia)/include/ports \
131 -I$(call gb_UnpackedTarball_get_dir,skia)/include/third_party/vulkan \
132 -I$(call gb_UnpackedTarball_get_dir,skia)/tools/gpu \
133 -I$(call gb_UnpackedTarball_get_dir,skia) \
134 -I$(SRCDIR)/external/skia/inc/ \
135 $$(INCLUDE) \
137 $(call gb_LinkTarget_use_libraries,$(1),skia)
138 $(call gb_LinkTarget_add_defs,$(1),\
139 -DSK_USER_CONFIG_HEADER="<$(BUILDDIR)/config_host/config_skia.h>" \
140 -DSKIA_DLL \
142 endef
143 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
144 skia \
146 endif
148 ifeq (SANE,$(filter SANE,$(BUILD_TYPE)))
150 define gb_LinkTarget__use_sane_headers
151 $(call gb_LinkTarget_set_include,$(1),\
152 $(if $(filter WNT,$(OS)), \
153 -I$(call gb_UnpackedTarball_get_dir,twain_dsm/pub/include), \
154 -I$(SRCDIR)/external/sane/inc) \
155 $$(INCLUDE) \
158 ifeq ($(OS),WNT)
159 $(call gb_LinkTarget_use_unpacked,$(1),twain_dsm)
160 endif
162 endef
164 else
166 gb_LinkTarget__use_sane_headers :=
168 endif
170 ifneq ($(SYSTEM_BLUEZ),)
172 gb_LinkTarget__use_bluez_bluetooth_headers :=
174 else # !SYSTEM_BLUEZ
176 define gb_LinkTarget__use_bluez_bluetooth_headers
177 $(call gb_LinkTarget_set_include,$(1),\
178 -I$(SRCDIR)/external/bluez_bluetooth/inc \
179 $$(INCLUDE) \
182 endef
184 endif # SYSTEM_BLUEZ
186 # External libraries
188 ifneq ($(SYSTEM_CPPUNIT),)
190 define gb_LinkTarget__use_cppunit
191 $(call gb_LinkTarget_set_include,$(1),\
192 $$(INCLUDE) \
193 $(CPPUNIT_CFLAGS) \
196 $(call gb_LinkTarget_add_libs,$(1),\
197 $(CPPUNIT_LIBS) \
200 endef
202 else # !SYSTEM_CPPUNIT
204 define gb_LinkTarget__use_cppunit
205 $(call gb_LinkTarget_use_external_project,$(1),cppunit, full)
207 $(call gb_LinkTarget_set_include,$(1),\
208 -I$(call gb_UnpackedTarball_get_dir,cppunit/include)\
209 $$(INCLUDE) \
212 ifeq ($(COM),MSC)
213 $(call gb_LinkTarget_add_libs,$(1),\
214 $(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll/cppunitd_dll.lib,ReleaseDll/cppunit_dll.lib) \
216 else
217 $(call gb_LinkTarget_add_libs,$(1),\
218 -L$(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/.libs -lcppunit \
220 endif
222 endef
224 endif # SYSTEM_CPPUNIT
226 ifneq ($(SYSTEM_EPOXY),)
228 define gb_LinkTarget__use_epoxy
229 $(call gb_LinkTarget_set_include,$(1),\
230 $$(INCLUDE) \
231 $(EPOXY_CFLAGS) \
233 $(call gb_LinkTarget_add_libs,$(1),$(EPOXY_LIBS))
235 endef
237 gb_ExternalProject__use_epoxy :=
239 else # !SYSTEM_EPOXY
241 define gb_LinkTarget__use_epoxy
242 $(call gb_LinkTarget_set_include,$(1),\
243 -I$(call gb_UnpackedTarball_get_dir,epoxy/include) \
244 $$(INCLUDE) \
247 $(call gb_LinkTarget_use_libraries,$(1),\
248 epoxy \
251 endef
253 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
254 epoxy \
257 define gb_ExternalProject__use_epoxy
258 $(call gb_ExternalProject_use_external_project,$(1),epoxy)
260 endef
262 endif # SYSTEM_EPOXY
264 define gb_LinkTarget__use_iconv
265 ifeq ($(COM),MSC)
266 $(call gb_LinkTarget_add_libs,$(1),libiconv.lib)
267 else
268 $(call gb_LinkTarget_add_libs,$(1),-liconv)
269 endif
270 endef
272 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
274 define gb_LinkTarget__use_mariadb-connector-c
275 $(call gb_LinkTarget_set_include,$(1),\
276 $$(INCLUDE) \
277 $(MARIADB_CFLAGS) \
279 $(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS))
281 endef
282 gb_ExternalProject__use_mariadb-connector-c :=
284 else # !SYSTEM_MARIADB_CONNECTOR_C
286 define gb_LinkTarget__use_mariadb-connector-c
287 $(call gb_LinkTarget_set_include,$(1),\
288 $$(INCLUDE) \
289 $(MARIADB_CFLAGS) \
291 $(call gb_LinkTarget_use_static_libraries,$(1),\
292 mariadb-connector-c \
294 ifeq ($(OS),MACOSX)
295 $(call gb_LinkTarget_add_libs,$(1),\
296 -liconv \
298 endif
299 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
300 ws2_32 \
301 advapi32 \
302 kernel32 \
303 shlwapi \
304 crypt32 \
307 endef
308 define gb_ExternalProject__use_mariadb-connector-c
309 $(call gb_ExternalProject_use_static_libraries,$(1),mariadb-connector-c)
311 endef
313 endif # SYSTEM_MARIADB_CONNECTOR_C
316 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
318 define gb_LinkTarget__use_mysql
320 $(call gb_LinkTarget_add_defs,$(1),\
321 -DSYSTEM_MARIADB \
324 $(call gb_LinkTarget_add_libs,$(1),\
325 $(MARIADB_LIBS) \
328 $(call gb_LinkTarget_set_include,$(1),\
329 $(MARIADB_CFLAGS) \
330 $$(INCLUDE) \
332 endef
334 else
336 define gb_LinkTarget__use_mysql
338 $(call gb_LinkTarget_set_include,$(1),\
339 $$(INCLUDE) \
342 endef
344 endif
346 ifneq ($(SYSTEM_ZLIB),)
348 define gb_LinkTarget__use_zlib
349 $(call gb_LinkTarget_add_defs,$(1),\
350 -DSYSTEM_ZLIB \
351 -DZLIB_CONST \
353 $(call gb_LinkTarget_add_libs,$(1),-lz)
355 endef
357 # nothing on system
358 define gb_LinkTarget__use_zlib_x64
360 endef
362 gb_ExternalProject__use_zlib :=
364 else # !SYSTEM_ZLIB
366 define gb_LinkTarget__use_zlib_multiarch
367 $(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
369 $(call gb_LinkTarget_add_defs,$(1), \
370 -DZLIB_CONST \
373 $(call gb_LinkTarget_set_include,$(1),\
374 $(ZLIB_CFLAGS) \
375 $$(INCLUDE) \
378 $(call gb_LinkTarget_use_static_libraries,$(1),\
379 $(2) \
382 endef
384 define gb_LinkTarget__use_zlib
385 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
387 endef
389 define gb_LinkTarget__use_zlib_x64
390 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
392 endef
394 define gb_ExternalProject__use_zlib
395 $(call gb_ExternalProject_use_static_libraries,$(1),zlib)
397 endef
399 endif # SYSTEM_ZLIB
402 ifneq ($(SYSTEM_LIBJPEG),)
404 define gb_LinkTarget__use_libjpeg
405 $(call gb_LinkTarget_set_include,$(1),\
406 $$(INCLUDE) \
407 $(LIBJPEG_CFLAGS) \
409 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
410 $(call gb_LinkTarget_set_ldflags,$(1),\
411 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
414 endef
416 gb_ExternalProject__use_libjpeg :=
418 else
420 define gb_LinkTarget__use_libjpeg
421 $(call gb_LinkTarget_use_external_project,$(1),libjpeg-turbo,full)
422 $(call gb_LinkTarget_set_include,$(1),\
423 -I$(call gb_UnpackedTarball_get_dir,libjpeg-turbo) \
424 $$(INCLUDE) \
426 $(call gb_LinkTarget_use_static_libraries,$(1),libjpeg-turbo)
428 endef
430 define gb_ExternalProject__use_libjpeg
431 $(call gb_ExternalProject_use_external_project,$(1),libjpeg-turbo)
433 endef
435 endif # SYSTEM_LIBJPEG
437 ifneq ($(SYSTEM_MYTHES),)
439 define gb_LinkTarget__use_mythes
440 $(call gb_LinkTarget_set_include,$(1),\
441 $$(INCLUDE) \
442 $(MYTHES_CFLAGS) \
444 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
446 endef
448 else # !SYSTEM_MYTHES
450 define gb_LinkTarget__use_mythes
451 $(call gb_LinkTarget_set_include,$(1),\
452 -I$(call gb_UnpackedTarball_get_dir,mythes) \
453 $$(INCLUDE) \
456 ifeq ($(COM),MSC)
457 $(call gb_LinkTarget_use_static_libraries,$(1),\
458 mythes \
460 else
461 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
462 $(call gb_LinkTarget_use_external_project,$(1),mythes)
463 endif
465 endef
467 endif # SYSTEM_MYTHES
470 ifneq ($(SYSTEM_EXPAT),)
472 define gb_LinkTarget__use_expat_impl
473 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
475 $(call gb_LinkTarget_add_defs,$(1),\
476 -DSYSTEM_EXPAT \
479 $(call gb_LinkTarget_add_libs,$(1),-lexpat)
481 endef
483 gb_ExternalProject__use_expat :=
485 else # !SYSTEM_EXPAT
487 define gb_LinkTarget__use_expat_impl
488 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
490 $(call gb_LinkTarget_set_include,$(1),\
491 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
492 $$(INCLUDE) \
495 $(call gb_LinkTarget_use_static_libraries,$(1),\
496 $(2) \
499 endef
501 define gb_ExternalProject__use_expat
502 $(call gb_ExternalProject_use_static_libraries,$(1),expat)
504 endef
506 endif # SYSTEM_EXPAT
508 define gb_LinkTarget__use_expat
509 $(call gb_LinkTarget__use_expat_impl,$(1),expat)
511 endef
513 define gb_LinkTarget__use_expat_x64
514 $(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
516 endef
518 ifneq ($(SYSTEM_HYPH),)
520 define gb_LinkTarget__use_hyphen
521 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
523 endef
525 else # !SYSTEM_HYPH
527 define gb_LinkTarget__use_hyphen
528 $(call gb_LinkTarget_use_unpacked,$(1),hyphen)
529 $(call gb_LinkTarget_set_include,$(1),\
530 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
531 $$(INCLUDE) \
534 ifeq ($(COM),MSC)
535 $(call gb_LinkTarget_use_static_libraries,$(1),\
536 hyphen \
538 else
539 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
540 $(call gb_LinkTarget_use_external_project,$(1),hyphen)
541 endif
543 endef
545 endif # SYSTEM_HYPH
547 ifneq ($(SYSTEM_HUNSPELL),)
549 define gb_LinkTarget__use_hunspell
550 $(call gb_LinkTarget_set_include,$(1),\
551 $$(INCLUDE) \
552 $(HUNSPELL_CFLAGS) \
554 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
556 endef
558 gb_ExternalProject__use_hunspell :=
560 else # !SYSTEM_HUNSPELL
562 define gb_LinkTarget__use_hunspell
563 $(call gb_LinkTarget_add_defs,$(1),\
564 -DHUNSPELL_STATIC \
566 $(call gb_LinkTarget_use_unpacked,$(1),hunspell)
567 $(call gb_LinkTarget_set_include,$(1),\
568 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
569 $$(INCLUDE) \
572 ifeq ($(COM),MSC)
573 $(call gb_LinkTarget_use_static_libraries,$(1),\
574 hunspell \
576 else
577 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
578 $(call gb_LinkTarget_use_external_project,$(1),hunspell)
579 endif
581 endef
583 define gb_ExternalProject__use_hunspell
584 $(call gb_ExternalProject_use_external_project,$(1),hunspell)
586 endef
588 endif # SYSTEM_HUNSPELL
591 ifneq ($(SYSTEM_BOOST),)
593 define gb_LinkTarget__use_boost_lib
594 $(call gb_LinkTarget_set_include,$(1),\
595 $$(INCLUDE) \
596 $(BOOST_CPPFLAGS) \
599 $(call gb_LinkTarget_add_ldflags,$(1),\
600 $(BOOST_LDFLAGS) \
603 $(call gb_LinkTarget_add_libs,$(1),$(2))
605 endef
607 define gb_LinkTarget__use_boost_locale
608 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_LOCALE_LIB))
610 endef
612 define gb_LinkTarget__use_boost_date_time
613 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
615 endef
617 define gb_LinkTarget__use_boost_filesystem
618 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_FILESYSTEM_LIB))
620 endef
622 gb_ExternalProject__use_boost_filesystem :=
624 define gb_LinkTarget__use_boost_iostreams
625 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
627 endef
629 gb_ExternalProject__use_boost_iostreams :=
631 define gb_LinkTarget__use_boost_system
632 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB))
634 endef
636 gb_ExternalProject__use_boost_system :=
638 define gb_LinkTarget__use_boost_headers
639 $(call gb_LinkTarget_set_include,$(1),\
640 $$(INCLUDE) \
641 $(BOOST_CPPFLAGS) \
644 endef
646 gb_ExternalProject__use_boost_headers:=
648 else # !SYSTEM_BOOST
650 define gb_LinkTarget__use_boost_lib
651 $(call gb_LinkTarget_add_defs,$(1),\
652 -DBOOST_ALL_NO_LIB \
655 $(call gb_LinkTarget_use_static_libraries,$(1),$(2))
657 endef
659 define gb_LinkTarget__use_boost_locale
660 $(call gb_LinkTarget__use_boost_lib,$(1),boost_locale)
661 $(call gb_LinkTarget_add_libs,$(1),\
662 $(if $(filter $(OS),MACOSX),-liconv) \
665 endef
667 define gb_LinkTarget__use_boost_date_time
668 $(call gb_LinkTarget__use_boost_lib,$(1),boost_date_time)
670 endef
672 define gb_LinkTarget__use_boost_filesystem
673 $(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem)
675 endef
677 define gb_ExternalProject__use_boost_filesystem
678 $(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
679 endef
681 define gb_LinkTarget__use_boost_iostreams
682 $(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams)
684 endef
686 define gb_ExternalProject__use_boost_iostreams
687 $(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
688 endef
690 define gb_LinkTarget__use_boost_system
691 $(call gb_LinkTarget__use_boost_lib,$(1),boost_system)
693 endef
695 define gb_ExternalProject__use_boost_system
696 $(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
697 endef
699 define gb_LinkTarget__use_boost_headers
700 $(call gb_LinkTarget_use_unpacked,$(1),boost)
701 $(call gb_LinkTarget_set_include,$(1),\
702 $(BOOST_CPPFLAGS) \
703 $$(INCLUDE) \
706 endef
708 define gb_ExternalProject__use_boost_headers
709 $(call gb_ExternalProject_use_unpacked,$(1),boost)
711 endef
713 endif # SYSTEM_BOOST
716 ifneq ($(SYSTEM_LIBCMIS),)
718 define gb_LinkTarget__use_libcmis
719 $(call gb_LinkTarget_set_include,$(1),\
720 $$(INCLUDE) \
721 $(LIBCMIS_CFLAGS) \
723 $(call gb_LinkTarget_add_libs,$(1),$(LIBCMIS_LIBS))
725 endef
727 else # !SYSTEM_LIBCMIS
729 define gb_LinkTarget__use_libcmis
730 $(call gb_LinkTarget_set_include,$(1),\
731 -I$(call gb_UnpackedTarball_get_dir,libcmis)/inc \
732 $$(INCLUDE) \
734 $(call gb_LinkTarget_use_static_libraries,$(1),\
735 libcmis \
738 endef
740 endif # SYSTEM_LIBCMIS
742 ifeq ($(ENABLE_JAVA),TRUE)
744 define gb_LinkTarget__use_jawt
745 $(call gb_LinkTarget_add_libs,$(1),\
746 $(JAWTLIB) \
749 endef
751 else # !ENABLE_JAVA
753 gb_LinkTarget__use_jawt :=
755 endif # ENABLE_JAVA
757 ifneq ($(SYSTEM_LIBATOMIC_OPS),)
759 define gb_LinkTarget__use_libatomic_ops
760 $(call gb_LinkTarget_set_include,$(1),\
761 $$(INCLUDE) \
762 $(LIBATOMIC_OPS_CFLAGS) \
764 $(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
766 endef
767 gb_ExternalProject__use_libatomic_ops :=
769 else # !SYSTEM_LIBATOMIC_OPS
771 define gb_LinkTarget__use_libatomic_ops
772 $(call gb_LinkTarget_set_include,$(1),\
773 $(LIBATOMIC_OPS_CFLAGS) \
774 $$(INCLUDE) \
775 $(LIBATOMIC_OPS_CFLAGS) \
777 $(call gb_LinkTarget_use_external_project,$(1),\
778 libatomic_ops \
781 $(call gb_LinkTarget_add_libs,$(1),\
782 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
785 endef
787 define gb_ExternalProject__use_libatomic_ops
788 $(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
790 endef
792 endif # SYSTEM_LIBATOMIC_OPS
795 ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
797 define gb_LinkTarget__use_libexttextcat
798 $(call gb_LinkTarget_set_include,$(1),\
799 $$(INCLUDE) \
800 $(LIBEXTTEXTCAT_CFLAGS) \
802 $(call gb_LinkTarget_add_defs,$(1),\
803 -DSYSTEM_LIBEXTTEXTCAT \
805 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
807 endef
809 else # !SYSTEM_LIBEXTTEXTCAT
811 define gb_LinkTarget__use_libexttextcat
812 $(call gb_LinkTarget_set_include,$(1),\
813 -I$(call gb_UnpackedTarball_get_dir,libexttextcat/src) \
814 $$(INCLUDE) \
817 ifeq ($(COM),MSC)
818 $(call gb_LinkTarget_use_static_libraries,$(1),\
819 libexttextcat \
821 else
822 $(call gb_LinkTarget_add_libs,$(1),\
823 $(call gb_UnpackedTarball_get_dir,libexttextcat)/src/.libs/libexttextcat-2.0.a\
825 $(call gb_LinkTarget_use_external_project,$(1),libexttextcat)
826 endif
829 endef
831 endif # SYSTEM_LIBEXTTEXTCAT
834 ifneq ($(SYSTEM_LIBNUMBERTEXT),)
836 define gb_LinkTarget__use_libnumbertext
837 $(call gb_LinkTarget_set_include,$(1),\
838 $$(INCLUDE) \
839 $(LIBNUMBERTEXT_CFLAGS) \
841 $(call gb_LinkTarget_add_defs,$(1),\
842 -DSYSTEM_LIBNUMBERTEXT \
844 $(call gb_LinkTarget_add_libs,$(1),$(LIBNUMBERTEXT_LIBS))
846 endef
848 else # !SYSTEM_LIBNUMBERTEXT
850 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
851 libnumbertext_numbertext \
854 define gb_LinkTarget__use_libnumbertext
855 $(call gb_LinkTarget_use_package,$(1),libnumbertext_numbertext)
856 $(call gb_LinkTarget_set_include,$(1),\
857 -I$(call gb_UnpackedTarball_get_dir,libnumbertext/src) \
858 $$(INCLUDE) \
861 ifeq ($(COM),MSC)
862 $(call gb_LinkTarget_use_static_libraries,$(1),\
863 libnumbertext \
865 else
867 $(call gb_LinkTarget_add_libs,$(1),\
868 $(call gb_UnpackedTarball_get_dir,libnumbertext)/src/.libs/libnumbertext-1.0.a\
870 $(call gb_LinkTarget_use_external_project,$(1),libnumbertext,full)
872 endif
874 endef
876 endif # SYSTEM_LIBNUMBERTEXT
879 ifneq ($(SYSTEM_LIBXML),)
881 define gb_LinkTarget__use_libxml2
882 $(call gb_LinkTarget_add_defs,$(1),\
883 -DSYSTEM_LIBXML \
885 $(call gb_LinkTarget_set_include,$(1),\
886 $$(INCLUDE) \
887 $(LIBXML_CFLAGS) \
889 $(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
891 endef
892 gb_ExternalProject__use_libxml2:=
894 else # !SYSTEM_LIBXML
896 $(eval $(call gb_Helper_register_packages_for_install,ure,\
897 libxml2 \
900 define gb_LinkTarget__use_libxml2
901 $(call gb_LinkTarget_use_package,$(1),libxml2)
902 $(call gb_LinkTarget_set_include,$(1),\
903 $$(INCLUDE) \
904 $(LIBXML_CFLAGS) \
907 $(call gb_LinkTarget_add_libs,$(1),\
908 $(LIBXML_LIBS) \
911 ifeq ($(COM),MSC)
912 $(call gb_LinkTarget_use_external,$(1),icu_headers)
913 endif
915 endef
916 define gb_ExternalProject__use_libxml2
917 $(call gb_ExternalProject_use_package,$(1),libxml2)
919 ifeq ($(COM),MSC)
920 $(call gb_ExternalProject_use_packages,$(1),icu icu_ure)
921 endif
923 endef
925 endif # SYSTEM_LIBXML
928 ifneq ($(SYSTEM_LIBXSLT),)
930 define gb_LinkTarget__use_libxslt
931 $(call gb_LinkTarget_set_include,$(1),\
932 $$(INCLUDE) \
933 $(LIBXSLT_CFLAGS) \
935 $(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
937 endef
939 define gb_LinkTarget__use_libexslt
940 $(call gb_LinkTarget_set_include,$(1),\
941 $$(INCLUDE) \
942 $(LIBEXSLT_CFLAGS) \
945 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
947 endef
949 else # !SYSTEM_LIBXSLT
951 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
952 libxslt \
955 define gb_LinkTarget__use_libxslt
956 $(call gb_LinkTarget_use_package,$(1),libxslt)
957 $(call gb_LinkTarget_set_include,$(1),\
958 $$(INCLUDE) \
959 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
962 ifeq ($(COM),MSC)
963 $(call gb_LinkTarget_add_libs,$(1),\
964 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libxslt.lib \
966 else
967 $(call gb_LinkTarget_add_libs,$(1),\
968 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libxslt/.libs -lxslt \
970 endif
972 endef
974 define gb_LinkTarget__use_libexslt
975 $(call gb_LinkTarget_use_package,$(1),libxslt)
976 $(call gb_LinkTarget_set_include,$(1),\
977 $$(INCLUDE) \
978 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
981 ifeq ($(COM),MSC)
982 $(call gb_LinkTarget_add_libs,$(1),\
983 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libexslt.lib \
985 else
986 $(call gb_LinkTarget_add_libs,$(1),\
987 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libexslt/.libs -lexslt \
989 endif
991 endef
993 endif # SYSTEM_LIBXSLT
996 ifneq ($(SYSTEM_XMLSEC),)
998 define gb_LinkTarget__use_xmlsec
999 $(call gb_LinkTarget_add_defs,$(1),\
1000 -DSYSTEM_XMLSEC \
1002 $(call gb_LinkTarget_set_include,$(1),\
1003 $$(INCLUDE) \
1004 $(XMLSEC_CFLAGS) \
1006 $(call gb_LinkTarget_add_libs,$(1),$(XMLSEC_LIBS))
1008 endef
1010 gb_ExternalProject__use_xmlsec:=
1012 else # !SYSTEM_XMLSEC
1014 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1015 xmlsec \
1018 define gb_LinkTarget__use_xmlsec
1020 endef
1022 endif # SYSTEM_XMLSEC
1024 ifneq ($(SYSTEM_LIBLANGTAG),)
1026 define gb_LinkTarget__use_liblangtag
1027 $(call gb_LinkTarget_set_include,$(1),\
1028 $$(INCLUDE) \
1029 $(LIBLANGTAG_CFLAGS) \
1032 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1034 endef
1036 gb_ExternalProject__use_liblangtag :=
1038 else # !SYSTEM_LIBLANGTAG
1040 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1041 liblangtag_data \
1044 ifeq ($(COM),MSC)
1046 define gb_LinkTarget__use_liblangtag
1047 $(call gb_LinkTarget_set_include,$(1),\
1048 $(LIBLANGTAG_CFLAGS) \
1049 $$(INCLUDE) \
1051 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1052 $(call gb_LinkTarget_use_external_project,$(1),liblangtag)
1054 endef
1056 else
1058 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1059 liblangtag \
1062 define gb_LinkTarget__use_liblangtag
1063 $(call gb_LinkTarget_set_include,$(1),\
1064 $(LIBLANGTAG_CFLAGS) \
1065 $$(INCLUDE) \
1067 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1068 $(call gb_LinkTarget_use_package,$(1),liblangtag)
1070 endef
1072 endif # MSC
1074 define gb_ExternalProject__use_liblangtag
1075 $(call gb_ExternalProject_use_external_project,$(1),liblangtag)
1077 endef
1079 endif # SYSTEM_LIBLANGTAG
1082 gb_ExternalProject__use_apr :=
1084 ifeq ($(WITH_WEBDAV),serf)
1086 define gb_LinkTarget__use_apr
1087 $(call gb_LinkTarget_set_include,$(1),\
1088 $$(INCLUDE) \
1089 $(APR_CFLAGS) \
1091 $(call gb_LinkTarget_add_libs,$(1),\
1092 $(APR_LIBS) \
1093 $(if $(filter $(OS),LINUX),-lpthread) \
1094 $(if $(filter $(OS),MACOSX),-liconv) \
1097 ifeq ($(SYSTEM_APR),)
1098 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
1099 mswsock \
1100 rpcrt4 \
1101 shell32 \
1103 $(call gb_LinkTarget_add_defs,$(1),\
1104 -DAPR_DECLARE_STATIC \
1105 -DAPU_DECLARE_STATIC \
1107 $(call gb_LinkTarget_use_external_project,$(1),apr_util,full)
1108 endif
1110 endef
1112 define gb_ExternalProject__use_apr
1113 ifeq ($(SYSTEM_APR),)
1114 $(call gb_ExternalProject_use_external_project,$(1),apr_util,full)
1115 endif
1117 endef
1119 ifneq ($(SYSTEM_SERF),)
1121 define gb_LinkTarget__use_serf
1122 $(call gb_LinkTarget_add_defs,$(1),\
1123 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(SERF_CFLAGS))) \
1126 $(call gb_LinkTarget_set_include,$(1),\
1127 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(SERF_CFLAGS)))) \
1128 $$(INCLUDE) \
1131 $(call gb_LinkTarget_add_libs,$(1),\
1132 $(SERF_LIBS) \
1135 endef
1137 else # !SYSTEM_SERF
1139 define gb_LinkTarget__use_serf
1140 $(call gb_LinkTarget_set_include,$(1),\
1141 -I$(call gb_UnpackedTarball_get_dir,serf) \
1142 $$(INCLUDE) \
1145 $(call gb_LinkTarget_use_static_libraries,$(1),\
1146 serf \
1149 endef
1151 endif # SYSTEM_SERF
1153 else ifeq ($(WITH_WEBDAV),neon)
1155 ifneq ($(SYSTEM_NEON),)
1157 define gb_LinkTarget__use_neon
1158 $(call gb_LinkTarget_add_defs,$(1),\
1159 -DNEON_VERSION=0x$(NEON_VERSION) \
1160 -DSYSTEM_NEON \
1162 $(call gb_LinkTarget_set_include,$(1),\
1163 $$(INCLUDE) \
1164 $(NEON_CFLAGS) \
1167 $(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
1169 endef
1171 else # !SYSTEM_NEON
1173 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1174 neon \
1177 define gb_LinkTarget__use_neon
1178 $(call gb_LinkTarget_use_unpacked,$(1),neon)
1179 $(call gb_LinkTarget_set_include,$(1),\
1180 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
1181 $$(INCLUDE) \
1183 $(call gb_LinkTarget_use_libraries,$(1),\
1184 neon \
1187 endef
1189 endif # SYSTEM_NEON
1191 endif # WITH_WEBDAV
1193 ifneq ($(SYSTEM_REDLAND),)
1195 define gb_LinkTarget__use_librdf
1196 $(call gb_LinkTarget_add_defs,$(1),\
1197 -DSYSTEM_REDLAND \
1199 $(call gb_LinkTarget_set_include,$(1),\
1200 $$(INCLUDE) \
1201 $(REDLAND_CFLAGS) \
1203 $(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
1205 endef
1207 gb_LinkTarget__use_redland_headers:=
1209 gb_LinkTarget__use_raptor_headers:=
1211 gb_LinkTarget__use_rasqal_headers:=
1213 else # !SYSTEM_REDLAND
1215 define gb_LinkTarget__use_redland_headers
1216 $(call gb_LinkTarget_set_include,$(1),\
1217 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
1218 $$(INCLUDE) \
1221 endef
1223 define gb_LinkTarget__use_raptor_headers
1224 $(call gb_LinkTarget_set_include,$(1),\
1225 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
1226 $$(INCLUDE) \
1229 endef
1231 define gb_LinkTarget__use_rasqal_headers
1232 $(call gb_LinkTarget_set_include,$(1),\
1233 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
1234 $$(INCLUDE) \
1237 endef
1239 ifneq ($(OS),ANDROID)
1241 ifeq ($(COM),MSC)
1242 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
1243 raptor2 \
1244 rasqal \
1245 rdf \
1247 else
1248 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1249 raptor \
1250 rasqal \
1251 redland \
1253 endif
1255 define gb_LinkTarget__use_librdf
1256 ifeq ($(COM),MSC)
1257 $(call gb_LinkTarget_use_libraries,$(1),\
1258 raptor2 \
1259 rdf \
1261 else
1262 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1264 $(call gb_LinkTarget_add_libs,$(1),\
1265 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
1266 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1267 -L$(call gb_UnpackedTarball_get_dir,rasqal)/src/.libs -lrasqal \
1269 endif
1271 endef
1273 else # ANDROID
1275 define gb_LinkTarget__use_librdf
1276 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1278 endef
1280 endif # ANDROID
1282 endif # SYSTEM_REDLAND
1284 ifneq ($(SYSTEM_CAIRO),)
1286 define gb_LinkTarget__use_cairo
1287 $(call gb_LinkTarget_set_include,$(1),\
1288 $$(INCLUDE) \
1289 $(CAIRO_CFLAGS) \
1291 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1292 $(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
1294 endef
1296 else # !SYSTEM_CAIRO
1298 ifneq ($(filter-out MACOSX WNT,$(OS)),)
1300 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1301 cairo \
1302 pixman \
1305 define gb_LinkTarget__use_cairo
1306 $(call gb_LinkTarget_use_package,$(1),cairo)
1307 $(call gb_LinkTarget_use_package,$(1),pixman)
1308 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1309 $(call gb_LinkTarget_set_include,$(1),\
1310 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1311 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1312 -I$(call gb_UnpackedTarball_get_dir,pixman)/pixman \
1313 $$(INCLUDE) \
1315 $(call gb_LinkTarget_add_libs,$(1),\
1316 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1317 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1320 endef
1322 endif # !MACOSX, !WNT
1324 endif # !SYSTEM_CAIRO
1326 ifneq ($(SYSTEM_FREETYPE),)
1328 define gb_LinkTarget__use_freetype_headers
1329 $(call gb_LinkTarget_set_include,$(1),\
1330 $$(INCLUDE) \
1331 $(FREETYPE_CFLAGS) \
1334 endef
1336 gb_ExternalProject__use_freetype :=
1338 else
1340 define gb_LinkTarget__use_freetype_headers
1341 $(call gb_LinkTarget_use_external_project,$(1),freetype)
1342 $(call gb_LinkTarget_set_include,$(1),\
1343 $(FREETYPE_CFLAGS) \
1344 $$(INCLUDE) \
1347 endef
1349 define gb_ExternalProject__use_freetype
1350 $(call gb_ExternalProject_use_external_project,$(1),freetype)
1352 endef
1354 endif # SYSTEM_FREETYPE
1356 define gb_LinkTarget__use_freetype
1357 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1358 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1360 endef
1362 ifneq ($(SYSTEM_FONTCONFIG),)
1364 define gb_LinkTarget__use_fontconfig
1365 $(call gb_LinkTarget_set_include,$(1),\
1366 $$(INCLUDE) \
1367 $(FONTCONFIG_CFLAGS) \
1370 $(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1372 endef
1374 gb_ExternalProject__use_fontconfig :=
1376 else
1378 ifneq ($(filter-out MACOSX WNT,$(OS)),)
1380 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1381 fontconfig \
1384 endif
1386 define gb_LinkTarget__use_fontconfig
1387 $(call gb_LinkTarget_use_external_project,$(1),fontconfig)
1388 $(call gb_LinkTarget_set_include,$(1),\
1389 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1390 $$(INCLUDE) \
1393 $(call gb_LinkTarget_add_libs,$(1),\
1394 -L$(call gb_UnpackedTarball_get_dir,fontconfig)/src/.libs -lfontconfig \
1397 endef
1399 define gb_ExternalProject__use_fontconfig
1400 $(call gb_ExternalProject_use_external_project,$(1),fontconfig)
1402 endef
1404 endif # SYSTEM_FONTCONFIG
1406 ifneq ($(SYSTEM_GRAPHITE),)
1408 define gb_LinkTarget__use_graphite
1409 $(call gb_LinkTarget_set_include,$(1),\
1410 $$(INCLUDE) \
1411 $(GRAPHITE_CFLAGS) \
1413 $(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
1415 endef
1417 gb_ExternalProject__use_graphite:=
1419 else # !SYSTEM_GRAPHITE
1421 define gb_LinkTarget__use_graphite
1422 $(call gb_LinkTarget_use_unpacked,$(1),graphite)
1423 $(call gb_LinkTarget_set_include,$(1),\
1424 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
1425 $$(INCLUDE) \
1427 $(call gb_LinkTarget_use_static_libraries,$(1),\
1428 graphite \
1431 endef
1433 define gb_ExternalProject__use_graphite
1434 $(call gb_ExternalProject_use_static_libraries,$(1),\
1435 graphite \
1438 endef
1439 endif # SYSTEM_GRAPHITE
1441 ifneq ($(SYSTEM_ICU),)
1443 gb_LinkTarget__use_icu_headers:=
1444 gb_ExternalProject__use_icu:=
1446 define gb_LinkTarget__use_icudata
1447 $(call gb_LinkTarget_add_libs,$(1),-licudata)
1449 endef
1450 define gb_LinkTarget__use_icui18n
1451 $(call gb_LinkTarget_add_libs,$(1),-licui18n)
1453 endef
1454 define gb_LinkTarget__use_icuuc
1455 $(call gb_LinkTarget_add_libs,$(1),-licuuc)
1457 endef
1459 else # !SYSTEM_ICU
1461 $(eval $(call gb_Helper_register_packages_for_install,ure, \
1462 icu_ure \
1465 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1466 icu \
1469 ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
1470 gb_ICU_suffix:=lo
1471 else
1472 gb_ICU_suffix:=
1473 endif
1475 define gb_LinkTarget__use_icu_headers
1476 $(call gb_LinkTarget_use_unpacked,$(1),icu)
1477 $(call gb_LinkTarget_set_include,$(1),\
1478 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1479 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1480 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
1481 $$(INCLUDE) \
1484 endef
1486 define gb_ExternalProject__use_icu
1487 $(call gb_ExternalProject_use_package,$(1),icu)
1489 endef
1491 # icudata and icui18n is called icudt and icuin when built with MSVC :-/
1492 define gb_LinkTarget__use_icudata
1493 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1495 ifeq ($(OS),WNT)
1496 $(call gb_LinkTarget_add_libs,$(1),\
1497 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1499 else
1500 $(call gb_LinkTarget_add_libs,$(1),\
1501 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1503 endif
1505 endef
1507 define gb_LinkTarget__use_icui18n
1508 $(call gb_LinkTarget_use_package,$(1),icu)
1510 ifeq ($(OS),WNT)
1511 $(call gb_LinkTarget_add_libs,$(1),\
1512 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1514 else
1515 $(call gb_LinkTarget_add_libs,$(1),\
1516 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1518 endif
1520 endef
1522 define gb_LinkTarget__use_icuuc
1523 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1525 ifeq ($(OS),WNT)
1526 $(call gb_LinkTarget_add_libs,$(1),\
1527 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1529 else
1530 $(call gb_LinkTarget_add_libs,$(1),\
1531 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1533 endif
1535 endef
1537 endif # SYSTEM_ICU
1539 ifneq ($(SYSTEM_HARFBUZZ),)
1541 define gb_LinkTarget__use_harfbuzz
1542 $(call gb_LinkTarget_set_include,$(1),\
1543 $$(INCLUDE) \
1544 $(HARFBUZZ_CFLAGS) \
1546 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1548 endef
1550 gb_ExternalProject__use_harfbuzz :=
1552 else # SYSTEM_HARFBUZZ != TRUE
1554 define gb_LinkTarget__use_harfbuzz
1555 $(call gb_LinkTarget_set_include,$(1),\
1556 $(HARFBUZZ_CFLAGS) \
1557 $$(INCLUDE) \
1559 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1560 $(call gb_LinkTarget_use_external,$(1),icuuc)
1561 $(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
1563 endef
1565 define gb_ExternalProject__use_harfbuzz
1566 $(call gb_ExternalProject_use_external_project,$(1),harfbuzz)
1568 endef
1570 endif # SYSTEM_HARFBUZZ
1572 ifneq ($(ENABLE_OPENSSL),TRUE)
1574 gb_ExternalProject__use_openssl:=
1575 gb_LinkTarget__use_openssl_headers:=
1576 gb_LinkTarget__use_openssl:=
1578 else # ENABLE_OPENSSL
1580 ifneq ($(SYSTEM_OPENSSL),)
1582 gb_LinkTarget__use_openssl_headers:=
1583 gb_ExternalProject__use_openssl:=
1585 define gb_LinkTarget__use_openssl
1586 $(call gb_LinkTarget_set_include,$(1),\
1587 $$(INCLUDE) \
1588 $(OPENSSL_CFLAGS) \
1590 $(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
1592 endef
1594 else # !SYSTEM_OPENSSL
1596 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1597 openssl \
1600 define gb_ExternalProject__use_openssl
1601 $(call gb_ExternalProject_use_package,$(1),openssl)
1603 endef
1605 define gb_LinkTarget__use_openssl_headers
1606 $(call gb_LinkTarget_use_external_project,$(1),openssl,full)
1607 $(call gb_LinkTarget_set_include,$(1),\
1608 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
1609 $$(INCLUDE) \
1612 endef
1614 define gb_LinkTarget__use_openssl
1615 $(call gb_LinkTarget_use_package,$(1),openssl)
1616 ifeq ($(OS),WNT)
1617 $(call gb_LinkTarget_add_libs,$(1),\
1618 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.lib \
1619 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.lib \
1621 else
1622 $(call gb_LinkTarget_add_libs,$(1),\
1623 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1624 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
1625 $(if $(filter $(OS),LINUX),-pthread) \
1627 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1628 ifeq ($(OS),SOLARIS)
1629 $(call gb_LinkTarget_add_libs,$(1),\
1630 -lnsl \
1631 -lsocket \
1633 endif
1634 endif
1636 endef
1638 endif # SYSTEM_OPENSSL
1639 endif # ENABLE_OPENSSL
1642 ifneq ($(ENABLE_OPENSSL),TRUE)
1644 define gb_LinkTarget__use_gnutls
1645 $(call gb_LinkTarget_set_include,$(1),\
1646 $$(INCLUDE) \
1647 $(GNUTLS_CFLAGS) \
1650 $(call gb_LinkTarget_add_defs,$(1),\
1651 -DDISABLE_OPENSSL \
1654 $(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1656 endef
1658 define gb_LinkTarget__use_libgcrypt
1659 $(call gb_LinkTarget_set_include,$(1),\
1660 $$(INCLUDE) \
1661 $(LIBGCRYPT_CFLAGS) \
1664 $(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1666 endef
1668 else # ENABLE_OPENSSL
1670 gb_LinkTarget__use_gnutls:=
1671 gb_LinkTarget__use_libgcrypt:=
1673 endif # ENABLE_OPENSSL
1676 ifneq ($(SYSTEM_CDR),)
1678 define gb_LinkTarget__use_cdr
1679 $(call gb_LinkTarget_set_include,$(1),\
1680 $$(INCLUDE) \
1681 $(CDR_CFLAGS) \
1683 $(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1685 endef
1687 else # !SYSTEM_CDR
1689 define gb_LinkTarget__use_cdr
1690 $(call gb_LinkTarget_set_include,$(1),\
1691 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1692 $$(INCLUDE) \
1694 $(call gb_LinkTarget_add_libs,$(1),\
1695 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
1697 $(call gb_LinkTarget_use_external_project,$(1),libcdr)
1698 endef
1700 endif # SYSTEM_CDR
1703 ifneq ($(SYSTEM_EBOOK),)
1705 define gb_LinkTarget__use_ebook
1706 $(call gb_LinkTarget_set_include,$(1),\
1707 $$(INCLUDE) \
1708 $(EBOOK_CFLAGS) \
1710 $(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1712 endef
1714 gb_ExternalProject__use_ebook :=
1716 else # !SYSTEM_EBOOK
1718 define gb_LinkTarget__use_ebook
1719 $(call gb_LinkTarget_set_include,$(1),\
1720 -I${WORKDIR}/UnpackedTarball/libebook/inc \
1721 $$(INCLUDE) \
1723 $(call gb_LinkTarget_add_libs,$(1),\
1724 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
1726 $(call gb_LinkTarget_use_external_project,$(1),libebook)
1728 endef
1730 define gb_ExternalProject__use_ebook
1731 $(call gb_ExternalProject_use_external_project,$(1),libebook)
1733 endef
1735 endif # SYSTEM_EBOOK
1738 ifneq ($(SYSTEM_ETONYEK),)
1740 define gb_LinkTarget__use_etonyek
1741 $(call gb_LinkTarget_set_include,$(1),\
1742 $$(INCLUDE) \
1743 $(ETONYEK_CFLAGS) \
1745 $(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1747 endef
1749 gb_ExternalProject__use_etonyek :=
1751 else # !SYSTEM_ETONYEK
1753 ifeq ($(COM),MSC)
1755 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1756 etonyek \
1759 define gb_LinkTarget__use_etonyek
1760 $(call gb_LinkTarget_set_include,$(1),\
1761 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1762 $$(INCLUDE) \
1764 $(call gb_LinkTarget_use_libraries,$(1),\
1765 etonyek \
1768 endef
1770 else # !MSC
1772 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1773 libetonyek \
1776 define gb_LinkTarget__use_etonyek
1777 $(call gb_LinkTarget_use_package,$(1),libetonyek)
1779 $(call gb_LinkTarget_set_include,$(1),\
1780 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
1781 -DLIBETONYEK_VISIBILITY \
1782 $$(INCLUDE) \
1784 $(call gb_LinkTarget_add_libs,$(1),\
1785 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
1787 $(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1789 endef
1791 define gb_ExternalProject__use_etonyek
1792 $(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1794 endef
1796 endif
1798 endif # SYSTEM_ETONYEK
1801 ifneq ($(SYSTEM_FREEHAND),)
1803 define gb_LinkTarget__use_freehand
1804 $(call gb_LinkTarget_set_include,$(1),\
1805 $$(INCLUDE) \
1806 $(FREEHAND_CFLAGS) \
1808 $(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1810 endef
1812 gb_ExternalProject__use_freehand :=
1814 else # !SYSTEM_FREEHAND
1816 define gb_LinkTarget__use_freehand
1817 $(call gb_LinkTarget_set_include,$(1),\
1818 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
1819 $$(INCLUDE) \
1821 $(call gb_LinkTarget_add_libs,$(1),\
1822 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
1824 $(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1826 endef
1828 define gb_ExternalProject__use_freehand
1829 $(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1831 endef
1833 endif # SYSTEM_FREEHAND
1836 ifneq ($(SYSTEM_ODFGEN),)
1838 define gb_LinkTarget__use_odfgen
1839 $(call gb_LinkTarget_set_include,$(1),\
1840 $$(INCLUDE) \
1841 $(ODFGEN_CFLAGS) \
1843 $(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1845 endef
1847 else # !SYSTEM_ODFGEN
1849 ifeq ($(COM),MSC)
1851 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1852 odfgen \
1855 define gb_LinkTarget__use_odfgen
1856 $(call gb_LinkTarget_set_include,$(1),\
1857 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1858 $$(INCLUDE) \
1860 $(call gb_LinkTarget_use_libraries,$(1),\
1861 odfgen \
1864 endef
1866 else # !MSC
1868 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1869 libodfgen \
1872 define gb_LinkTarget__use_odfgen
1873 $(call gb_LinkTarget_use_package,$(1),libodfgen)
1875 $(call gb_LinkTarget_set_include,$(1),\
1876 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1877 -DLIBODFGEN_VISIBILITY \
1878 $$(INCLUDE) \
1880 $(call gb_LinkTarget_add_libs,$(1),\
1881 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
1884 endef
1886 endif
1888 endif # SYSTEM_ODFGEN
1890 ifneq ($(SYSTEM_EPUBGEN),)
1892 define gb_LinkTarget__use_epubgen
1893 $(call gb_LinkTarget_set_include,$(1),\
1894 $$(INCLUDE) \
1895 $(EPUBGEN_CFLAGS) \
1897 $(call gb_LinkTarget_add_libs,$(1),$(EPUBGEN_LIBS))
1899 endef
1900 gb_ExternalProject__use_epubgen :=
1902 else # !SYSTEM_EPUBGEN
1904 define gb_LinkTarget__use_epubgen
1905 $(call gb_LinkTarget_set_include,$(1),\
1906 -I$(call gb_UnpackedTarball_get_dir,libepubgen)/inc \
1907 $$(INCLUDE) \
1909 $(call gb_LinkTarget_add_libs,$(1),\
1910 $(call gb_UnpackedTarball_get_dir,libepubgen)/src/lib/.libs/libepubgen-0.1$(gb_StaticLibrary_PLAINEXT) \
1912 $(call gb_LinkTarget_use_external_project,$(1),libepubgen)
1914 endef
1915 define gb_ExternalProject__use_epubgen
1916 $(call gb_ExternalProject_use_external_project,$(1),libepubgen)
1918 endef
1920 endif # SYSTEM_EPUBGEN
1922 ifneq ($(SYSTEM_REVENGE),)
1924 define gb_LinkTarget__use_revenge
1925 $(call gb_LinkTarget_set_include,$(1),\
1926 $$(INCLUDE) \
1927 $(REVENGE_CFLAGS) \
1929 $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1931 endef
1933 gb_ExternalProject__use_revenge :=
1935 else # !SYSTEM_REVENGE
1937 ifeq ($(COM),MSC)
1939 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1940 revenge \
1943 define gb_LinkTarget__use_revenge
1944 $(call gb_LinkTarget_set_include,$(1),\
1945 $(REVENGE_CFLAGS) \
1946 $$(INCLUDE) \
1948 $(call gb_LinkTarget_use_libraries,$(1),\
1949 revenge \
1952 endef
1954 define gb_ExternalProject__use_revenge
1955 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1957 endef
1959 else # !MSC
1961 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1962 librevenge \
1965 define gb_LinkTarget__use_revenge
1966 $(call gb_LinkTarget_use_package,$(1),librevenge)
1968 $(call gb_LinkTarget_set_include,$(1),\
1969 $(REVENGE_CFLAGS) \
1970 -DLIBREVENGE_VISIBILITY \
1971 $$(INCLUDE) \
1973 $(call gb_LinkTarget_add_libs,$(1),\
1974 $(REVENGE_LIBS) \
1976 endef
1978 define gb_ExternalProject__use_revenge
1979 $(call gb_ExternalProject_use_package,$(1),librevenge)
1981 endef
1983 endif # MSC
1985 endif # SYSTEM_REVENGE
1988 ifneq ($(SYSTEM_ABW),)
1990 define gb_LinkTarget__use_abw
1991 $(call gb_LinkTarget_set_include,$(1),\
1992 $$(INCLUDE) \
1993 $(ABW_CFLAGS) \
1995 $(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1997 endef
1998 gb_ExternalProject__use_abw :=
2000 else # !SYSTEM_ABW
2002 define gb_LinkTarget__use_abw
2003 $(call gb_LinkTarget_set_include,$(1),\
2004 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
2005 $$(INCLUDE) \
2007 $(call gb_LinkTarget_add_libs,$(1),\
2008 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
2010 $(call gb_LinkTarget_use_external_project,$(1),libabw)
2012 endef
2013 define gb_ExternalProject__use_abw
2014 $(call gb_ExternalProject_use_external_project,$(1),libabw)
2016 endef
2018 endif # SYSTEM_ABW
2021 ifneq ($(SYSTEM_MSPUB),)
2023 define gb_LinkTarget__use_mspub
2024 $(call gb_LinkTarget_set_include,$(1),\
2025 $$(INCLUDE) \
2026 $(MSPUB_CFLAGS) \
2028 $(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
2030 endef
2032 else # !SYSTEM_MSPUB
2034 define gb_LinkTarget__use_mspub
2035 $(call gb_LinkTarget_set_include,$(1),\
2036 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
2037 $$(INCLUDE) \
2039 $(call gb_LinkTarget_add_libs,$(1),\
2040 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
2042 $(call gb_LinkTarget_use_external_project,$(1),libmspub)
2044 endef
2046 endif # SYSTEM_MSPUB
2049 ifneq ($(SYSTEM_PAGEMAKER),)
2051 define gb_LinkTarget__use_pagemaker
2052 $(call gb_LinkTarget_set_include,$(1),\
2053 $$(INCLUDE) \
2054 $(PAGEMAKER_CFLAGS) \
2056 $(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
2058 endef
2059 gb_ExternalProject__use_pagemaker :=
2061 else # !SYSTEM_PAGEMAKER
2063 define gb_LinkTarget__use_pagemaker
2064 $(call gb_LinkTarget_set_include,$(1),\
2065 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
2066 $$(INCLUDE) \
2068 $(call gb_LinkTarget_add_libs,$(1),\
2069 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
2071 $(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
2073 endef
2074 define gb_ExternalProject__use_pagemaker
2075 $(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
2077 endef
2079 endif # SYSTEM_PAGEMAKER
2082 ifneq ($(SYSTEM_QXP),)
2084 define gb_LinkTarget__use_qxp
2085 $(call gb_LinkTarget_set_include,$(1),\
2086 $$(INCLUDE) \
2087 $(QXP_CFLAGS) \
2089 $(call gb_LinkTarget_add_libs,$(1),$(QXP_LIBS))
2091 endef
2092 gb_ExternalProject__use_qxp :=
2094 else # !SYSTEM_QXP
2096 define gb_LinkTarget__use_qxp
2097 $(call gb_LinkTarget_set_include,$(1),\
2098 -I$(call gb_UnpackedTarball_get_dir,libqxp)/inc \
2099 $$(INCLUDE) \
2101 $(call gb_LinkTarget_add_libs,$(1),\
2102 $(call gb_UnpackedTarball_get_dir,libqxp)/src/lib/.libs/libqxp-0.0$(gb_StaticLibrary_PLAINEXT) \
2104 $(call gb_LinkTarget_use_external_project,$(1),libqxp)
2106 endef
2107 define gb_ExternalProject__use_qxp
2108 $(call gb_ExternalProject_use_external_project,$(1),libqxp)
2110 endef
2112 endif # SYSTEM_QXP
2115 ifneq ($(SYSTEM_ZMF),)
2117 define gb_LinkTarget__use_zmf
2118 $(call gb_LinkTarget_set_include,$(1),\
2119 $$(INCLUDE) \
2120 $(ZMF_CFLAGS) \
2122 $(call gb_LinkTarget_add_libs,$(1),$(ZMF_LIBS))
2124 endef
2125 gb_ExternalProject__use_zmf :=
2127 else # !SYSTEM_ZMF
2129 define gb_LinkTarget__use_zmf
2130 $(call gb_LinkTarget_set_include,$(1),\
2131 -I$(call gb_UnpackedTarball_get_dir,libzmf)/inc \
2132 $$(INCLUDE) \
2134 $(call gb_LinkTarget_add_libs,$(1),\
2135 $(call gb_UnpackedTarball_get_dir,libzmf)/src/lib/.libs/libzmf-0.0$(gb_StaticLibrary_PLAINEXT) \
2137 $(call gb_LinkTarget_use_external_project,$(1),libzmf)
2139 endef
2140 define gb_ExternalProject__use_zmf
2141 $(call gb_ExternalProject_use_external_project,$(1),libzmf)
2143 endef
2145 endif # SYSTEM_ZMF
2148 ifneq ($(SYSTEM_VISIO),)
2150 define gb_LinkTarget__use_visio
2151 $(call gb_LinkTarget_set_include,$(1),\
2152 $$(INCLUDE) \
2153 $(VISIO_CFLAGS) \
2155 $(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
2157 endef
2159 else # !SYSTEM_VISIO
2161 define gb_LinkTarget__use_visio
2162 $(call gb_LinkTarget_set_include,$(1),\
2163 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2164 $$(INCLUDE) \
2166 $(call gb_LinkTarget_add_libs,$(1),\
2167 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
2169 $(call gb_LinkTarget_use_external_project,$(1),libvisio)
2171 endef
2173 endif # SYSTEM_VISIO
2176 ifneq ($(SYSTEM_WPD),)
2178 define gb_LinkTarget__use_wpd
2179 $(call gb_LinkTarget_set_include,$(1),\
2180 $$(INCLUDE) \
2181 $(WPD_CFLAGS) \
2183 $(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
2185 endef
2186 gb_ExternalProject__use_wpd :=
2188 else # !SYSTEM_WPD
2190 ifeq ($(COM),MSC)
2192 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2193 wpd \
2196 define gb_LinkTarget__use_wpd
2197 $(call gb_LinkTarget_set_include,$(1),\
2198 $(WPD_CFLAGS) \
2199 $$(INCLUDE) \
2201 $(call gb_LinkTarget_use_libraries,$(1),\
2202 wpd \
2205 endef
2207 define gb_ExternalProject__use_wpd
2208 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
2210 endef
2212 else # !MSC
2214 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2215 libwpd \
2218 define gb_LinkTarget__use_wpd
2219 $(call gb_LinkTarget_use_package,$(1),libwpd)
2221 $(call gb_LinkTarget_set_include,$(1),\
2222 $(WPD_CFLAGS) \
2223 $$(INCLUDE) \
2225 $(call gb_LinkTarget_add_libs,$(1),\
2226 $(WPD_LIBS) \
2229 endef
2231 define gb_ExternalProject__use_wpd
2232 $(call gb_ExternalProject_use_package,$(1),libwpd)
2234 endef
2236 endif # MSC
2238 endif # SYSTEM_WPD
2241 ifneq ($(SYSTEM_WPG),)
2243 define gb_LinkTarget__use_wpg
2244 $(call gb_LinkTarget_set_include,$(1),\
2245 $$(INCLUDE) \
2246 $(WPG_CFLAGS) \
2248 $(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
2250 endef
2251 gb_ExternalProject__use_wpg :=
2253 else # !SYSTEM_WPG
2255 ifeq ($(COM),MSC)
2257 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2258 wpg \
2261 define gb_LinkTarget__use_wpg
2262 $(call gb_LinkTarget_set_include,$(1),\
2263 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2264 $$(INCLUDE) \
2266 $(call gb_LinkTarget_use_libraries,$(1),\
2267 wpg \
2270 endef
2272 else # !MSC
2274 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2275 libwpg \
2278 define gb_LinkTarget__use_wpg
2279 $(call gb_LinkTarget_use_package,$(1),libwpg)
2281 $(call gb_LinkTarget_set_include,$(1),\
2282 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2283 $$(INCLUDE) \
2285 $(call gb_LinkTarget_add_libs,$(1),\
2286 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2289 endef
2291 endif # MSC
2293 endif # SYSTEM_WPG
2296 ifneq ($(SYSTEM_WPS),)
2298 define gb_LinkTarget__use_wps
2299 $(call gb_LinkTarget_set_include,$(1),\
2300 $$(INCLUDE) \
2301 $(WPS_CFLAGS) \
2303 $(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
2305 endef
2306 gb_ExternalProject__use_wps :=
2308 else # !SYSTEM_WPS
2310 ifeq ($(COM),MSC)
2312 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2313 wps \
2316 define gb_LinkTarget__use_wps
2317 $(call gb_LinkTarget_set_include,$(1),\
2318 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2319 $$(INCLUDE) \
2322 $(call gb_LinkTarget_use_libraries,$(1),\
2323 wps \
2326 endef
2328 else # !MSC
2330 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2331 libwps \
2334 define gb_LinkTarget__use_wps
2335 $(call gb_LinkTarget_use_package,$(1),libwps)
2337 $(call gb_LinkTarget_set_include,$(1),\
2338 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2339 $$(INCLUDE) \
2341 $(call gb_LinkTarget_add_libs,$(1),\
2342 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
2345 endef
2347 endif # MSC
2349 endif # SYSTEM_WPS
2352 ifneq ($(SYSTEM_MWAW),)
2354 define gb_LinkTarget__use_mwaw
2355 $(call gb_LinkTarget_set_include,$(1),\
2356 $$(INCLUDE) \
2357 $(MWAW_CFLAGS) \
2359 $(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2361 endef
2363 else # !SYSTEM_MWAW
2365 ifeq ($(COM),MSC)
2367 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2368 mwaw \
2371 define gb_LinkTarget__use_mwaw
2372 $(call gb_LinkTarget_set_include,$(1),\
2373 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2374 $$(INCLUDE) \
2377 $(call gb_LinkTarget_use_libraries,$(1),\
2378 mwaw \
2381 endef
2383 else # !MSC
2385 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2386 libmwaw \
2389 define gb_LinkTarget__use_mwaw
2390 $(call gb_LinkTarget_use_package,$(1),libmwaw)
2392 $(call gb_LinkTarget_set_include,$(1),\
2393 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2394 $$(INCLUDE) \
2396 $(call gb_LinkTarget_add_libs,$(1),\
2397 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2400 endef
2402 endif # MSC
2404 endif # SYSTEM_MWAW
2406 ifneq ($(SYSTEM_STAROFFICE),)
2408 define gb_LinkTarget__use_staroffice
2409 $(call gb_LinkTarget_set_include,$(1),\
2410 $$(INCLUDE) \
2411 $(STAROFFICE_CFLAGS) \
2413 $(call gb_LinkTarget_add_libs,$(1),$(STAROFFICE_LIBS))
2415 endef
2417 else # !SYSTEM_STAROFFICE
2419 ifeq ($(COM),MSC)
2421 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2422 staroffice \
2425 define gb_LinkTarget__use_staroffice
2426 $(call gb_LinkTarget_set_include,$(1),\
2427 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2428 $$(INCLUDE) \
2431 $(call gb_LinkTarget_use_libraries,$(1),\
2432 staroffice \
2435 endef
2437 else # !MSC
2439 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2440 libstaroffice \
2443 define gb_LinkTarget__use_staroffice
2444 $(call gb_LinkTarget_use_package,$(1),libstaroffice)
2446 $(call gb_LinkTarget_set_include,$(1),\
2447 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2448 $$(INCLUDE) \
2450 $(call gb_LinkTarget_add_libs,$(1),\
2451 -L$(call gb_UnpackedTarball_get_dir,libstaroffice)/src/lib/.libs -lstaroffice-0.0 \
2454 endef
2456 endif # MSC
2458 endif # SYSTEM_STAROFFICE
2461 ifneq ($(SYSTEM_LCMS2),)
2463 define gb_LinkTarget__use_lcms2
2464 $(call gb_LinkTarget_set_include,$(1),\
2465 $$(INCLUDE) \
2466 $(LCMS2_CFLAGS) \
2468 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2470 endef
2472 gb_ExternalProject__use_lcms2 :=
2474 else # !SYSTEM_LCMS2
2476 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2477 lcms2 \
2480 define gb_ExternalProject__use_lcms2
2481 $(call gb_ExternalProject_use_package,$(1),lcms2)
2483 endef
2485 ifeq ($(OS),ANDROID)
2487 define gb_LinkTarget__use_lcms2
2488 $(call gb_LinkTarget_use_package,$(1),lcms2)
2489 $(call gb_LinkTarget_set_include,$(1),\
2490 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2491 $$(INCLUDE) \
2494 endef
2496 else
2498 define gb_LinkTarget__use_lcms2
2499 $(call gb_LinkTarget_use_package,$(1),lcms2)
2500 $(call gb_LinkTarget_set_include,$(1),\
2501 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2502 $$(INCLUDE) \
2504 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2506 endef
2508 endif # ANDROID
2509 endif # SYSTEM_LCMS2
2511 ifneq ($(ENABLE_LPSOLVE),)
2513 ifneq ($(SYSTEM_LPSOLVE),)
2515 define gb_LinkTarget__use_lpsolve
2516 $(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
2517 $(call gb_LinkTarget_add_defs,$(1),\
2518 -DSYSTEM_LPSOLVE \
2521 endef
2523 else # !SYSTEM_LPSOLVE
2525 define gb_LinkTarget__use_lpsolve
2526 $(call gb_LinkTarget_use_package,$(1),lpsolve)
2527 ifeq ($(COM),MSC)
2528 $(call gb_LinkTarget_add_libs,$(1),\
2529 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2531 else
2532 $(call gb_LinkTarget_add_libs,$(1),\
2533 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
2535 endif
2536 $(call gb_LinkTarget_set_include,$(1),\
2537 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
2538 $$(INCLUDE) \
2541 endef
2543 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2544 lpsolve \
2547 endif # SYSTEM_LPSOLVE
2549 else
2551 gb_LinkTarget__use_lpsolve :=
2553 endif # ENABLE_LPSOLVE
2555 ifneq ($(ENABLE_COINMP),)
2557 ifneq ($(SYSTEM_COINMP),TRUE)
2559 define gb_LinkTarget__use_coinmp
2560 $(call gb_LinkTarget_use_package,$(1),coinmp)
2561 ifeq ($(COM),MSC)
2562 $(call gb_LinkTarget_add_libs,$(1),\
2563 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
2565 else
2566 $(call gb_LinkTarget_add_libs,$(1),\
2567 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2568 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2569 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2570 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2571 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2572 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2573 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2575 endif
2576 $(call gb_LinkTarget_set_include,$(1),\
2577 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
2578 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
2579 $$(INCLUDE) \
2582 endef
2584 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2585 coinmp \
2588 else # SYSTEM_COINMP
2590 define gb_LinkTarget__use_coinmp
2591 $(call gb_LinkTarget_set_include,$(1),\
2592 $$(INCLUDE) \
2593 $(COINMP_CFLAGS) \
2595 $(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2597 endef
2599 endif
2601 else
2603 gb_LinkTarget__use_coinmp :=
2605 endif # ENABLE_COINMP
2607 ifneq (,$(filter MDNSRESPONDER,$(BUILD_TYPE)))
2609 define gb_LinkTarget__use_mDNSResponder
2610 $(call gb_LinkTarget_set_include,$(1),\
2611 -I$(call gb_UnpackedTarball_get_dir,mDNSResponder)/mDNSShared \
2612 $$(INCLUDE) \
2614 $(call gb_LinkTarget_use_static_libraries,$(1),mDNSResponder)
2615 endef
2617 endif # MDNSRESPONDER
2619 ifeq ($(ENABLE_GIO),TRUE)
2621 define gb_LinkTarget__use_gio
2622 $(call gb_LinkTarget_set_include,$(1),\
2623 $$(INCLUDE) \
2624 $(GIO_CFLAGS) \
2627 $(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2629 endef
2631 else # ENABLE_GIO
2633 define gb_LinkTarget__use_gio
2635 endef
2637 endif # ENABLE_GIO
2639 ifeq ($(ENABLE_AVAHI),TRUE)
2641 define gb_LinkTarget__use_avahi
2642 $(call gb_LinkTarget_set_include,$(1),\
2643 $$(INCLUDE) \
2644 $(AVAHI_CFLAGS) \
2647 $(call gb_LinkTarget_add_defs,$(1),\
2648 -DENABLE_AVAHI \
2651 $(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2653 endef
2655 else # ENABLE_AVAHI
2657 gb_LinkTarget__use_avahi :=
2659 endif # ENABLE_AVAHI
2661 ifeq ($(ENABLE_CUPS),TRUE)
2663 define gb_LinkTarget__use_cups
2664 $(call gb_LinkTarget_add_defs,$(1),\
2665 -DENABLE_CUPS \
2668 $(call gb_LinkTarget_add_libs,$(1),\
2669 -lcups \
2672 endef
2674 else # ENABLE_CUPS
2676 define gb_LinkTarget__use_cups
2678 endef
2680 endif # ENABLE_CUPS
2682 ifeq ($(ENABLE_DBUS),TRUE)
2684 define gb_LinkTarget__use_dbus
2685 $(call gb_LinkTarget_set_include,$(1),\
2686 $$(INCLUDE) \
2687 $(DBUS_CFLAGS) \
2690 $(call gb_LinkTarget_add_libs,$(1),\
2691 $(DBUS_LIBS) \
2694 endef
2696 else # ENABLE_DBUS
2698 define gb_LinkTarget__use_dbus
2700 endef
2702 endif # ENABLE_DBUS
2705 ifneq ($(SYSTEM_LIBPNG),)
2707 define gb_LinkTarget__use_libpng
2708 $(call gb_LinkTarget_set_include,$(1),\
2709 $$(INCLUDE) \
2710 $(LIBPNG_CFLAGS) \
2713 $(call gb_LinkTarget_add_libs,$(1),\
2714 $(LIBPNG_LIBS) \
2717 endef
2719 gb_ExternalProject__use_libpng :=
2721 else # !SYSTEM_LIBPNG
2723 define gb_LinkTarget__use_libpng
2724 $(call gb_LinkTarget_set_include,$(1),\
2725 $(LIBPNG_CFLAGS) \
2726 $$(INCLUDE) \
2728 $(call gb_LinkTarget_use_static_libraries,$(1),\
2729 libpng \
2731 $(call gb_LinkTarget__use_zlib,$(1))
2733 endef
2735 define gb_ExternalProject__use_libpng
2736 $(call gb_ExternalProject_use_static_libraries,$(1),\
2737 libpng \
2740 endef
2742 endif # !SYSTEM_LIBPNG
2744 ifneq ($(SYSTEM_LIBTIFF),)
2746 define gb_LinkTarget__use_libtiff
2747 $(call gb_LinkTarget_set_include,$(1),\
2748 $$(INCLUDE) \
2749 $(LIBTIFF_CFLAGS) \
2752 $(call gb_LinkTarget_add_libs,$(1),\
2753 $(LIBTIFF_LIBS) \
2756 endef
2758 gb_ExternalProject__use_libtiff :=
2760 else # !SYSTEM_LIBTIFF
2762 define gb_LinkTarget__use_libtiff
2763 $(call gb_LinkTarget_set_include,$(1),\
2764 $(LIBTIFF_CFLAGS) \
2765 $$(INCLUDE) \
2768 $(call gb_LinkTarget_set_include,$(1),\
2769 -I$(call gb_UnpackedTarball_get_dir,libtiff)/libtiff \
2770 $$(INCLUDE) \
2772 ifeq ($(OS),WNT)
2773 $(call gb_LinkTarget_add_libs,$(1),\
2774 $(call gb_UnpackedTarball_get_dir,libtiff)/libtiff/.libs/libtiff$(gb_StaticLibrary_PLAINEXT) \
2776 else
2777 $(call gb_LinkTarget_add_libs,$(1),\
2778 -L$(call gb_UnpackedTarball_get_dir,libtiff)/libtiff/.libs -ltiff \
2780 endif
2781 $(call gb_LinkTarget_use_external_project,$(1),libtiff,full)
2783 endef
2785 define gb_ExternalProject__use_libtiff
2786 $(call gb_ExternalProject_use_external_project,$(1),libtiff)
2788 endef
2790 endif # !SYSTEM_LIBTIFF
2792 ifneq ($(SYSTEM_LIBWEBP),)
2794 define gb_LinkTarget__use_libwebp
2795 $(call gb_LinkTarget_set_include,$(1),\
2796 $$(INCLUDE) \
2797 $(LIBWEBP_CFLAGS) \
2800 $(call gb_LinkTarget_add_libs,$(1),\
2801 $(LIBWEBP_LIBS) \
2804 endef
2806 gb_ExternalProject__use_libwebp :=
2808 else # !SYSTEM_LIBWEBP
2810 define gb_LinkTarget__use_libwebp
2811 $(call gb_LinkTarget_set_include,$(1),\
2812 $(LIBWEBP_CFLAGS) \
2813 $$(INCLUDE) \
2816 $(call gb_LinkTarget_set_include,$(1),\
2817 -I$(call gb_UnpackedTarball_get_dir,libwebp)/src \
2818 $$(INCLUDE) \
2820 ifeq ($(OS),WNT)
2821 $(call gb_LinkTarget_add_libs,$(1),\
2822 $(call gb_UnpackedTarball_get_dir,libwebp)/output/lib/libwebp$(gb_StaticLibrary_PLAINEXT) \
2824 else
2825 $(call gb_LinkTarget_add_libs,$(1),\
2826 -L$(call gb_UnpackedTarball_get_dir,libwebp)/src/.libs -lwebp \
2828 endif
2829 $(call gb_LinkTarget_use_external_project,$(1),libwebp)
2831 endef
2833 define gb_ExternalProject__use_libwebp
2834 $(call gb_ExternalProject_use_external_project,$(1),libwebp)
2836 endef
2838 endif # !SYSTEM_LIBWEBP
2841 ifneq ($(SYSTEM_CURL),)
2843 define gb_LinkTarget__use_curl
2844 $(call gb_LinkTarget_add_defs,$(1),\
2845 -DSYSTEM_CURL \
2847 $(call gb_LinkTarget_set_include,$(1),\
2848 $$(INCLUDE) \
2849 $(CURL_CFLAGS) \
2851 $(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2853 endef
2855 else # !SYSTEM_CURL
2857 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2858 curl \
2861 define gb_LinkTarget__use_curl
2862 $(call gb_LinkTarget_use_package,$(1),curl)
2863 $(call gb_LinkTarget_set_include,$(1),\
2864 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
2865 $$(INCLUDE) \
2868 ifeq ($(COM),MSC)
2869 $(call gb_LinkTarget_add_libs,$(1),\
2870 $(call gb_UnpackedTarball_get_dir,curl)/builds/libcurl-vc12-$(gb_MSBUILD_PLATFORM)-$(gb_MSBUILD_CONFIG)-dll-zlib-static-ipv6-sspi-schannel/lib/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).lib \
2872 else
2873 $(call gb_LinkTarget_add_libs,$(1),\
2874 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2876 endif
2878 endef
2880 endif # SYSTEM_CURL
2882 ifeq ($(ENABLE_VALGRIND),TRUE)
2884 define gb_LinkTarget__use_valgrind
2885 $(call gb_LinkTarget_add_defs,$(1),\
2886 -DHAVE_VALGRIND_HEADERS \
2889 $(call gb_LinkTarget_set_include,$(1),\
2890 $$(INCLUDE) \
2891 $(VALGRIND_CFLAGS) \
2894 endef
2896 else # !ENABLE_VALGRIND
2898 define gb_LinkTarget__use_valgrind
2900 endef
2902 endif # ENABLE_VALGRIND
2904 ifeq ($(ENABLE_POPPLER),TRUE)
2906 ifneq ($(SYSTEM_POPPLER),)
2908 define gb_LinkTarget__use_poppler
2909 $(call gb_LinkTarget_set_include,$(1),\
2910 $(POPPLER_CFLAGS) \
2911 $$(INCLUDE) \
2914 $(call gb_LinkTarget_add_libs,$(1),\
2915 $(POPPLER_LIBS) \
2918 endef
2920 else # !SYSTEM_POPPLER
2922 $(eval $(call gb_Helper_register_packages_for_install,pdfimport,\
2923 poppler_data \
2926 define gb_LinkTarget__use_poppler
2927 $(call gb_LinkTarget_use_external_project,$(1),poppler,full)
2928 $(call gb_LinkTarget_use_package,$(1),poppler_data)
2929 $(call gb_LinkTarget_set_include,$(1),\
2930 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2931 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2932 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
2933 $$(INCLUDE) \
2936 $(call gb_LinkTarget_use_static_libraries,$(1),poppler)
2937 $(call gb_LinkTarget_use_external,$(1),libjpeg)
2939 ifeq ($(OS),MACOSX)
2940 $(call gb_LinkTarget_add_libs,$(1),\
2941 -lobjc \
2943 else ifeq ($(OS),LINUX)
2944 $(call gb_LinkTarget_add_libs,$(1),\
2945 -pthread \
2947 else ifeq ($(OS),WNT)
2948 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2949 advapi32 \
2950 gdi32 \
2952 endif
2954 endef
2956 endif # SYSTEM_POPPLER
2958 endif # ENABLE_POPPLER
2961 ifneq ($(SYSTEM_CLUCENE),)
2963 define gb_LinkTarget__use_clucene
2964 $(call gb_LinkTarget_add_defs,$(1),\
2965 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
2968 $(call gb_LinkTarget_set_include,$(1),\
2969 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
2970 $$(INCLUDE) \
2973 $(call gb_LinkTarget_add_libs,$(1),\
2974 $(CLUCENE_LIBS) \
2977 endef
2979 else # !SYSTEM_CLUCENE
2981 define gb_LinkTarget__use_clucene
2982 $(call gb_LinkTarget_set_include,$(1),\
2983 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2984 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2985 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2986 $$(INCLUDE) \
2989 $(call gb_LinkTarget_use_libraries,$(1),\
2990 clucene \
2993 endef
2995 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2996 $(call gb_Helper_optionals_or,HELPTOOLS XMLHELP,clucene) \
2999 endif # SYSTEM_CLUCENE
3001 define gb_LinkTarget__use_gobject
3002 $(call gb_LinkTarget_add_libs,$(1),\
3003 $(GOBJECT_LIBS) \
3006 $(call gb_LinkTarget_set_include,$(1),\
3007 $$(INCLUDE) \
3008 $(GOBJECT_CFLAGS) \
3010 endef
3012 ifneq ($(SYSTEM_HSQLDB),)
3014 define gb_LinkTarget__use_hsqldb
3016 $(call gb_LinkTarget_add_defs,$(1),\
3017 -DSYSTEM_HSQLDB \
3018 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
3021 endef
3023 else # !SYSTEM_HSQLDB
3025 define gb_LinkTarget__use_hsqldb
3027 endef
3029 endif # SYSTEM_HSQLDB
3031 ifeq ($(ENABLE_LDAP),TRUE)
3032 ifneq ($(SYSTEM_OPENLDAP),)
3034 define gb_LinkTarget__use_openldap
3036 $(call gb_LinkTarget_add_libs,$(1),\
3037 -lldap \
3038 -llber \
3041 endef
3043 gb_ExternalProject__use_openldap :=
3045 else # !SYSTEM_OPENLDAP
3047 define gb_LinkTarget__use_openldap
3048 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
3049 $(call gb_LinkTarget_set_include,$(1),\
3050 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
3051 $$(INCLUDE) \
3053 $(call gb_LinkTarget_use_external_project,$(1),openldap,full)
3054 $(call gb_LinkTarget_add_libs,$(1), \
3055 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
3056 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
3059 endef
3060 endif
3062 define gb_ExternalProject__use_openldap
3063 $(call gb_ExternalProject_use_external_project,$(1),openldap)
3065 endef
3067 endif # SYSTEM_OPENLDAP
3069 ifneq ($(SYSTEM_LIBTOMMATH),)
3071 define gb_LinkTarget__use_libtommath
3072 $(call gb_LinkTarget_set_include,$(1),\
3073 $(LIBTOMMATH_CFLAGS) \
3074 $$(INCLUDE) \
3076 $(call gb_LinkTarget_add_libs,$(1),$(LIBTOMMATH_LIBS))
3078 endef
3080 else # !SYSTEM_LIBTOMMATH
3081 define gb_LinkTarget__use_libtommath
3082 $(call gb_LinkTarget_set_include,$(1),\
3083 -I${WORKDIR}/UnpackedTarball/libtommath \
3084 $$(INCLUDE) \
3086 $(call gb_LinkTarget_add_libs,$(1),\
3087 $(call gb_UnpackedTarball_get_dir,libtommath)/libtommath$(gb_StaticLibrary_PLAINEXT) \
3089 $(call gb_LinkTarget_use_external_project,$(1),libtommath)
3091 endef
3093 endif # SYSTEM_LIBTOMMATH
3095 define gb_ExternalProject__use_libtommath
3096 $(call gb_ExternalProject_use_external_project,$(1),libtommath)
3098 endef
3100 ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
3102 ifneq ($(SYSTEM_FIREBIRD),)
3104 define gb_LinkTarget__use_libfbembed
3105 $(call gb_LinkTarget_set_include,$(1),\
3106 $(FIREBIRD_CFLAGS) \
3107 $$(INCLUDE) \
3109 $(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
3111 endef
3113 else # !SYSTEM_FIREBIRD
3115 $(eval $(call gb_Helper_register_packages_for_install,firebirdsdbc,\
3116 firebird \
3119 #$(call gb_LinkTarget__use_libatomic_ops,$(1))
3120 #$(call gb_LinkTarget__use_libtommath,$(1))
3122 define gb_LinkTarget__use_libfbembed
3123 $(call gb_LinkTarget_use_package,$(1),firebird)
3124 $(call gb_LinkTarget_set_include,$(1),\
3125 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/include \
3126 $$(INCLUDE) \
3128 ifeq ($(COM),MSC)
3129 $(call gb_LinkTarget_add_libs,$(1),\
3130 $(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/bin/ifbclient.lib \
3132 else
3133 $(call gb_LinkTarget_add_libs,$(1),\
3134 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib -lfbclient \
3136 endif
3138 endef
3141 # endef
3143 endif # SYSTEM_FIREBIRD
3145 else # !ENABLE_FIREBIRD_SDBC
3147 gb_LinkTarget__use_firebird :=
3148 # gb_LinkTarget__use_atomic_ops :=
3149 # gb_LinkTarget__use_libtommath :=
3151 endif # ENABLE_FIREBIRD_SDBC
3154 ifneq ($(SYSTEM_POSTGRESQL),)
3156 define gb_LinkTarget__use_postgresql
3158 $(call gb_LinkTarget_set_include,$(1),\
3159 $(POSTGRESQL_INC) \
3160 $$(INCLUDE) \
3163 $(call gb_LinkTarget_add_libs,$(1),\
3164 -lpq \
3167 $(call gb_LinkTarget_add_ldflags,$(1),\
3168 $(POSTGRESQL_LIB) \
3171 endef
3173 else # !SYSTEM_POSTGRESQL
3175 ifeq ($(OS),WNT)
3176 $(eval $(call gb_Helper_register_packages_for_install,postgresqlsdbc,\
3177 postgresql \
3179 endif # WNT
3181 define gb_LinkTarget__use_postgresql
3183 $(call gb_LinkTarget_use_external_project,$(1),postgresql,full)
3185 $(call gb_LinkTarget_set_include,$(1),\
3186 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
3187 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
3188 $$(INCLUDE) \
3191 ifeq ($(OS),WNT)
3193 $(call gb_LinkTarget_add_libs,$(1),\
3194 $(call gb_UnpackedTarball_get_dir,postgresql)/$(gb_MSBUILD_CONFIG)/libpq/libpq.lib \
3197 else # !WNT
3199 $(call gb_LinkTarget_add_libs,$(1),\
3200 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
3201 $(call gb_UnpackedTarball_get_dir,postgresql)/src/common/libpgcommon$(gb_StaticLibrary_PLAINEXT) \
3202 $(call gb_UnpackedTarball_get_dir,postgresql)/src/port/libpgport$(gb_StaticLibrary_PLAINEXT) \
3203 $(if $(WITH_GSSAPI),$(GSSAPI_LIBS)) \
3206 endif # !WNT
3208 endef # gb_LinkTarget__use_postgresql
3210 endif # !SYSTEM_POSTGRESQL
3212 ifneq (,$(filter TRUE,$(ENABLE_KF5) $(ENABLE_GTK3_KDE5)))
3214 define gb_LinkTarget__use_kf5
3215 $(call gb_LinkTarget_set_include,$(1),\
3216 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS)))) \
3217 $$(INCLUDE) \
3220 $(call gb_LinkTarget_add_cxxflags,$(1),\
3221 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS))) \
3224 $(call gb_LinkTarget_add_libs,$(1),\
3225 $(KF5_LIBS) \
3228 endef
3230 else # !ENABLE_KF5
3232 define gb_LinkTarget__use_kf5
3234 endef
3236 endif # ENABLE_KF5
3240 ifneq (,$(filter TRUE,$(ENABLE_QT5) $(ENABLE_GTK3_KDE5)))
3242 define gb_LinkTarget__use_qt5
3243 $(call gb_LinkTarget_set_include,$(1),\
3244 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS)))) \
3245 $$(INCLUDE) \
3248 $(call gb_LinkTarget_add_defs,$(1),\
3249 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS))) \
3252 $(call gb_LinkTarget_add_libs,$(1),\
3253 $(QT5_LIBS) \
3256 endef
3258 else # !ENABLE_QT5
3260 define gb_LinkTarget__use_qt5
3262 endef
3264 endif # ENABLE_QT5
3266 ifeq ($(ENABLE_QT6),TRUE)
3268 define gb_LinkTarget__use_qt6
3269 $(call gb_LinkTarget_set_include,$(1),\
3270 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT6_CFLAGS)))) \
3271 $$(INCLUDE) \
3274 $(call gb_LinkTarget_add_defs,$(1),\
3275 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT6_CFLAGS))) \
3278 $(call gb_LinkTarget_add_libs,$(1),\
3279 $(QT6_LIBS) \
3282 endef
3284 else # !ENABLE_QT6
3286 define gb_LinkTarget__use_qt6
3288 endef
3290 endif # ENABLE_QT6
3293 # PYTHON
3294 # extra python_headers external because pyuno wrapper must not link python
3295 ifneq ($(SYSTEM_PYTHON),)
3297 define gb_LinkTarget__use_python_headers
3298 $(call gb_LinkTarget_add_defs,$(1),\
3299 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3302 $(call gb_LinkTarget_set_include,$(1),\
3303 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3304 $$(INCLUDE) \
3307 endef
3309 define gb_LinkTarget__use_python
3310 $(call gb_LinkTarget__use_python_headers,$(1))
3312 $(call gb_LinkTarget_add_libs,$(1),\
3313 $(PYTHON_LIBS) \
3316 endef
3318 else # !SYSTEM_PYTHON
3320 $(eval $(call gb_Helper_register_packages_for_install,python,\
3321 python3 \
3322 $(if $(filter WNT,$(OS)),libffi) \
3325 define gb_LinkTarget__use_python_headers
3326 $(call gb_LinkTarget_use_external_project,$(1),python3,full)
3327 $(call gb_LinkTarget_set_include,$(1),\
3328 -I$(call gb_UnpackedTarball_get_dir,python3) \
3329 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3330 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3331 $$(INCLUDE) \
3334 endef
3336 define gb_LinkTarget__use_python
3337 $(call gb_LinkTarget__use_python_headers,$(1))
3338 ifeq ($(OS),MACOSX)
3339 $(call gb_LinkTarget_use_generated_package,$(1),python3)
3340 else
3341 $(call gb_LinkTarget_use_package,$(1),python3)
3342 endif
3344 ifeq ($(OS),WNT)
3345 ifeq ($(CPUNAME),X86_64)
3346 python_arch_subdir=amd64
3347 else ifeq ($(CPUNAME),AARCH64)
3348 python_arch_subdir=arm64
3349 else
3350 python_arch_subdir=win32
3351 endif
3352 $(call gb_LinkTarget_add_libs,$(1),\
3353 $(call gb_UnpackedTarball_get_dir,python3)/PCbuild/$(python_arch_subdir)/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).lib \
3355 else ifeq ($(OS),MACOSX)
3356 $(call gb_LinkTarget_add_libs,$(1),\
3357 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3359 else
3360 $(call gb_LinkTarget_add_libs,$(1),\
3361 -L$(call gb_UnpackedTarball_get_dir,python3) \
3362 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if $(ENABLE_DBGUTIL),d) \
3364 endif
3366 endef
3368 # this is only used by python currently
3369 define gb_ExternalProject__use_libffi
3370 $(call gb_ExternalProject_use_external_project,$(1),libffi)
3372 endef
3374 endif # SYSTEM_PYTHON
3376 # ORCUS
3377 ifneq ($(SYSTEM_LIBORCUS),)
3379 define gb_LinkTarget__use_orcus
3380 $(call gb_LinkTarget_set_include,$(1),\
3381 $$(INCLUDE) \
3382 $(ORCUS_CFLAGS) \
3384 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3385 endef
3387 define gb_LinkTarget__use_orcus-parser
3389 endef
3391 else # !SYSTEM_LIBORCUS
3393 ifeq ($(COM),MSC)
3395 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3396 orcus \
3397 orcus-parser \
3400 define gb_LinkTarget__use_orcus
3401 $(call gb_LinkTarget_set_include,$(1),\
3402 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3403 $$(INCLUDE) \
3406 $(call gb_LinkTarget_use_libraries,$(1),\
3407 orcus \
3410 endef
3412 define gb_LinkTarget__use_orcus-parser
3413 $(call gb_LinkTarget_set_include,$(1),\
3414 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3415 $$(INCLUDE) \
3418 $(call gb_LinkTarget_use_libraries,$(1),\
3419 orcus-parser \
3422 endef
3424 else # !MSC
3426 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3427 liborcus \
3430 define gb_LinkTarget__use_orcus
3431 $(call gb_LinkTarget_use_package,$(1),liborcus)
3433 $(call gb_LinkTarget_set_include,$(1),\
3434 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3435 $$(INCLUDE) \
3438 $(call gb_LinkTarget_add_libs,$(1),\
3439 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.17 \
3442 $(if $(SYSTEM_BOOST), \
3443 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3444 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3447 endef
3449 define gb_LinkTarget__use_orcus-parser
3450 $(call gb_LinkTarget_use_package,$(1),liborcus)
3452 $(call gb_LinkTarget_set_include,$(1),\
3453 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3454 $$(INCLUDE) \
3457 $(call gb_LinkTarget_add_libs,$(1),\
3458 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.17 \
3461 endef
3463 endif # MSC
3465 endif # SYSTEM_LIBORCUS
3467 ifeq ($(ENABLE_EOT),TRUE)
3469 ifneq ($(SYSTEM_LIBEOT),)
3471 define gb_LinkTarget__use_libeot
3472 $(call gb_LinkTarget_set_include,$(1),\
3473 $$(INCLUDE) \
3474 $(LIBEOT_CFLAGS) \
3476 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3478 endef
3480 gb_ExternalProject__use_libeot :=
3482 else # !SYSTEM_LIBEOT
3484 define gb_LinkTarget__use_libeot
3485 $(call gb_LinkTarget_set_include,$(1),\
3486 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3487 $$(INCLUDE) \
3489 $(call gb_LinkTarget_add_libs,$(1),\
3490 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3492 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3494 endef
3496 define gb_ExternalProject__use_libeot
3497 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3499 endef
3501 endif # SYSTEM_LIBEOT
3503 else # !ENABLE_EOT
3505 gb_LinkTarget__use_libeot :=
3506 gb_ExternalProject__use_libeot :=
3508 endif # ENABLE_EOT
3510 ### X11 stuff ###
3512 ifeq ($(USING_X11), TRUE)
3514 define gb_LinkTarget__use_Xrandr
3515 $(call gb_LinkTarget_set_include,$(1),\
3516 $$(INCLUDE) \
3517 $(XRANDR_CFLAGS) \
3520 $(call gb_LinkTarget_add_libs,$(1),\
3521 $(XRANDR_LIBS) \
3523 endef
3525 define gb_LinkTarget__use_Xrender
3526 $(call gb_LinkTarget_set_include,$(1),\
3527 $$(INCLUDE) \
3528 $(XRENDER_CFLAGS) \
3531 $(call gb_LinkTarget_add_libs,$(1),\
3532 $(XRENDER_LIBS) \
3534 endef
3536 endif # USING_X11
3539 gb_ExternalProject__use_nss3:=
3542 ifneq ($(SYSTEM_NSS),)
3544 define gb_LinkTarget__use_nss3
3545 $(call gb_LinkTarget_add_defs,$(1),\
3546 -DSYSTEM_NSS \
3549 $(call gb_LinkTarget_set_include,$(1),\
3550 $$(INCLUDE) \
3551 $(NSS_CFLAGS) \
3554 $(call gb_LinkTarget_add_libs,$(1),\
3555 $(NSS_LIBS) \
3558 endef
3560 define gb_LinkTarget__use_nssutil3
3561 $(call gb_LinkTarget__use_nss3,$(1))
3563 endef
3565 define gb_LinkTarget__use_plc4
3566 $(call gb_LinkTarget__use_nss3,$(1))
3568 endef
3570 define gb_LinkTarget__use_ssl3
3571 $(call gb_LinkTarget__use_nss3,$(1))
3573 endef
3575 else # !SYSTEM_NSS
3577 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3578 nss \
3581 define gb_LinkTarget__use_nss3
3582 $(call gb_LinkTarget_use_package,$(1),nss)
3583 $(call gb_LinkTarget_set_include,$(1),\
3584 $$(INCLUDE) \
3585 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3586 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3589 ifeq ($(COM),MSC)
3590 $(call gb_LinkTarget_add_libs,$(1),\
3591 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3592 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3593 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3595 else
3596 $(call gb_LinkTarget_add_libs,$(1),\
3597 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3598 -lnspr4 \
3599 -lnss3 \
3600 -lsmime3 \
3602 endif
3604 endef
3606 define gb_LinkTarget__use_plc4
3607 $(call gb_LinkTarget_use_package,$(1),nss)
3608 ifeq ($(COM),MSC)
3609 $(call gb_LinkTarget_add_libs,$(1),\
3610 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3612 else
3613 $(call gb_LinkTarget_add_libs,$(1),\
3614 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3616 endif
3618 endef
3620 define gb_LinkTarget__use_ssl3
3621 $(call gb_LinkTarget_use_package,$(1),nss)
3622 ifeq ($(COM),MSC)
3623 $(call gb_LinkTarget_add_libs,$(1),\
3624 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3626 else
3627 $(call gb_LinkTarget_add_libs,$(1),\
3628 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3630 endif
3632 endef
3634 define gb_LinkTarget__use_nssutil3
3635 $(call gb_LinkTarget_use_package,$(1),nss)
3636 $(call gb_LinkTarget_set_include,$(1),\
3637 $$(INCLUDE) \
3638 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3639 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3642 ifeq ($(COM),MSC)
3643 $(call gb_LinkTarget_add_libs,$(1),\
3644 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nssutil3.lib \
3646 else
3647 $(call gb_LinkTarget_add_libs,$(1),\
3648 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3649 -lnssutil3 \
3651 endif
3653 endef
3655 define gb_ExternalProject__use_nss3
3656 $(call gb_ExternalProject_use_package,$(1),nss)
3658 endef
3660 endif # SYSTEM_NSS
3662 ifeq ($(ENABLE_BREAKPAD),TRUE)
3664 define gb_LinkTarget__use_breakpad
3665 $(call gb_LinkTarget_set_include,$(1),\
3666 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3667 $$(INCLUDE) \
3670 ifeq ($(COM),MSC)
3671 $(call gb_LinkTarget_use_static_libraries,$(1),\
3672 breakpad \
3674 else
3675 $(call gb_LinkTarget_add_libs,$(1),\
3676 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3678 endif
3680 $(call gb_LinkTarget_use_external_project,$(1),breakpad)
3682 endef
3684 endif # ENABLE_BREAKPAD
3686 ifeq ($(ENABLE_GPGMEPP),TRUE)
3688 ifneq ($(SYSTEM_GPGMEPP),)
3690 gb_ExternalProject__use_gpgmepp:=
3691 gb_ExternalProject__use_libassuan:=
3692 gb_ExternalProject__use_libgpg-error:=
3694 define gb_LinkTarget__use_gpgmepp
3695 $(call gb_LinkTarget_set_include,$(1),\
3696 $$(INCLUDE) \
3697 $$(GPGMEPP_CFLAGS) \
3700 $(call gb_LinkTarget_add_libs,$(1),\
3701 $(GPGMEPP_LIBS) \
3704 endef
3706 else ifneq ($(filter GPGMEPP,$(BUILD_TYPE)),) # NON-SYSTEM_GPGME
3708 define gb_ExternalProject__use_gpgmepp
3709 $(call gb_ExternalProject_use_external_project,$(1),gpgmepp)
3711 endef
3712 define gb_ExternalProject__use_libassuan
3713 $(call gb_ExternalProject_use_external_project,$(1),libassuan)
3715 endef
3716 define gb_ExternalProject__use_libgpg-error
3717 $(call gb_ExternalProject_use_external_project,$(1),libgpg-error)
3719 endef
3721 ifneq ($(filter WNT,$(OS)),)
3723 define gb_LinkTarget__use_libgpg-error
3724 $(call gb_LinkTarget_use_package,$(1),libgpg-error)
3726 $(call gb_LinkTarget_set_include,$(1),\
3727 $(GPG_ERROR_CFLAGS) \
3728 $$(INCLUDE) \
3730 $(call gb_LinkTarget_add_libs,$(1),\
3731 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libgpg-error)/src/.libs libgpg-error.lib \
3734 endef
3736 define gb_LinkTarget__use_libassuan
3737 $(call gb_LinkTarget_use_package,$(1),libassuan)
3739 $(call gb_LinkTarget_set_include,$(1),\
3740 $(LIBASSUAN_CFLAGS) \
3741 $$(INCLUDE) \
3743 $(call gb_LinkTarget_add_libs,$(1),\
3744 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libassuan)/src/.libs libassuan.lib \
3747 endef
3749 define gb_LinkTarget__use_gpgmepp
3750 $(call gb_LinkTarget_set_include,$(1),\
3751 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3752 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3753 $$(GPG_ERROR_CFLAGS) \
3754 $$(INCLUDE) \
3756 $(call gb_LinkTarget_use_libraries,$(1),\
3757 gpgmepp \
3760 endef
3762 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3763 gpgmepp \
3764 libassuan \
3765 libgpg-error \
3768 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3769 gpgmepp \
3772 endif
3774 ifneq ($(filter MACOSX LINUX,$(OS)),)
3776 define gb_LinkTarget__use_gpgmepp
3777 $(call gb_LinkTarget_use_package,$(1),gpgmepp)
3779 $(call gb_LinkTarget_set_include,$(1),\
3780 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3781 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3782 $$(GPG_ERROR_CFLAGS) \
3783 $$(INCLUDE) \
3785 $(call gb_LinkTarget_add_libs,$(1),\
3786 -L$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src/.libs/ -lgpgmepp \
3787 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L$(call gb_UnpackedTarball_get_dir,gpgmepp)/src/.libs/ -lgpgme) \
3788 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(GPG_ERROR_LIBS)) \
3789 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(LIBASSUAN_LIBS)) \
3792 endef
3794 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3795 gpgmepp \
3796 libassuan \
3797 libgpg-error \
3800 endif
3802 endif
3804 else # !ENABLE_GPGMEPP
3806 gb_ExternalProject__use_gpgmepp :=
3807 gb_ExternalProject__use_libassuan :=
3808 gb_ExternalProject__use_libgpg-error :=
3810 gb_LinkTarget__use_gpgmepp :=
3811 gb_LinkTarget__use_libassuan :=
3812 gb_LinkTarget__use_libgpg-error :=
3814 endif # ENABLE_GPGMEPP
3816 define gb_LinkTarget__use_dconf
3817 $(call gb_LinkTarget_set_include,$(1),\
3818 $$(INCLUDE) \
3819 $(DCONF_CFLAGS) \
3822 $(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3823 endef
3825 ### Jars ############################################################
3827 ifneq ($(SYSTEM_HSQLDB),)
3829 define gb_Jar__use_hsqldb
3830 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3831 endef
3832 define gb_JunitTest__use_hsqldb
3833 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3834 endef
3836 else # !SYSTEM_HSQLDB
3838 ifeq ($(ENABLE_JAVA),TRUE)
3839 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3840 hsqldb \
3842 endif
3844 define gb_Jar__use_hsqldb
3845 $(call gb_Jar_use_jar,$(1),hsqldb)
3846 endef
3847 define gb_JunitTest__use_hsqldb
3848 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3849 endef
3851 endif # SYSTEM_HSQLDB
3854 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3856 ifneq ($(SYSTEM_BSH),)
3858 define gb_Jar__use_bsh
3859 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3860 endef
3862 else # !SYSTEM_BSH
3864 ifeq ($(ENABLE_JAVA),TRUE)
3865 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3866 bsh \
3868 endif
3870 define gb_Jar__use_bsh
3871 $(call gb_Jar_use_jar,$(1),bsh)
3872 endef
3874 endif # SYSTEM_BSH
3876 endif
3878 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3880 ifneq ($(SYSTEM_RHINO),)
3882 define gb_Jar__use_rhino
3883 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3884 endef
3886 else # !SYSTEM_RHINO
3888 ifeq ($(ENABLE_JAVA),TRUE)
3889 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3890 js \
3892 endif
3894 define gb_Jar__use_rhino
3895 $(call gb_Jar_use_jar,$(1),js)
3896 endef
3898 endif # SYSTEM_RHINO
3900 endif
3902 ifneq ($(SYSTEM_JFREEREPORT),)
3904 define gb_Jar__use_flow-engine
3905 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3906 endef
3908 define gb_Jar__use_flute
3909 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3910 endef
3912 define gb_Jar__use_libbase
3913 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3914 endef
3916 define gb_Jar__use_libfonts
3917 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3918 endef
3920 define gb_Jar__use_libformula
3921 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3922 endef
3924 define gb_Jar__use_liblayout
3925 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3926 endef
3928 define gb_Jar__use_libloader
3929 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3930 endef
3932 define gb_Jar__use_librepository
3933 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3934 endef
3936 define gb_Jar__use_libserializer
3937 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3938 endef
3940 define gb_Jar__use_libxml
3941 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3942 endef
3944 define gb_Jar__use_sac
3945 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3946 endef
3948 else # !SYSTEM_JFREEREPORT
3950 ifeq ($(ENABLE_JAVA),TRUE)
3951 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3952 flow-engine \
3953 flute-1.1.6 \
3954 libbase-1.1.6 \
3955 libfonts-1.1.6 \
3956 libformula-1.1.7 \
3957 liblayout \
3958 libloader-1.1.6 \
3959 librepository-1.1.6 \
3960 libserializer-1.1.6 \
3961 libxml-1.1.7 \
3962 sac \
3964 endif
3966 define gb_Jar__use_flow-engine
3967 $(call gb_Jar_use_jar,$(1),flow-engine)
3968 endef
3970 define gb_Jar__use_flute
3971 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3972 endef
3974 define gb_Jar__use_libbase
3975 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3976 endef
3978 define gb_Jar__use_libfonts
3979 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3980 endef
3982 define gb_Jar__use_libformula
3983 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3984 endef
3986 define gb_Jar__use_liblayout
3987 $(call gb_Jar_use_jar,$(1),liblayout)
3988 endef
3990 define gb_Jar__use_libloader
3991 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3992 endef
3994 define gb_Jar__use_librepository
3995 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3996 endef
3998 define gb_Jar__use_libserializer
3999 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
4000 endef
4002 define gb_Jar__use_libxml
4003 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
4004 endef
4006 define gb_Jar__use_sac
4007 $(call gb_Jar_use_jar,$(1),sac)
4008 endef
4010 endif # SYSTEM_JFREEREPORT
4013 # Executables
4015 define gb_Executable__register_bestreversemap
4016 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
4017 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target_for_build,sal_textenc))) \
4019 endef
4021 # TODO depending on the whole URE might be overkill, but I do not have a
4022 # Windows machine to debug it...
4023 define gb_Executable__register_climaker
4024 $(call gb_Executable_add_runtime_dependencies,climaker,\
4025 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
4026 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
4027 $(call gb_UnoApi_get_target_for_build,udkapi) \
4028 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
4030 endef
4032 define gb_Executable__register_cppumaker
4033 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
4034 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
4036 endef
4038 # This is used to determine what we need for 'build' platform.
4039 define gb_Executable__register_gengal
4040 $(call gb_Executable_add_runtime_dependencies,gengal,\
4041 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
4042 $(call gb_Library_get_target_for_build,localedata_en) \
4043 $(if $(filter MACOSX,$(OS_FOR_BUILD)),$(call gb_Library_get_target_for_build,vclplug_osx)) \
4044 $(if $(filter WNT,$(OS_FOR_BUILD)),$(call gb_Library_get_target_for_build,vclplug_win)) \
4045 $(if $(filter host,$(gb_Side)),$(call gb_Package_get_target,postprocess_images)) \
4046 $(call gb_Package_get_target_for_build,postprocess_registry) \
4047 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
4048 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
4049 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
4050 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
4051 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
4052 $(call gb_UnoApi_get_target_for_build,offapi) \
4053 $(call gb_UnoApi_get_target_for_build,udkapi) \
4055 endef
4057 ifeq ($(SYSTEM_ICU),)
4059 define gb_Executable__register_gendict
4060 $(call gb_Executable_add_runtime_dependencies,gendict,\
4061 $(call gb_Package_get_target_for_build,icu) \
4062 $(call gb_Package_get_target_for_build,icu_ure) \
4064 endef
4066 endif
4068 define gb_Executable__register_idlc
4069 $(call gb_Executable_add_runtime_dependencies,idlc,\
4070 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
4072 endef
4074 define gb_Executable__register_localize
4075 $(call gb_Executable_add_runtime_dependencies,localize,\
4076 $(foreach exec,cfgex helpex propex treex ulfex xrmex,\
4077 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
4080 endef
4082 # FIXME ure/services.rdb needs cleanup
4083 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
4084 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
4085 define gb_Executable__register_saxparser
4086 $(call gb_Executable_add_runtime_dependencies,saxparser,\
4087 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
4088 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
4089 $(call gb_Rdb_get_target_for_build,saxparser) \
4090 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
4091 $(call gb_UnoApi_get_target_for_build,udkapi) \
4093 endef
4095 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
4096 # required due to the settings for URE_SERVICES and URE_TYPES in
4097 # cppuhelper/source/unorc
4098 define gb_Executable__register_uno
4099 $(call gb_Executable_add_runtime_dependencies,uno,\
4100 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
4101 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
4102 $(call gb_UnoApi_get_target_for_build,udkapi) \
4104 endef
4107 # External executables
4109 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
4111 gb_ExternalExecutable__register_xmllint :=
4113 else # ! SYSTEM_LIBXML_FOR_BUILD
4115 define gb_ExternalExecutable__register_xmllint
4116 $(call gb_ExternalExecutable_set_internal,xmllint,$(WORKDIR_FOR_BUILD)/UnpackedTarball/libxml2/$(if $(filter MSC,$(COM)),win32/bin.msvc)/xmllint$(gb_Executable_EXT_for_build),libxml2)
4117 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
4118 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
4119 $(call gb_Package_get_target,libxml2) \
4122 endef
4124 endif # SYSTEM_LIBXML_FOR_BUILD
4126 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
4128 gb_ExternalExecutable__register_xsltproc :=
4130 else # ! SYSTEM_LIBXSLT_FOR_BUILD
4132 define gb_ExternalExecutable__register_xsltproc
4133 $(call gb_ExternalExecutable_set_internal,xsltproc,$(WORKDIR_FOR_BUILD)/UnpackedTarball/libxslt/$(if $(filter MSC,$(COM)),win32/bin.msvc,xsltproc)/xsltproc$(gb_Executable_EXT_for_build),libxslt)
4134 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
4135 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
4136 $(call gb_Package_get_target,libxml2) \
4137 $(call gb_Package_get_target,libxslt) \
4140 endef
4142 endif # SYSTEM_LIBXSLT_FOR_BUILD
4144 ifneq (,$(SYSTEM_UCPP))
4146 gb_ExternalExecutable__register_ucpp :=
4148 else # ! SYSTEM_UCPP
4150 define gb_ExternalExecutable__register_ucpp
4151 $(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
4153 endef
4155 endif # SYSTEM_UCPP
4157 ifeq (,$(PYTHON_FOR_BUILD))
4159 define gb_ExternalExecutable__register_python
4160 ifeq ($(OS),MACOSX)
4162 # use set_external, to avoid having the command added as prerequisite for the
4163 # targets that make use of it. (Otherwise make will choke as it doesn't have a
4164 # matching rule to build that specific file)
4165 $(call gb_ExternalExecutable_set_external,python,$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO/LibreOfficePython.framework/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR))
4166 # the Zip ensures that internal python has been built (cannot use the Package
4167 # target, as that is not used on Mac)
4168 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
4170 else
4172 $(call gb_ExternalExecutable_set_internal,python,$(INSTROOT_FOR_BUILD)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
4173 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
4174 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
4176 endif
4178 endef
4180 else
4182 define gb_ExternalExecutable__register_python
4183 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
4185 endef
4187 endif # PYTHON_FOR_BUILD
4189 ifneq ($(SYSTEM_GENBRK),)
4191 define gb_ExternalExecutable__register_genbrk
4192 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
4194 endef
4196 else # ! SYSTEM_GENBRK
4198 define gb_ExternalExecutable__register_genbrk
4199 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
4200 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4201 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
4202 $(call gb_Package_get_target_for_build,icu) \
4203 $(call gb_Package_get_target_for_build,icu_ure) \
4206 endef
4208 endif
4210 ifneq ($(SYSTEM_GENCCODE),)
4212 define gb_ExternalExecutable__register_genccode
4213 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
4215 endef
4217 else # ! SYSTEM_GENCCODE
4219 define gb_ExternalExecutable__register_genccode
4220 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
4221 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4222 $(call gb_ExternalExecutable_add_dependencies,genccode,\
4223 $(call gb_Package_get_target_for_build,icu) \
4224 $(call gb_Package_get_target_for_build,icu_ure) \
4227 endef
4229 endif
4231 ifneq ($(SYSTEM_GENCMN),)
4233 define gb_ExternalExecutable__register_gencmn
4234 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
4236 endef
4238 else # ! SYSTEM_GENCMN
4240 define gb_ExternalExecutable__register_gencmn
4241 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
4242 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4243 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
4244 $(call gb_Package_get_target_for_build,icu) \
4245 $(call gb_Package_get_target_for_build,icu_ure) \
4248 endef
4250 endif
4252 ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
4253 ifneq ($(SYSTEM_BZIP2),)
4255 define gb_LinkTarget__use_bzip2
4256 $(call gb_LinkTarget_set_include,$(1),\
4257 $(BZIP2_CFLAGS) \
4258 $$(INCLUDE) \
4260 $(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
4262 endef
4264 gb_ExternalProject__use_bzip2 :=
4266 else # !SYSTEM_BZIP2
4268 define gb_LinkTarget__use_bzip2
4269 $(call gb_LinkTarget_set_include,$(1),\
4270 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
4271 $$(INCLUDE) \
4274 ifeq ($(COM),MSC)
4275 $(call gb_LinkTarget_add_libs,$(1),\
4276 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
4278 else
4279 $(call gb_LinkTarget_add_libs,$(1),\
4280 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
4282 endif
4284 $(call gb_LinkTarget_use_external_project,$(1),bzip2)
4285 endef
4287 define gb_ExternalProject__use_bzip2
4288 $(call gb_ExternalProject_use_external_project,$(1),bzip2)
4289 endef
4291 endif
4292 endif
4294 define gb_LinkTarget__use_clew
4295 $(call gb_LinkTarget_set_include,$(1), \
4296 -I$(SRCDIR)/external/clew/source/include \
4297 $$(INCLUDE) \
4299 $(call gb_LinkTarget_use_libraries,$(1),clew)
4300 endef
4302 ifneq ($(ENABLE_PDFIUM),)
4303 define gb_LinkTarget__use_pdfium
4304 $(call gb_LinkTarget_set_include,$(1),\
4305 -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \
4306 -DCOMPONENT_BUILD \
4307 $$(INCLUDE) \
4309 $(call gb_LinkTarget_use_libraries,$(1),pdfium)
4310 endef
4311 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
4312 pdfium \
4314 endif
4316 define gb_LinkTarget__use_dtoa
4317 $(call gb_LinkTarget_use_unpacked,$(1),dtoa)
4318 $(call gb_LinkTarget_set_include,$(1),\
4319 -I$(call gb_UnpackedTarball_get_dir,dtoa/include/)\
4320 $$(INCLUDE) \
4322 $(call gb_LinkTarget_use_static_libraries,$(1),\
4323 dtoa \
4326 endef
4328 define gb_ExternalProject__use_dtoa
4329 $(call gb_ExternalProject_use_static_libraries,$(1),dtoa)
4331 endef
4333 $(eval $(call gb_Helper_register_packages_for_install,ucrt_binarytable,\
4334 $(if $(UCRT_REDISTDIR),ucrt) \
4337 ifneq ($(SYSTEM_BOX2D),)
4339 define gb_LinkTarget__use_box2d
4340 $(call gb_LinkTarget_set_include,$(1),\
4341 -DSYSTEM_BOX2D \
4342 $$(INCLUDE) \
4343 $(BOX2D_CFLAGS) \
4345 $(call gb_LinkTarget_add_libs,$(1),$(BOX2D_LIBS))
4347 endef
4349 gb_ExternalProject__use_box2d :=
4351 else # !SYSTEM_BOX2D
4353 define gb_LinkTarget__use_box2d
4354 $(call gb_LinkTarget_use_unpacked,$(1),box2d)
4355 $(call gb_LinkTarget_set_include,$(1),\
4356 -I$(call gb_UnpackedTarball_get_dir,box2d/Box2D/)\
4357 $$(INCLUDE) \
4359 $(call gb_LinkTarget_use_static_libraries,$(1),\
4360 box2d \
4363 endef
4365 define gb_ExternalProject__use_box2d
4366 $(call gb_ExternalProject_use_static_libraries,$(1),box2d)
4368 endef
4370 endif # SYSTEM_BOX2D
4372 ifneq ($(SYSTEM_ZXING),)
4374 define gb_LinkTarget__use_zxing
4375 $(call gb_LinkTarget_set_include,$(1),\
4376 -DSYSTEM_ZXING \
4377 $$(INCLUDE) \
4378 $(ZXING_CFLAGS) \
4380 $(call gb_LinkTarget_add_libs,$(1),$(ZXING_LIBS))
4382 endef
4384 gb_ExternalProject__use_zxing :=
4386 else # !SYSTEM_ZXING
4388 ifneq ($(ENABLE_ZXING),)
4390 define gb_LinkTarget__use_zxing
4391 $(call gb_LinkTarget_use_unpacked,$(1),zxing)
4392 $(call gb_LinkTarget_set_include,$(1),\
4393 -I$(call gb_UnpackedTarball_get_dir,zxing/core/src/)\
4394 $$(INCLUDE) \
4396 $(call gb_LinkTarget_use_static_libraries,$(1),\
4397 zxing \
4400 endef
4402 define gb_ExternalProject__use_zxing
4403 $(call gb_ExternalProject_use_static_libraries,$(1),zxing)
4405 endef
4407 else # !ENABLE_ZXING
4409 define gb_LinkTarget__use_zxing
4410 endef
4412 endif # ENABLE_ZXING
4414 endif # SYSTEM_ZXING
4416 # vim: set noet sw=4 ts=4: