blob: 12d59fb206e0b699f9db92eda62b10679e1dd1d7 [file] [log] [blame]
Takeshi Abeb2bd33e2011-08-10 02:12:48 +09001# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
Michael Stahlc74af0d2011-04-01 20:49:35 +00002#
Michael Meeks1e4422a2013-05-16 21:56:04 +01003# This file is part of the LibreOffice project.
Kohei Yoshidaa6639312012-07-27 22:14:39 -04004#
Michael Meeks1e4422a2013-05-16 21:56:04 +01005# 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/.
Michael Stahlc74af0d2011-04-01 20:49:35 +00008#
Michael Meeks1e4422a2013-05-16 21:56:04 +01009# This file incorporates work covered by the following license notice:
Michael Stahlc74af0d2011-04-01 20:49:35 +000010#
Michael Meeks1e4422a2013-05-16 21:56:04 +010011# 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 .
Michael Stahlc74af0d2011-04-01 20:49:35 +000018#
Michael Stahlc74af0d2011-04-01 20:49:35 +000019
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.
23
Zolnai Tamás62fd6302014-04-18 12:55:56 +020024# for every external, a function gb_LinkTarget__use_FOO is defined,
Michael Stahlc74af0d2011-04-01 20:49:35 +000025# once for the system case, once for the internal case.
26
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.
29
David Ostrovsky152e2a22014-11-30 18:26:01 +010030
31ifeq ($(CPUNAME),X86_64)
32wnt_arch_subdir_optional=x64/
33wnt_arch_subdir_mandatory=x64
34else ifeq ($(CPUNAME),INTEL)
35wnt_arch_subdir_mandatory=Win32
36endif
37
Matúš Kukan8e535df2012-04-07 13:59:33 +020038# External headers
39
Michael Stahl5378dea2014-02-11 19:11:47 +010040ifneq ($(SYSTEM_ODBC_HEADERS),)
Matúš Kukan5eff0b62012-04-07 13:46:59 +020041
42define gb_LinkTarget__use_odbc_headers
43$(call gb_LinkTarget_add_defs,$(1),\
44 -DSYSTEM_ODBC_HEADERS \
45)
46
47endef
48
Michael Stahl5378dea2014-02-11 19:11:47 +010049else # !SYSTEM_ODBC_HEADERS
Matúš Kukan5eff0b62012-04-07 13:46:59 +020050
51define gb_LinkTarget__use_odbc_headers
Michael Stahlfea65aa2013-05-06 20:09:47 +020052$(call gb_LinkTarget_set_include,$(1),\
Khaled Hosny891bb7c2013-11-04 18:40:17 +020053 -I$(SRCDIR)/external/unixODBC/inc \
Michael Stahlfea65aa2013-05-06 20:09:47 +020054 $$(INCLUDE) \
55)
Matúš Kukan5eff0b62012-04-07 13:46:59 +020056
57endef
58
Michael Stahl5378dea2014-02-11 19:11:47 +010059endif # SYSTEM_ODBC_HEADERS
Matúš Kukan5eff0b62012-04-07 13:46:59 +020060
Michael Stahle3abec32014-02-11 15:57:18 +010061ifneq ($(SYSTEM_MDDS),)
Matúš Kukan22f50fb2012-08-29 12:27:17 +020062
David Tardond5d39272014-03-03 15:29:27 +010063gb_ExternalProject__use_mdds_headers :=
64
David Tardon93aff252014-03-03 16:23:27 +010065define gb_LinkTarget__use_mdds_headers
66$(call gb_LinkTarget_set_include,$(1),\
67 $(MDDS_CFLAGS) \
68 $$(INCLUDE) \
69)
70
71endef
Matúš Kukan22f50fb2012-08-29 12:27:17 +020072
Michael Stahle3abec32014-02-11 15:57:18 +010073else # !SYSTEM_MDDS
Matúš Kukan22f50fb2012-08-29 12:27:17 +020074
David Tardond5d39272014-03-03 15:29:27 +010075define gb_ExternalProject__use_mdds_headers
David Tardon7fffbdc2015-06-24 15:08:48 +020076$(call gb_ExternalProject_use_unpacked,$(1),mdds)
David Tardond5d39272014-03-03 15:29:27 +010077
78endef
79
Matúš Kukan22f50fb2012-08-29 12:27:17 +020080define gb_LinkTarget__use_mdds_headers
81$(call gb_LinkTarget_use_unpacked,$(1),mdds)
82$(call gb_LinkTarget_set_include,$(1),\
David Tardon93aff252014-03-03 16:23:27 +010083 $(MDDS_CFLAGS) \
Matúš Kukan22f50fb2012-08-29 12:27:17 +020084 $$(INCLUDE) \
85)
86
87endef
88
Michael Stahle3abec32014-02-11 15:57:18 +010089endif # SYSTEM_MDDS
Matúš Kukan22f50fb2012-08-29 12:27:17 +020090
Michael Stahlff69e722014-02-11 19:08:10 +010091ifneq ($(SYSTEM_GLM),)
Markus Mohrhardae9e6112013-12-23 17:31:55 +000092
Caolán McNamara2f866012020-02-06 16:45:18 +000093define gb_LinkTarget__use_glm_headers
94$(call gb_LinkTarget_add_defs,$(1),\
95 -DGLM_FORCE_CTOR_INIT \
96)
97
98endef
99
Zolnai Tamás6403f2b2014-06-25 15:19:41 +0200100gb_ExternalProject__use_glm_headers :=
Markus Mohrhardae9e6112013-12-23 17:31:55 +0000101
102else
103
104define gb_LinkTarget__use_glm_headers
Caolán McNamara2f866012020-02-06 16:45:18 +0000105$(call gb_LinkTarget_add_defs,$(1),\
106 -DGLM_FORCE_CTOR_INIT \
107)
Markus Mohrhardae9e6112013-12-23 17:31:55 +0000108$(call gb_LinkTarget_use_unpacked,$(1),glm)
109$(call gb_LinkTarget_set_include,$(1),\
David Tardon13494912015-05-19 16:59:26 +0200110 $(GLM_CFLAGS) \
Markus Mohrhardae9e6112013-12-23 17:31:55 +0000111 $$(INCLUDE) \
112)
113
114endef
115
Zolnai Tamás6403f2b2014-06-25 15:19:41 +0200116define gb_ExternalProject__use_glm_headers
David Tardon682e3592015-06-24 15:11:40 +0200117$(call gb_ExternalProject_use_unpacked,$(1),glm)
Zolnai Tamás6403f2b2014-06-25 15:19:41 +0200118
119endef
120
Markus Mohrhardae9e6112013-12-23 17:31:55 +0000121endif
122
Luboš Luňák478f2902019-10-12 16:24:03 +0200123ifneq ($(ENABLE_SKIA),)
124define gb_LinkTarget__use_skia
125$(call gb_LinkTarget_set_include,$(1),\
Luboš Luňáka81cddb2019-10-17 12:07:48 +0200126 -I$(call gb_UnpackedTarball_get_dir,skia)/include/core \
Tomaž Vajngerl8a4f6502019-10-18 00:29:46 +0200127 -I$(call gb_UnpackedTarball_get_dir,skia)/include/effects \
Luboš Luňák4faf0c52019-11-05 14:04:39 +0100128 -I$(call gb_UnpackedTarball_get_dir,skia)/include/gpu \
Luboš Luňáka81cddb2019-10-17 12:07:48 +0200129 -I$(call gb_UnpackedTarball_get_dir,skia)/include/config \
Luboš Luňák076926c2020-03-10 12:43:45 +0100130 -I$(call gb_UnpackedTarball_get_dir,skia)/include/ports \
Luboš Luňáka81cddb2019-10-17 12:07:48 +0200131 -I$(call gb_UnpackedTarball_get_dir,skia)/include/third_party/vulkan \
Luboš Luňák54be6442019-11-06 16:14:50 +0100132 -I$(call gb_UnpackedTarball_get_dir,skia)/tools/gpu \
Luboš Luňáka81cddb2019-10-17 12:07:48 +0200133 -I$(call gb_UnpackedTarball_get_dir,skia) \
Luboš Luňák2eeb6822020-06-25 10:35:00 +0200134 -I$(SRCDIR)/external/skia/inc/ \
Luboš Luňáka81cddb2019-10-17 12:07:48 +0200135 $$(INCLUDE) \
Luboš Luňák478f2902019-10-12 16:24:03 +0200136)
137$(call gb_LinkTarget_use_libraries,$(1),skia)
Luboš Luňáka81cddb2019-10-17 12:07:48 +0200138$(call gb_LinkTarget_add_defs,$(1),\
139 -DSK_USER_CONFIG_HEADER="<$(BUILDDIR)/config_host/config_skia.h>" \
140 -DSKIA_DLL \
141)
Luboš Luňák478f2902019-10-12 16:24:03 +0200142endef
143$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
Luboš Luňáka81cddb2019-10-17 12:07:48 +0200144 skia \
Luboš Luňák478f2902019-10-12 16:24:03 +0200145))
146endif
147
Michael Stahl674e7912013-05-06 20:23:49 +0200148ifeq (SANE,$(filter SANE,$(BUILD_TYPE)))
David Tardoneafaec92012-12-21 14:08:27 +0100149
150define gb_LinkTarget__use_sane_headers
Michael Stahl72279ea2013-05-06 20:14:35 +0200151$(call gb_LinkTarget_set_include,$(1),\
Mike Kaganski585d9802017-12-22 20:46:12 +0300152 $(if $(filter WNT,$(OS)), \
153 -I$(call gb_UnpackedTarball_get_dir,twain_dsm/pub/include), \
154 -I$(SRCDIR)/external/sane/inc) \
155 $$(INCLUDE) \
David Tardoneafaec92012-12-21 14:08:27 +0100156)
157
Mike Kaganski585d9802017-12-22 20:46:12 +0300158ifeq ($(OS),WNT)
159$(call gb_LinkTarget_use_unpacked,$(1),twain_dsm)
160endif
161
David Tardoneafaec92012-12-21 14:08:27 +0100162endef
163
164else
165
166gb_LinkTarget__use_sane_headers :=
167
168endif
169
Michael Stahl8555b372014-02-11 19:28:33 +0100170ifneq ($(SYSTEM_BLUEZ),)
David Tardon8fa06c82013-11-05 06:53:49 +0100171
172gb_LinkTarget__use_bluez_bluetooth_headers :=
173
174else # !SYSTEM_BLUEZ
175
176define gb_LinkTarget__use_bluez_bluetooth_headers
177$(call gb_LinkTarget_set_include,$(1),\
178 -I$(SRCDIR)/external/bluez_bluetooth/inc \
179 $$(INCLUDE) \
180)
181
182endef
183
184endif # SYSTEM_BLUEZ
185
Matúš Kukan8e535df2012-04-07 13:59:33 +0200186# External libraries
187
Michael Stahle3abec32014-02-11 15:57:18 +0100188ifneq ($(SYSTEM_CPPUNIT),)
David Tardon785e1d92011-07-25 10:34:22 +0200189
190define gb_LinkTarget__use_cppunit
191$(call gb_LinkTarget_set_include,$(1),\
192 $$(INCLUDE) \
193 $(CPPUNIT_CFLAGS) \
194)
195
196$(call gb_LinkTarget_add_libs,$(1),\
197 $(CPPUNIT_LIBS) \
198)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100199
David Tardon785e1d92011-07-25 10:34:22 +0200200endef
201
Michael Stahle3abec32014-02-11 15:57:18 +0100202else # !SYSTEM_CPPUNIT
David Tardon785e1d92011-07-25 10:34:22 +0200203
David Tardon785e1d92011-07-25 10:34:22 +0200204define gb_LinkTarget__use_cppunit
Markus Mohrhardd63a9402016-02-23 11:28:31 +0100205$(call gb_LinkTarget_use_external_project,$(1),cppunit, full)
Peter Foley143835b2012-11-25 16:37:40 -0500206
Peter Foley143835b2012-11-25 16:37:40 -0500207$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200208 -I$(call gb_UnpackedTarball_get_dir,cppunit/include)\
Peter Foley143835b2012-11-25 16:37:40 -0500209 $$(INCLUDE) \
210)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100211
Michael Stahl77fe50b2013-10-23 23:35:16 +0200212ifeq ($(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) \
215)
216else
217$(call gb_LinkTarget_add_libs,$(1),\
218 -L$(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/.libs -lcppunit \
219)
220endif
221
David Tardon785e1d92011-07-25 10:34:22 +0200222endef
223
Michael Stahle3abec32014-02-11 15:57:18 +0100224endif # SYSTEM_CPPUNIT
Michael Stahlc74af0d2011-04-01 20:49:35 +0000225
Caolán McNamara482d7ce2016-11-25 20:25:27 +0000226ifneq ($(SYSTEM_EPOXY),)
David Tardon864f7752014-02-09 21:19:07 +0100227
Caolán McNamara482d7ce2016-11-25 20:25:27 +0000228define gb_LinkTarget__use_epoxy
David Tardon864f7752014-02-09 21:19:07 +0100229$(call gb_LinkTarget_set_include,$(1),\
230 $$(INCLUDE) \
Caolán McNamara482d7ce2016-11-25 20:25:27 +0000231 $(EPOXY_CFLAGS) \
David Tardon864f7752014-02-09 21:19:07 +0100232)
Caolán McNamara482d7ce2016-11-25 20:25:27 +0000233$(call gb_LinkTarget_add_libs,$(1),$(EPOXY_LIBS))
David Tardon864f7752014-02-09 21:19:07 +0100234
235endef
236
Caolán McNamara482d7ce2016-11-25 20:25:27 +0000237gb_ExternalProject__use_epoxy :=
Zolnai Tamás6403f2b2014-06-25 15:19:41 +0200238
Caolán McNamara482d7ce2016-11-25 20:25:27 +0000239else # !SYSTEM_EPOXY
David Tardon864f7752014-02-09 21:19:07 +0100240
Caolán McNamara482d7ce2016-11-25 20:25:27 +0000241define gb_LinkTarget__use_epoxy
242$(call gb_LinkTarget_set_include,$(1),\
243 -I$(call gb_UnpackedTarball_get_dir,epoxy/include) \
244 $$(INCLUDE) \
245)
246
247$(call gb_LinkTarget_use_libraries,$(1),\
248 epoxy \
249)
250
251endef
252
253$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
254 epoxy \
Michael Stahl0c94f232014-03-18 17:17:04 +0100255))
256
Caolán McNamara482d7ce2016-11-25 20:25:27 +0000257define gb_ExternalProject__use_epoxy
258$(call gb_ExternalProject_use_external_project,$(1),epoxy)
David Tardon864f7752014-02-09 21:19:07 +0100259
260endef
261
Caolán McNamara482d7ce2016-11-25 20:25:27 +0000262endif # SYSTEM_EPOXY
David Tardon864f7752014-02-09 21:19:07 +0100263
Tor Lillqvist40900fb2013-01-03 12:48:14 +0200264define gb_LinkTarget__use_iconv
Tamas Bunth26b40fc2018-08-16 16:35:17 +0200265ifeq ($(COM),MSC)
266$(call gb_LinkTarget_add_libs,$(1),libiconv.lib)
267else
Tor Lillqvist40900fb2013-01-03 12:48:14 +0200268$(call gb_LinkTarget_add_libs,$(1),-liconv)
Tamas Bunth26b40fc2018-08-16 16:35:17 +0200269endif
Tor Lillqvist40900fb2013-01-03 12:48:14 +0200270endef
271
Michael Stahl871d75e2017-09-14 13:30:05 +0200272ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
Peter Foleyc322d502013-01-23 16:29:08 -0500273
Michael Stahl871d75e2017-09-14 13:30:05 +0200274define gb_LinkTarget__use_mariadb-connector-c
David Tardon217eae42013-11-05 06:49:33 +0100275$(call gb_LinkTarget_set_include,$(1),\
276 $$(INCLUDE) \
277 $(MARIADB_CFLAGS) \
278)
279$(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS))
280
281endef
Michael Stahl871d75e2017-09-14 13:30:05 +0200282gb_ExternalProject__use_mariadb-connector-c :=
David Tardon217eae42013-11-05 06:49:33 +0100283
Michael Stahl871d75e2017-09-14 13:30:05 +0200284else # !SYSTEM_MARIADB_CONNECTOR_C
David Tardon217eae42013-11-05 06:49:33 +0100285
Michael Stahl871d75e2017-09-14 13:30:05 +0200286define gb_LinkTarget__use_mariadb-connector-c
David Tardon217eae42013-11-05 06:49:33 +0100287$(call gb_LinkTarget_set_include,$(1),\
288 $$(INCLUDE) \
289 $(MARIADB_CFLAGS) \
290)
291$(call gb_LinkTarget_use_static_libraries,$(1),\
Michael Stahl871d75e2017-09-14 13:30:05 +0200292 mariadb-connector-c \
David Tardon217eae42013-11-05 06:49:33 +0100293)
Michael Stahl13a05ee2018-08-20 19:07:40 +0200294ifeq ($(OS),MACOSX)
295$(call gb_LinkTarget_add_libs,$(1),\
296 -liconv \
297)
298endif
Michael Stahlfe041bb2020-06-16 15:09:50 +0200299$(call gb_LinkTarget_use_system_win32_libs,$(1),\
300 ws2_32 \
301 advapi32 \
302 kernel32 \
303 shlwapi \
304 crypt32 \
305)
David Tardon217eae42013-11-05 06:49:33 +0100306
307endef
Michael Stahl871d75e2017-09-14 13:30:05 +0200308define gb_ExternalProject__use_mariadb-connector-c
309$(call gb_ExternalProject_use_static_libraries,$(1),mariadb-connector-c)
David Tardon217eae42013-11-05 06:49:33 +0100310
311endef
312
Michael Stahl871d75e2017-09-14 13:30:05 +0200313endif # SYSTEM_MARIADB_CONNECTOR_C
David Tardon217eae42013-11-05 06:49:33 +0100314
315
Michael Stahl871d75e2017-09-14 13:30:05 +0200316ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
David Tardon217eae42013-11-05 06:49:33 +0100317
Peter Foleyc322d502013-01-23 16:29:08 -0500318define gb_LinkTarget__use_mysql
319
320$(call gb_LinkTarget_add_defs,$(1),\
Fridrich Štrba1bf43062013-03-06 11:45:50 +0100321 -DSYSTEM_MARIADB \
Peter Foleyc322d502013-01-23 16:29:08 -0500322)
323
324$(call gb_LinkTarget_add_libs,$(1),\
Fridrich Štrbacad422a2013-03-06 16:33:07 +0100325 $(MARIADB_LIBS) \
Peter Foleyc322d502013-01-23 16:29:08 -0500326)
327
328$(call gb_LinkTarget_set_include,$(1),\
Fridrich Štrbacad422a2013-03-06 16:33:07 +0100329 $(MARIADB_CFLAGS) \
Peter Foleyc322d502013-01-23 16:29:08 -0500330 $$(INCLUDE) \
331)
332endef
333
334else
335
336define gb_LinkTarget__use_mysql
337
338$(call gb_LinkTarget_set_include,$(1),\
Peter Foleyc322d502013-01-23 16:29:08 -0500339 $$(INCLUDE) \
340)
341
342endef
343
344endif
345
Michael Stahl04ff5352014-02-11 16:21:04 +0100346ifneq ($(SYSTEM_ZLIB),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000347
348define gb_LinkTarget__use_zlib
Michael Stahla88ef232011-04-13 16:11:41 +0000349$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000350 -DSYSTEM_ZLIB \
351)
352$(call gb_LinkTarget_add_libs,$(1),-lz)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100353
Michael Stahlc74af0d2011-04-01 20:49:35 +0000354endef
355
David Tardoncb276232012-10-26 15:33:26 +0200356# nothing on system
357define gb_LinkTarget__use_zlib_x64
358
359endef
360
Fridrich Štrba2f4d1602013-03-14 12:45:24 +0100361gb_ExternalProject__use_zlib :=
362
Michael Stahlc74af0d2011-04-01 20:49:35 +0000363else # !SYSTEM_ZLIB
364
David Tardoncb276232012-10-26 15:33:26 +0200365define gb_LinkTarget__use_zlib_multiarch
366$(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
367
Matúš Kukanf5ff45b2012-09-08 16:29:05 +0200368$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl3c38b772013-05-08 15:47:24 +0200369 $(ZLIB_CFLAGS) \
Matúš Kukanf5ff45b2012-09-08 16:29:05 +0200370 $$(INCLUDE) \
371)
David Tardoncb276232012-10-26 15:33:26 +0200372
Michael Stahlc923f7d2012-04-07 23:22:08 +0200373$(call gb_LinkTarget_use_static_libraries,$(1),\
David Tardoncb276232012-10-26 15:33:26 +0200374 $(2) \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000375)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100376
Michael Stahlc74af0d2011-04-01 20:49:35 +0000377endef
378
David Tardoncb276232012-10-26 15:33:26 +0200379define gb_LinkTarget__use_zlib
380$(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
381
382endef
383
384define gb_LinkTarget__use_zlib_x64
385$(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
386
387endef
388
Fridrich Štrba2f4d1602013-03-14 12:45:24 +0100389define gb_ExternalProject__use_zlib
Fridrich Štrba2f4d1602013-03-14 12:45:24 +0100390$(call gb_ExternalProject_use_static_libraries,$(1),zlib)
391
392endef
393
Michael Stahlc74af0d2011-04-01 20:49:35 +0000394endif # SYSTEM_ZLIB
395
396
Michael Stahl77d297f2017-09-13 22:50:14 +0200397ifneq ($(SYSTEM_LIBJPEG),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000398
Michael Stahl77d297f2017-09-13 22:50:14 +0200399define gb_LinkTarget__use_libjpeg
Michael Stahleea709f2016-11-02 14:13:54 +0100400$(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
Michael Stahlc74af0d2011-04-01 20:49:35 +0000401$(call gb_LinkTarget_set_ldflags,$(1),\
Michael Stahl73d2fe92011-04-13 16:11:39 +0000402 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000403)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100404
Michael Stahlc74af0d2011-04-01 20:49:35 +0000405endef
406
Michael Stahl77d297f2017-09-13 22:50:14 +0200407gb_ExternalProject__use_libjpeg :=
Michael Stahleea709f2016-11-02 14:13:54 +0100408
Caolán McNamaraae967542017-03-14 14:20:36 +0000409else
Matúš Kukan71fae5d2014-11-17 09:16:34 +0100410
Michael Stahl77d297f2017-09-13 22:50:14 +0200411define gb_LinkTarget__use_libjpeg
Matúš Kukan71fae5d2014-11-17 09:16:34 +0100412$(call gb_LinkTarget_set_include,$(1),\
Michael Stahleea709f2016-11-02 14:13:54 +0100413 $(LIBJPEG_CFLAGS) \
Matúš Kukan71fae5d2014-11-17 09:16:34 +0100414 $$(INCLUDE) \
415)
Michael Stahleea709f2016-11-02 14:13:54 +0100416$(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
Michael Stahl77d297f2017-09-13 22:50:14 +0200417$(call gb_LinkTarget_use_external_project,$(1),libjpeg-turbo,full)
Matúš Kukan71fae5d2014-11-17 09:16:34 +0100418
419endef
420
Michael Stahl77d297f2017-09-13 22:50:14 +0200421define gb_ExternalProject__use_libjpeg
422$(call gb_ExternalProject_use_external_project,$(1),libjpeg-turbo)
Michael Stahleea709f2016-11-02 14:13:54 +0100423
424endef
425
Michael Stahl77d297f2017-09-13 22:50:14 +0200426endif # SYSTEM_LIBJPEG
Michael Stahlc74af0d2011-04-01 20:49:35 +0000427
Michael Stahlab586f12014-02-11 19:25:30 +0100428ifneq ($(SYSTEM_MYTHES),)
Peter Foley1d1bab42012-10-28 12:00:06 -0400429
430define gb_LinkTarget__use_mythes
Rene Engelhard99ef1f52012-10-28 23:00:03 +0100431$(call gb_LinkTarget_set_include,$(1),\
432 $$(INCLUDE) \
433 $(MYTHES_CFLAGS) \
434)
435$(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
436
Peter Foley1d1bab42012-10-28 12:00:06 -0400437endef
438
439else # !SYSTEM_MYTHES
440
Peter Foley1d1bab42012-10-28 12:00:06 -0400441define gb_LinkTarget__use_mythes
Michael Stahl90ad80e32013-05-07 23:59:00 +0200442$(call gb_LinkTarget_set_include,$(1),\
443 -I$(call gb_UnpackedTarball_get_dir,mythes) \
444 $$(INCLUDE) \
445)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200446
447ifeq ($(COM),MSC)
Matúš Kukan327db9f2012-10-28 22:40:30 +0100448$(call gb_LinkTarget_use_static_libraries,$(1),\
449 mythes \
Peter Foley1d1bab42012-10-28 12:00:06 -0400450)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200451else
452$(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
453$(call gb_LinkTarget_use_external_project,$(1),mythes)
454endif
Matúš Kukan327db9f2012-10-28 22:40:30 +0100455
Peter Foley1d1bab42012-10-28 12:00:06 -0400456endef
457
458endif # SYSTEM_MYTHES
459
Michael Stahlc74af0d2011-04-01 20:49:35 +0000460
Michael Stahl46648152014-02-11 16:33:18 +0100461ifneq ($(SYSTEM_EXPAT),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000462
David Tardon51149802013-04-09 09:22:20 +0200463define gb_LinkTarget__use_expat_impl
464$(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
Michael Stahlc74af0d2011-04-01 20:49:35 +0000465
Michael Stahla88ef232011-04-13 16:11:41 +0000466$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000467 -DSYSTEM_EXPAT \
468)
469
470$(call gb_LinkTarget_add_libs,$(1),-lexpat)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100471
Michael Stahlc74af0d2011-04-01 20:49:35 +0000472endef
473
Michael Stahl77289672012-11-17 00:36:29 +0100474gb_ExternalProject__use_expat :=
475
Michael Stahlc74af0d2011-04-01 20:49:35 +0000476else # !SYSTEM_EXPAT
477
David Tardon51149802013-04-09 09:22:20 +0200478define gb_LinkTarget__use_expat_impl
479$(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
Michael Stahlc74af0d2011-04-01 20:49:35 +0000480
David Ostrovsky2ffde7b2012-10-12 12:28:11 -0700481$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl5e037bb2013-05-07 21:47:18 +0200482 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
David Ostrovsky2ffde7b2012-10-12 12:28:11 -0700483 $$(INCLUDE) \
484)
485
Michael Stahlc923f7d2012-04-07 23:22:08 +0200486$(call gb_LinkTarget_use_static_libraries,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000487 $(2) \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000488)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100489
Michael Stahlc74af0d2011-04-01 20:49:35 +0000490endef
491
Michael Stahl77289672012-11-17 00:36:29 +0100492define gb_ExternalProject__use_expat
Michael Stahl77289672012-11-17 00:36:29 +0100493$(call gb_ExternalProject_use_static_libraries,$(1),expat)
494
495endef
496
Michael Stahlc74af0d2011-04-01 20:49:35 +0000497endif # SYSTEM_EXPAT
498
David Tardon51149802013-04-09 09:22:20 +0200499define gb_LinkTarget__use_expat
500$(call gb_LinkTarget__use_expat_impl,$(1),expat)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100501
Michael Stahlc74af0d2011-04-01 20:49:35 +0000502endef
503
David Tardon51149802013-04-09 09:22:20 +0200504define gb_LinkTarget__use_expat_x64
505$(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100506
Michael Stahlc74af0d2011-04-01 20:49:35 +0000507endef
508
Michael Stahl9fc9e9c2014-02-11 19:21:36 +0100509ifneq ($(SYSTEM_HYPH),)
Peter Foleydd584cb2012-11-03 13:54:46 -0400510
511define gb_LinkTarget__use_hyphen
512$(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
513
514endef
515
516else # !SYSTEM_HYPH
517
Peter Foleydd584cb2012-11-03 13:54:46 -0400518define gb_LinkTarget__use_hyphen
519$(call gb_LinkTarget_use_unpacked,$(1),hyphen)
520$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200521 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
Peter Foleydd584cb2012-11-03 13:54:46 -0400522 $$(INCLUDE) \
523)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200524
525ifeq ($(COM),MSC)
Peter Foleydd584cb2012-11-03 13:54:46 -0400526$(call gb_LinkTarget_use_static_libraries,$(1),\
527 hyphen \
528)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200529else
530$(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
531$(call gb_LinkTarget_use_external_project,$(1),hyphen)
532endif
Peter Foleydd584cb2012-11-03 13:54:46 -0400533
534endef
535
536endif # SYSTEM_HYPH
537
Michael Stahl9fc9e9c2014-02-11 19:21:36 +0100538ifneq ($(SYSTEM_HUNSPELL),)
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100539
540define gb_LinkTarget__use_hunspell
541$(call gb_LinkTarget_set_include,$(1),\
542 $$(INCLUDE) \
543 $(HUNSPELL_CFLAGS) \
544)
545$(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
546
547endef
548
Michael Stahl2f6261f2013-09-19 19:28:36 +0200549gb_ExternalProject__use_hunspell :=
550
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100551else # !SYSTEM_HUNSPELL
552
553define gb_LinkTarget__use_hunspell
554$(call gb_LinkTarget_add_defs,$(1),\
555 -DHUNSPELL_STATIC \
556)
Matúš Kukan7a030392012-10-29 23:29:37 +0100557$(call gb_LinkTarget_use_unpacked,$(1),hunspell)
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100558$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200559 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
Matúš Kukan7a030392012-10-29 23:29:37 +0100560 $$(INCLUDE) \
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100561)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200562
563ifeq ($(COM),MSC)
Michael Stahlc923f7d2012-04-07 23:22:08 +0200564$(call gb_LinkTarget_use_static_libraries,$(1),\
Matúš Kukan327db9f2012-10-28 22:40:30 +0100565 hunspell \
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100566)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200567else
568$(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
569$(call gb_LinkTarget_use_external_project,$(1),hunspell)
570endif
571
572endef
573
574define gb_ExternalProject__use_hunspell
575$(call gb_ExternalProject_use_external_project,$(1),hunspell)
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100576
577endef
578
579endif # SYSTEM_HUNSPELL
580
581
Michael Stahladddbbc2014-02-11 18:40:09 +0100582ifneq ($(SYSTEM_BOOST),)
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200583
David Tardon57c439a2016-03-08 06:06:36 +0100584define gb_LinkTarget__use_boost_lib
David Tardon0f6919c2012-06-06 17:04:01 +0200585$(call gb_LinkTarget_set_include,$(1),\
586 $$(INCLUDE) \
587 $(BOOST_CPPFLAGS) \
588)
589
590$(call gb_LinkTarget_add_ldflags,$(1),\
591 $(BOOST_LDFLAGS) \
592)
593
David Tardon57c439a2016-03-08 06:06:36 +0100594$(call gb_LinkTarget_add_libs,$(1),$(2))
595
596endef
597
Caolán McNamarac25eee42017-04-19 12:02:25 +0100598define gb_LinkTarget__use_boost_locale
599$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_LOCALE_LIB))
600
601endef
602
David Tardon23d2e0e2016-03-08 08:35:59 +0100603define gb_LinkTarget__use_boost_date_time
David Tardon57c439a2016-03-08 06:06:36 +0100604$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
David Tardon0f6919c2012-06-06 17:04:01 +0200605
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200606endef
607
David Tardonb4339fa2016-03-08 06:08:36 +0100608define gb_LinkTarget__use_boost_filesystem
609$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_FILESYSTEM_LIB))
610
611endef
612
613gb_ExternalProject__use_boost_filesystem :=
614
Markus Mohrhard36788e92014-01-08 13:17:28 +0100615define gb_LinkTarget__use_boost_iostreams
David Tardon57c439a2016-03-08 06:06:36 +0100616$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
Markus Mohrhard36788e92014-01-08 13:17:28 +0100617
618endef
619
David Tardon6d9de6b2014-03-03 20:39:13 +0100620gb_ExternalProject__use_boost_iostreams :=
621
Markus Mohrhard36788e92014-01-08 13:17:28 +0100622define gb_LinkTarget__use_boost_system
David Tardon57c439a2016-03-08 06:06:36 +0100623$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB))
Tor Lillqvist503b2482013-05-22 19:50:22 +0300624
625endef
626
Markus Mohrhard36788e92014-01-08 13:17:28 +0100627gb_ExternalProject__use_boost_system :=
Tor Lillqvist503b2482013-05-22 19:50:22 +0300628
Stephan Bergmann93208022013-02-16 22:56:19 +0100629define gb_LinkTarget__use_boost_headers
630$(call gb_LinkTarget_set_include,$(1),\
631 $$(INCLUDE) \
632 $(BOOST_CPPFLAGS) \
633)
634
635endef
636
Peter Foleycdb6eca2012-11-10 08:56:12 -0500637gb_ExternalProject__use_boost_headers:=
638
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200639else # !SYSTEM_BOOST
640
David Tardon57c439a2016-03-08 06:06:36 +0100641define gb_LinkTarget__use_boost_lib
Michael Stahl7f2e1682012-09-06 20:22:11 +0200642$(call gb_LinkTarget_add_defs,$(1),\
643 -DBOOST_ALL_NO_LIB \
644)
645
David Tardon57c439a2016-03-08 06:06:36 +0100646$(call gb_LinkTarget_use_static_libraries,$(1),$(2))
647
648endef
649
Caolán McNamarac25eee42017-04-19 12:02:25 +0100650define gb_LinkTarget__use_boost_locale
651$(call gb_LinkTarget__use_boost_lib,$(1),boost_locale)
652$(call gb_LinkTarget_add_libs,$(1),\
653 $(if $(filter $(OS),MACOSX),-liconv) \
654)
655
656endef
657
David Tardon23d2e0e2016-03-08 08:35:59 +0100658define gb_LinkTarget__use_boost_date_time
659$(call gb_LinkTarget__use_boost_lib,$(1),boost_date_time)
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200660
661endef
662
David Tardond72a33c2016-03-08 05:57:40 +0100663define gb_LinkTarget__use_boost_filesystem
David Tardon57c439a2016-03-08 06:06:36 +0100664$(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem)
David Tardond72a33c2016-03-08 05:57:40 +0100665
666endef
667
668define gb_ExternalProject__use_boost_filesystem
669$(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
670endef
671
Markus Mohrhard36788e92014-01-08 13:17:28 +0100672define gb_LinkTarget__use_boost_iostreams
David Tardon57c439a2016-03-08 06:06:36 +0100673$(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams)
Tor Lillqvist503b2482013-05-22 19:50:22 +0300674
675endef
676
Markus Mohrhard36788e92014-01-08 13:17:28 +0100677define gb_ExternalProject__use_boost_iostreams
678$(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
679endef
680
681define gb_LinkTarget__use_boost_system
David Tardon57c439a2016-03-08 06:06:36 +0100682$(call gb_LinkTarget__use_boost_lib,$(1),boost_system)
Markus Mohrhard36788e92014-01-08 13:17:28 +0100683
684endef
685
686define gb_ExternalProject__use_boost_system
687$(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
Tor Lillqvist503b2482013-05-22 19:50:22 +0300688endef
689
Peter Foleye1f742a2012-11-12 18:37:10 -0500690define gb_LinkTarget__use_boost_headers
Christian Lohmaier1654a1e72012-11-14 18:11:30 +0100691$(call gb_LinkTarget_use_unpacked,$(1),boost)
Michael Stahla53586f2013-01-26 21:19:13 +0100692$(call gb_LinkTarget_set_include,$(1),\
Stephan Bergmannf51656c2016-05-31 13:32:15 +0200693 $(BOOST_CPPFLAGS) \
Michael Stahla53586f2013-01-26 21:19:13 +0100694 $$(INCLUDE) \
695)
Peter Foleye1f742a2012-11-12 18:37:10 -0500696
697endef
698
Peter Foleycdb6eca2012-11-10 08:56:12 -0500699define gb_ExternalProject__use_boost_headers
David Tardon682e3592015-06-24 15:11:40 +0200700$(call gb_ExternalProject_use_unpacked,$(1),boost)
Peter Foleycdb6eca2012-11-10 08:56:12 -0500701
702endef
David Tardond72a33c2016-03-08 05:57:40 +0100703
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200704endif # SYSTEM_BOOST
705
706
Michael Stahl38abb6a2017-09-13 23:44:32 +0200707ifneq ($(SYSTEM_LIBCMIS),)
Matúš Kukan464b4332012-01-15 02:12:49 +0100708
Michael Stahl38abb6a2017-09-13 23:44:32 +0200709define gb_LinkTarget__use_libcmis
Matúš Kukan464b4332012-01-15 02:12:49 +0100710$(call gb_LinkTarget_set_include,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +0100711 $$(INCLUDE) \
Michael Stahl38abb6a2017-09-13 23:44:32 +0200712 $(LIBCMIS_CFLAGS) \
Matúš Kukan464b4332012-01-15 02:12:49 +0100713)
Michael Stahl38abb6a2017-09-13 23:44:32 +0200714$(call gb_LinkTarget_add_libs,$(1),$(LIBCMIS_LIBS))
Matúš Kukan464b4332012-01-15 02:12:49 +0100715
716endef
717
Michael Stahl38abb6a2017-09-13 23:44:32 +0200718else # !SYSTEM_LIBCMIS
Matúš Kukan464b4332012-01-15 02:12:49 +0100719
Michael Stahl38abb6a2017-09-13 23:44:32 +0200720define gb_LinkTarget__use_libcmis
Michael Stahl759d02b2013-05-08 00:55:21 +0200721$(call gb_LinkTarget_set_include,$(1),\
David Tardonb3c7bf52018-12-27 15:45:48 +0100722 -I$(call gb_UnpackedTarball_get_dir,libcmis)/inc \
Michael Stahl759d02b2013-05-08 00:55:21 +0200723 $$(INCLUDE) \
724)
Michael Stahlc923f7d2012-04-07 23:22:08 +0200725$(call gb_LinkTarget_use_static_libraries,$(1),\
Michael Stahl38abb6a2017-09-13 23:44:32 +0200726 libcmis \
Matúš Kukan464b4332012-01-15 02:12:49 +0100727)
728
729endef
730
Michael Stahl38abb6a2017-09-13 23:44:32 +0200731endif # SYSTEM_LIBCMIS
Matúš Kukan464b4332012-01-15 02:12:49 +0100732
David Tardon32cd12c2014-04-26 19:46:40 +0200733ifeq ($(ENABLE_JAVA),TRUE)
David Tardon2a71e152014-04-26 16:08:07 +0200734
David Tardon2a71e152014-04-26 16:08:07 +0200735define gb_LinkTarget__use_jawt
736$(call gb_LinkTarget_add_libs,$(1),\
737 $(JAWTLIB) \
738)
739
740endef
Peter Foleye5ccda42012-12-25 11:23:58 -0500741
David Tardon2a71e152014-04-26 16:08:07 +0200742else # !ENABLE_JAVA
743
744gb_LinkTarget__use_jawt :=
745
746endif # ENABLE_JAVA
Matúš Kukan464b4332012-01-15 02:12:49 +0100747
Michael Stahl23647592014-02-11 19:04:20 +0100748ifneq ($(SYSTEM_LIBATOMIC_OPS),)
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100749
750define gb_LinkTarget__use_libatomic_ops
751$(call gb_LinkTarget_set_include,$(1),\
752 $$(INCLUDE) \
753 $(LIBATOMIC_OPS_CFLAGS) \
754)
755$(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
756
757endef
758gb_ExternalProject__use_libatomic_ops :=
759
760else # !SYSTEM_LIBATOMIC_OPS
761
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100762define gb_LinkTarget__use_libatomic_ops
763$(call gb_LinkTarget_set_include,$(1),\
764$(LIBATOMIC_OPS_CFLAGS) \
765 $$(INCLUDE) \
766 $(LIBATOMIC_OPS_CFLAGS) \
767)
Michael Stahlb3085262013-10-24 12:22:58 +0200768$(call gb_LinkTarget_use_external_project,$(1),\
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100769 libatomic_ops \
770)
Andrzej J.R. Huntf479f622013-09-05 16:27:50 +0100771
Michael Stahlb3085262013-10-24 12:22:58 +0200772$(call gb_LinkTarget_add_libs,$(1),\
Andrzej J.R. Huntf479f622013-09-05 16:27:50 +0100773 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100774)
775
776endef
777
778define gb_ExternalProject__use_libatomic_ops
Michael Stahlb3085262013-10-24 12:22:58 +0200779$(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100780
781endef
782
783endif # SYSTEM_LIBATOMIC_OPS
784
785
Michael Stahle3abec32014-02-11 15:57:18 +0100786ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
Matúš Kukanbd030302011-12-03 15:06:52 +0100787
788define gb_LinkTarget__use_libexttextcat
789$(call gb_LinkTarget_set_include,$(1),\
790 $$(INCLUDE) \
791 $(LIBEXTTEXTCAT_CFLAGS) \
792)
Peter Foley31219f02012-11-09 17:25:56 -0500793$(call gb_LinkTarget_add_defs,$(1),\
794 -DSYSTEM_LIBEXTTEXTCAT \
795)
Matúš Kukanbd030302011-12-03 15:06:52 +0100796$(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
797
798endef
799
800else # !SYSTEM_LIBEXTTEXTCAT
801
Matúš Kukanbd030302011-12-03 15:06:52 +0100802define gb_LinkTarget__use_libexttextcat
Peter Foley31219f02012-11-09 17:25:56 -0500803$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl653e3582017-09-13 23:57:54 +0200804 -I$(call gb_UnpackedTarball_get_dir,libexttextcat/src) \
Peter Foley31219f02012-11-09 17:25:56 -0500805 $$(INCLUDE) \
806)
Matúš Kukanbd030302011-12-03 15:06:52 +0100807
Michael Stahl2f6261f2013-09-19 19:28:36 +0200808ifeq ($(COM),MSC)
809$(call gb_LinkTarget_use_static_libraries,$(1),\
Michael Stahl653e3582017-09-13 23:57:54 +0200810 libexttextcat \
Michael Stahl2f6261f2013-09-19 19:28:36 +0200811)
812else
813$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahl653e3582017-09-13 23:57:54 +0200814 $(call gb_UnpackedTarball_get_dir,libexttextcat)/src/.libs/libexttextcat-2.0.a\
Michael Stahl2f6261f2013-09-19 19:28:36 +0200815)
Michael Stahl653e3582017-09-13 23:57:54 +0200816$(call gb_LinkTarget_use_external_project,$(1),libexttextcat)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200817endif
818
819
Matúš Kukanbd030302011-12-03 15:06:52 +0100820endef
821
822endif # SYSTEM_LIBEXTTEXTCAT
823
824
László Némethf1579d32018-02-20 11:38:24 +0100825ifneq ($(SYSTEM_LIBNUMBERTEXT),)
826
827define gb_LinkTarget__use_libnumbertext
828$(call gb_LinkTarget_set_include,$(1),\
829 $$(INCLUDE) \
830 $(LIBNUMBERTEXT_CFLAGS) \
831)
832$(call gb_LinkTarget_add_defs,$(1),\
833 -DSYSTEM_LIBNUMBERTEXT \
834)
835$(call gb_LinkTarget_add_libs,$(1),$(LIBNUMBERTEXT_LIBS))
836
837endef
838
839else # !SYSTEM_LIBNUMBERTEXT
840
Christian Lohmaier566050c2018-08-22 00:47:13 +0200841$(eval $(call gb_Helper_register_packages_for_install,ooo, \
842 libnumbertext_numbertext \
843))
844
László Némethf1579d32018-02-20 11:38:24 +0100845define gb_LinkTarget__use_libnumbertext
Mike Kaganski19c45de2018-05-15 15:39:01 +0100846$(call gb_LinkTarget_use_package,$(1),libnumbertext_numbertext)
László Némethf1579d32018-02-20 11:38:24 +0100847$(call gb_LinkTarget_set_include,$(1),\
848 -I$(call gb_UnpackedTarball_get_dir,libnumbertext/src) \
849 $$(INCLUDE) \
850)
László Némethf1579d32018-02-20 11:38:24 +0100851
852ifeq ($(COM),MSC)
853$(call gb_LinkTarget_use_static_libraries,$(1),\
854 libnumbertext \
855)
856else
857
858$(call gb_LinkTarget_add_libs,$(1),\
859 $(call gb_UnpackedTarball_get_dir,libnumbertext)/src/.libs/libnumbertext-1.0.a\
860)
Stephan Bergmanne046c362018-05-04 10:21:23 +0200861$(call gb_LinkTarget_use_external_project,$(1),libnumbertext,full)
László Némethf1579d32018-02-20 11:38:24 +0100862
863endif
864
865endef
866
László Némethf1579d32018-02-20 11:38:24 +0100867endif # SYSTEM_LIBNUMBERTEXT
868
869
Michael Stahl379f9782014-02-11 16:49:19 +0100870ifneq ($(SYSTEM_LIBXML),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000871
872define gb_LinkTarget__use_libxml2
Michael Stahla88ef232011-04-13 16:11:41 +0000873$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000874 -DSYSTEM_LIBXML \
875)
876$(call gb_LinkTarget_set_include,$(1),\
877 $$(INCLUDE) \
878 $(LIBXML_CFLAGS) \
879)
880$(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +0100881
Michael Stahlc74af0d2011-04-01 20:49:35 +0000882endef
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500883gb_ExternalProject__use_libxml2:=
Michael Stahlc74af0d2011-04-01 20:49:35 +0000884
885else # !SYSTEM_LIBXML
886
Michael Stahl64ea9942014-03-14 11:48:24 +0100887$(eval $(call gb_Helper_register_packages_for_install,ure,\
Michael Stahl84b0f062017-09-14 14:54:07 +0200888 libxml2 \
Michael Stahl64ea9942014-03-14 11:48:24 +0100889))
890
Michael Stahlc74af0d2011-04-01 20:49:35 +0000891define gb_LinkTarget__use_libxml2
Michael Stahl84b0f062017-09-14 14:54:07 +0200892$(call gb_LinkTarget_use_package,$(1),libxml2)
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500893$(call gb_LinkTarget_set_include,$(1),\
894 $$(INCLUDE) \
David Tardon7515b1a2014-07-17 17:27:05 +0200895 $(LIBXML_CFLAGS) \
896)
897
898$(call gb_LinkTarget_add_libs,$(1),\
899 $(LIBXML_LIBS) \
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500900)
901
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200902ifeq ($(COM),MSC)
David Tardon7515b1a2014-07-17 17:27:05 +0200903$(call gb_LinkTarget_use_external,$(1),icu_headers)
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200904endif
905
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500906endef
907define gb_ExternalProject__use_libxml2
Michael Stahl84b0f062017-09-14 14:54:07 +0200908$(call gb_ExternalProject_use_package,$(1),libxml2)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100909
David Tardon7515b1a2014-07-17 17:27:05 +0200910ifeq ($(COM),MSC)
Michael Stahl0c3838b2018-01-19 14:13:34 +0100911$(call gb_ExternalProject_use_packages,$(1),icu icu_ure)
David Tardon7515b1a2014-07-17 17:27:05 +0200912endif
913
Michael Stahlc74af0d2011-04-01 20:49:35 +0000914endef
915
916endif # SYSTEM_LIBXML
917
918
Michael Stahle3abec32014-02-11 15:57:18 +0100919ifneq ($(SYSTEM_LIBXSLT),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000920
921define gb_LinkTarget__use_libxslt
922$(call gb_LinkTarget_set_include,$(1),\
923 $$(INCLUDE) \
924 $(LIBXSLT_CFLAGS) \
925)
926$(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +0100927
Michael Stahlc74af0d2011-04-01 20:49:35 +0000928endef
929
David Tardonab03e872012-08-15 07:20:13 +0200930define gb_LinkTarget__use_libexslt
931$(call gb_LinkTarget_set_include,$(1),\
932 $$(INCLUDE) \
933 $(LIBEXSLT_CFLAGS) \
934)
935
936$(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
937
938endef
939
Michael Stahlc74af0d2011-04-01 20:49:35 +0000940else # !SYSTEM_LIBXSLT
941
Michael Stahl32a617d2014-02-17 11:23:19 +0100942$(eval $(call gb_Helper_register_packages_for_install,ooo,\
Michael Stahl15b973e2017-09-14 15:26:10 +0200943 libxslt \
Michael Stahl32a617d2014-02-17 11:23:19 +0100944))
945
Michael Stahlc74af0d2011-04-01 20:49:35 +0000946define gb_LinkTarget__use_libxslt
Michael Stahl15b973e2017-09-14 15:26:10 +0200947$(call gb_LinkTarget_use_package,$(1),libxslt)
Peter Foley856c0752013-02-02 15:44:30 -0500948$(call gb_LinkTarget_set_include,$(1),\
949 $$(INCLUDE) \
Michael Stahl15b973e2017-09-14 15:26:10 +0200950 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
Peter Foley856c0752013-02-02 15:44:30 -0500951)
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200952
953ifeq ($(COM),MSC)
954$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahl15b973e2017-09-14 15:26:10 +0200955 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libxslt.lib \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000956)
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200957else
958$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahl15b973e2017-09-14 15:26:10 +0200959 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libxslt/.libs -lxslt \
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200960)
961endif
Caolán McNamara6bccd202011-07-25 22:10:33 +0100962
Michael Stahlc74af0d2011-04-01 20:49:35 +0000963endef
964
David Tardonab03e872012-08-15 07:20:13 +0200965define gb_LinkTarget__use_libexslt
Michael Stahl15b973e2017-09-14 15:26:10 +0200966$(call gb_LinkTarget_use_package,$(1),libxslt)
Peter Foley856c0752013-02-02 15:44:30 -0500967$(call gb_LinkTarget_set_include,$(1),\
968 $$(INCLUDE) \
Michael Stahl15b973e2017-09-14 15:26:10 +0200969 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
Peter Foley856c0752013-02-02 15:44:30 -0500970)
971
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200972ifeq ($(COM),MSC)
973$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahl15b973e2017-09-14 15:26:10 +0200974 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libexslt.lib \
David Tardonab03e872012-08-15 07:20:13 +0200975)
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200976else
977$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahl15b973e2017-09-14 15:26:10 +0200978 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libexslt/.libs -lexslt \
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200979)
980endif
David Tardonab03e872012-08-15 07:20:13 +0200981
982endef
983
Michael Stahlc74af0d2011-04-01 20:49:35 +0000984endif # SYSTEM_LIBXSLT
985
Jan Holesovsky6a7b32b02012-08-10 10:27:54 +0200986
Miklos Vajnaab50f0b2017-06-21 21:59:11 +0200987ifneq ($(SYSTEM_XMLSEC),)
988
989define gb_LinkTarget__use_xmlsec
990$(call gb_LinkTarget_add_defs,$(1),\
991 -DSYSTEM_XMLSEC \
992)
993$(call gb_LinkTarget_set_include,$(1),\
994 $$(INCLUDE) \
995 $(XMLSEC_CFLAGS) \
996)
997$(call gb_LinkTarget_add_libs,$(1),$(XMLSEC_LIBS))
998
999endef
1000
1001gb_ExternalProject__use_xmlsec:=
1002
1003else # !SYSTEM_XMLSEC
1004
1005$(eval $(call gb_Helper_register_packages_for_install,ooo,\
1006 xmlsec \
1007))
1008
1009define gb_LinkTarget__use_xmlsec
1010
1011endef
1012
1013endif # SYSTEM_XMLSEC
1014
Michael Stahl49dde4c2014-02-11 19:42:28 +01001015ifneq ($(SYSTEM_LIBLANGTAG),)
Eike Rathkea774a482012-08-06 19:22:43 +02001016
1017define gb_LinkTarget__use_liblangtag
1018$(call gb_LinkTarget_set_include,$(1),\
1019 $$(INCLUDE) \
1020 $(LIBLANGTAG_CFLAGS) \
1021)
1022
1023$(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1024
1025endef
1026
David Tardonc2a119b2016-01-13 14:24:31 +01001027gb_ExternalProject__use_liblangtag :=
1028
Eike Rathkea774a482012-08-06 19:22:43 +02001029else # !SYSTEM_LIBLANGTAG
1030
Stephan Bergmann475e4b42016-10-25 16:46:35 +02001031$(eval $(call gb_Helper_register_packages_for_install,ure,\
Michael Stahl01adcd82014-03-18 17:38:06 +01001032 liblangtag_data \
1033))
1034
David Tardon7d93bb82016-01-13 15:45:17 +01001035ifeq ($(COM),MSC)
1036
Eike Rathkea774a482012-08-06 19:22:43 +02001037define gb_LinkTarget__use_liblangtag
Peter Foley782151a2012-11-11 16:02:36 -05001038$(call gb_LinkTarget_set_include,$(1),\
David Tardon34513502016-01-13 14:21:10 +01001039 $(LIBLANGTAG_CFLAGS) \
Peter Foley782151a2012-11-11 16:02:36 -05001040 $$(INCLUDE) \
1041)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001042$(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
Michael Stahl0bb76482017-09-14 12:20:31 +02001043$(call gb_LinkTarget_use_external_project,$(1),liblangtag)
Eike Rathkea774a482012-08-06 19:22:43 +02001044
1045endef
1046
David Tardon7d93bb82016-01-13 15:45:17 +01001047else
1048
Stephan Bergmann475e4b42016-10-25 16:46:35 +02001049$(eval $(call gb_Helper_register_packages_for_install,ure,\
David Tardon7d93bb82016-01-13 15:45:17 +01001050 liblangtag \
1051))
1052
1053define gb_LinkTarget__use_liblangtag
1054$(call gb_LinkTarget_set_include,$(1),\
1055 $(LIBLANGTAG_CFLAGS) \
1056 $$(INCLUDE) \
1057)
1058$(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1059$(call gb_LinkTarget_use_package,$(1),liblangtag)
1060
1061endef
1062
1063endif # MSC
1064
David Tardonc2a119b2016-01-13 14:24:31 +01001065define gb_ExternalProject__use_liblangtag
Michael Stahl0bb76482017-09-14 12:20:31 +02001066$(call gb_ExternalProject_use_external_project,$(1),liblangtag)
David Tardonc2a119b2016-01-13 14:24:31 +01001067
1068endef
1069
Eike Rathkea774a482012-08-06 19:22:43 +02001070endif # SYSTEM_LIBLANGTAG
1071
Jan Holesovsky6a7b32b02012-08-10 10:27:54 +02001072
Matúš Kukandcae0502014-02-25 21:47:33 +01001073gb_ExternalProject__use_apr :=
1074
1075ifeq ($(WITH_WEBDAV),serf)
Matúš Kukan0b272532014-02-06 12:28:36 +01001076
1077define gb_LinkTarget__use_apr
1078$(call gb_LinkTarget_set_include,$(1),\
1079 $$(INCLUDE) \
1080 $(APR_CFLAGS) \
1081)
1082$(call gb_LinkTarget_add_libs,$(1),\
1083 $(APR_LIBS) \
Michael Stahl5cf22052014-06-05 13:35:14 +02001084 $(if $(filter $(OS),LINUX),-lpthread) \
1085 $(if $(filter $(OS),MACOSX),-liconv) \
Matúš Kukan0b272532014-02-06 12:28:36 +01001086)
1087
1088ifeq ($(SYSTEM_APR),)
1089$(call gb_LinkTarget_use_system_win32_libs,$(1),\
1090 mswsock \
1091 rpcrt4 \
1092 shell32 \
1093)
1094$(call gb_LinkTarget_add_defs,$(1),\
1095 -DAPR_DECLARE_STATIC \
1096 -DAPU_DECLARE_STATIC \
1097)
1098$(call gb_LinkTarget_use_external_project,$(1),apr_util)
1099endif
1100
1101endef
1102
1103define gb_ExternalProject__use_apr
1104ifeq ($(SYSTEM_APR),)
1105$(call gb_ExternalProject_use_external_project,$(1),apr_util)
1106endif
1107
1108endef
1109
1110define gb_LinkTarget__use_serf
1111$(call gb_LinkTarget_set_include,$(1),\
1112 $(SERF_CFLAGS) \
1113 $$(INCLUDE) \
1114)
1115$(call gb_LinkTarget_add_libs,$(1),\
1116 $(SERF_LIBS) \
1117)
1118
1119ifeq ($(SYSTEM_SERF),)
1120$(call gb_LinkTarget_use_external_project,$(1),serf)
1121endif
1122
1123endef
1124
Matúš Kukandcae0502014-02-25 21:47:33 +01001125else ifeq ($(WITH_WEBDAV),neon)
Eike Rathkea774a482012-08-06 19:22:43 +02001126
Michael Stahle3abec32014-02-11 15:57:18 +01001127ifneq ($(SYSTEM_NEON),)
Matúš Kukan464b4332012-01-15 02:12:49 +01001128
1129define gb_LinkTarget__use_neon
Matúš Kukan464b4332012-01-15 02:12:49 +01001130$(call gb_LinkTarget_add_defs,$(1),\
1131 -DNEON_VERSION=0x$(NEON_VERSION) \
David Tardonb74bf412013-08-12 09:39:59 +02001132 -DSYSTEM_NEON \
Matúš Kukan464b4332012-01-15 02:12:49 +01001133)
Matúš Kukan464b4332012-01-15 02:12:49 +01001134$(call gb_LinkTarget_set_include,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +01001135 $$(INCLUDE) \
Caolán McNamara1ac9ccf2012-01-16 08:57:38 +00001136 $(NEON_CFLAGS) \
Matúš Kukan464b4332012-01-15 02:12:49 +01001137)
1138
1139$(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
1140
1141endef
1142
1143else # !SYSTEM_NEON
1144
Marcos Paulo de Souzaf70343b2014-02-12 06:53:02 -02001145$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
Matúš Kukan464b4332012-01-15 02:12:49 +01001146 neon \
1147))
1148
1149define gb_LinkTarget__use_neon
Matúš Kukan7a030392012-10-29 23:29:37 +01001150$(call gb_LinkTarget_use_unpacked,$(1),neon)
Matúš Kukan464b4332012-01-15 02:12:49 +01001151$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001152 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
Matúš Kukan464b4332012-01-15 02:12:49 +01001153 $$(INCLUDE) \
1154)
Michael Stahlc923f7d2012-04-07 23:22:08 +02001155$(call gb_LinkTarget_use_libraries,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +01001156 neon \
1157)
1158
1159endef
1160
1161endif # SYSTEM_NEON
1162
Matúš Kukandcae0502014-02-25 21:47:33 +01001163endif # WITH_WEBDAV
Matúš Kukan464b4332012-01-15 02:12:49 +01001164
Michael Stahle3abec32014-02-11 15:57:18 +01001165ifneq ($(SYSTEM_REDLAND),)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001166
1167define gb_LinkTarget__use_librdf
Michael Stahla88ef232011-04-13 16:11:41 +00001168$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +00001169 -DSYSTEM_REDLAND \
1170)
1171$(call gb_LinkTarget_set_include,$(1),\
1172 $$(INCLUDE) \
1173 $(REDLAND_CFLAGS) \
1174)
1175$(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +01001176
Michael Stahlc74af0d2011-04-01 20:49:35 +00001177endef
1178
Peter Foley18bd1e72012-12-27 18:04:21 -05001179gb_LinkTarget__use_redland_headers:=
1180
1181gb_LinkTarget__use_raptor_headers:=
1182
1183gb_LinkTarget__use_rasqal_headers:=
1184
Michael Stahlc74af0d2011-04-01 20:49:35 +00001185else # !SYSTEM_REDLAND
1186
Peter Foley18bd1e72012-12-27 18:04:21 -05001187define gb_LinkTarget__use_redland_headers
1188$(call gb_LinkTarget_set_include,$(1),\
Michael Stahld719c012013-04-01 12:41:18 +02001189 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
Peter Foley18bd1e72012-12-27 18:04:21 -05001190 $$(INCLUDE) \
1191)
1192
1193endef
1194
1195define gb_LinkTarget__use_raptor_headers
1196$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001197 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
Peter Foley18bd1e72012-12-27 18:04:21 -05001198 $$(INCLUDE) \
1199)
1200
1201endef
1202
1203define gb_LinkTarget__use_rasqal_headers
1204$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001205 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
Peter Foley18bd1e72012-12-27 18:04:21 -05001206 $$(INCLUDE) \
1207)
1208
1209endef
1210
Tor Lillqvist9a42ca72012-04-19 21:45:14 +03001211ifneq ($(OS),ANDROID)
1212
Michael Stahl5f9cda22013-11-01 15:43:47 +01001213ifeq ($(COM),MSC)
Michael Stahlae8e5792014-01-10 12:07:31 +01001214$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
David Tardon491dea02013-05-01 11:23:50 +02001215 raptor2 \
1216 rasqal \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001217 rdf \
1218))
Michael Stahl5ae30d32014-03-13 19:32:13 +01001219else
1220$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1221 raptor \
1222 rasqal \
1223 redland \
1224))
Michael Stahl5f9cda22013-11-01 15:43:47 +01001225endif
Michael Stahlc74af0d2011-04-01 20:49:35 +00001226
1227define gb_LinkTarget__use_librdf
Michael Stahl831aaef2013-10-24 01:09:35 +02001228ifeq ($(COM),MSC)
1229$(call gb_LinkTarget_use_libraries,$(1),\
1230 raptor2 \
1231 rdf \
1232)
1233else
Caolán McNamara87114362016-12-19 21:17:48 +00001234$(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
Matúš Kukan85d1e392013-12-14 11:17:30 +01001235
Michael Stahl2793c542013-10-23 21:18:24 +02001236$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahl2793c542013-10-23 21:18:24 +02001237 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
Caolán McNamara87114362016-12-19 21:17:48 +00001238 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1239 -L$(call gb_UnpackedTarball_get_dir,rasqal)/src/.libs -lrasqal \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001240)
Michael Stahl831aaef2013-10-24 01:09:35 +02001241endif
Caolán McNamara6bccd202011-07-25 22:10:33 +01001242
Michael Stahlc74af0d2011-04-01 20:49:35 +00001243endef
1244
Tor Lillqvist9a42ca72012-04-19 21:45:14 +03001245else # ANDROID
1246
Tor Lillqvist9a42ca72012-04-19 21:45:14 +03001247define gb_LinkTarget__use_librdf
Caolán McNamara87114362016-12-19 21:17:48 +00001248$(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
Tor Lillqvist9a42ca72012-04-19 21:45:14 +03001249
1250endef
1251
1252endif # ANDROID
1253
Michael Stahlc74af0d2011-04-01 20:49:35 +00001254endif # SYSTEM_REDLAND
1255
1256
Noel Grandin2b5812e2018-08-26 17:22:56 +02001257ifneq ($(USING_X11)$(ENABLE_CAIRO_CANVAS)$(DISABLE_GUI),) # or
Michael Stahl32a617d2014-02-17 11:23:19 +01001258
Michael Stahl5c0e6d82014-02-11 17:03:53 +01001259ifneq ($(SYSTEM_CAIRO),)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001260
Michael Stahlc74af0d2011-04-01 20:49:35 +00001261define gb_LinkTarget__use_cairo
1262$(call gb_LinkTarget_set_include,$(1),\
1263 $$(INCLUDE) \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001264 $(CAIRO_CFLAGS) \
1265)
David Tardon962771f2013-05-24 14:35:18 +02001266$(call gb_LinkTarget_use_external,$(1),freetype_headers)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001267$(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +01001268
Michael Stahlc74af0d2011-04-01 20:49:35 +00001269endef
1270
Michael Stahl5c0e6d82014-02-11 17:03:53 +01001271else # !SYSTEM_CAIRO
Michael Stahlc74af0d2011-04-01 20:49:35 +00001272
Michael Stahl32a617d2014-02-17 11:23:19 +01001273$(eval $(call gb_Helper_register_packages_for_install,ooo,\
1274 cairo \
1275 $(if $(filter $(OS),WNT),,pixman) \
1276))
1277
Michael Stahlc74af0d2011-04-01 20:49:35 +00001278define gb_LinkTarget__use_cairo
Michael Stahlde142202012-11-20 22:05:36 +01001279$(call gb_LinkTarget_use_package,$(1),cairo)
1280$(call gb_LinkTarget_use_package,$(1),pixman)
David Tardon962771f2013-05-24 14:35:18 +02001281$(call gb_LinkTarget_use_external,$(1),freetype_headers)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001282$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001283 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1284 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
Matúš Kukan2cb7ba12012-11-10 22:14:42 +01001285 $$(INCLUDE) \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001286)
Michael Stahld89f48b2013-10-23 21:27:05 +02001287$(call gb_LinkTarget_add_libs,$(1),\
1288 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
Matúš Kukan2cb7ba12012-11-10 22:14:42 +01001289 $(if $(filter-out MACOSX WNT,$(OS)), \
Michael Stahld89f48b2013-10-23 21:27:05 +02001290 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
Matúš Kukan2cb7ba12012-11-10 22:14:42 +01001291 ) \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001292)
Caolán McNamara5bb76f62011-07-25 21:50:34 +01001293
Michael Stahlc74af0d2011-04-01 20:49:35 +00001294endef
1295
1296endif # SYSTEM_CAIRO
1297
Caolán McNamarafb7d4ba2015-11-16 13:40:22 +00001298else ifeq ($(OS),ANDROID)
1299
1300define gb_LinkTarget__use_cairo
1301$(call gb_LinkTarget_use_package,$(1),cairo)
1302$(call gb_LinkTarget_use_package,$(1),pixman)
1303$(call gb_LinkTarget_use_external,$(1),freetype_headers)
1304$(call gb_LinkTarget_set_include,$(1),\
1305 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1306 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1307 $$(INCLUDE) \
1308)
1309$(call gb_LinkTarget_add_libs,$(1),\
1310 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1311 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1312)
1313
1314endef
1315
Michael Stahl32a617d2014-02-17 11:23:19 +01001316endif # CAIRO
1317
Michael Stahl379f9782014-02-11 16:49:19 +01001318ifneq ($(SYSTEM_FREETYPE),)
David Tardon962771f2013-05-24 14:35:18 +02001319
1320define gb_LinkTarget__use_freetype_headers
Caolán McNamarab41ae462011-07-25 22:24:27 +01001321$(call gb_LinkTarget_set_include,$(1),\
1322 $$(INCLUDE) \
1323 $(FREETYPE_CFLAGS) \
1324)
Tor Lillqvist0d1c24e2012-04-19 21:10:00 +03001325
David Tardon962771f2013-05-24 14:35:18 +02001326endef
1327
Michael Stahle568d2a2013-09-30 14:10:22 +02001328gb_ExternalProject__use_freetype :=
1329
Caolán McNamara6cb661f2016-12-19 08:59:02 +00001330else
David Tardon962771f2013-05-24 14:35:18 +02001331
1332define gb_LinkTarget__use_freetype_headers
Michael Stahlb242cee82013-10-24 12:08:50 +02001333$(call gb_LinkTarget_use_external_project,$(1),freetype)
David Tardon962771f2013-05-24 14:35:18 +02001334$(call gb_LinkTarget_set_include,$(1),\
David Tardone0603172017-02-02 13:31:13 +01001335 $(FREETYPE_CFLAGS) \
David Tardon962771f2013-05-24 14:35:18 +02001336 $$(INCLUDE) \
1337)
1338
David Tardon61695f12013-05-24 17:15:20 +02001339endef
1340
Michael Stahle568d2a2013-09-30 14:10:22 +02001341define gb_ExternalProject__use_freetype
Michael Stahlb242cee82013-10-24 12:08:50 +02001342$(call gb_ExternalProject_use_external_project,$(1),freetype)
Michael Stahle568d2a2013-09-30 14:10:22 +02001343
1344endef
1345
David Tardon962771f2013-05-24 14:35:18 +02001346endif # SYSTEM_FREETYPE
1347
David Tardone0603172017-02-02 13:31:13 +01001348define gb_LinkTarget__use_freetype
1349$(call gb_LinkTarget_use_external,$(1),freetype_headers)
1350$(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1351
1352endef
1353
Michael Stahl04ff5352014-02-11 16:21:04 +01001354ifneq ($(SYSTEM_FONTCONFIG),)
David Tardon4eb68422013-05-24 14:16:03 +02001355
Caolán McNamarab41ae462011-07-25 22:24:27 +01001356define gb_LinkTarget__use_fontconfig
1357$(call gb_LinkTarget_set_include,$(1),\
1358 $$(INCLUDE) \
1359 $(FONTCONFIG_CFLAGS) \
1360)
Tor Lillqvist0d1c24e2012-04-19 21:10:00 +03001361
Caolán McNamarab41ae462011-07-25 22:24:27 +01001362$(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1363
1364endef
Michael Stahlc74af0d2011-04-01 20:49:35 +00001365
Caolán McNamara6cb661f2016-12-19 08:59:02 +00001366else
David Tardon4eb68422013-05-24 14:16:03 +02001367
David Tardon4eb68422013-05-24 14:16:03 +02001368define gb_LinkTarget__use_fontconfig
Michael Stahl76596b32013-10-24 11:01:41 +02001369$(call gb_LinkTarget_use_external_project,$(1),fontconfig)
David Tardon4eb68422013-05-24 14:16:03 +02001370$(call gb_LinkTarget_set_include,$(1),\
1371 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1372 $$(INCLUDE) \
1373)
1374
Caolán McNamara1ad871c2016-12-20 11:37:13 +00001375$(call gb_LinkTarget_add_libs,$(1),\
1376 -L$(call gb_UnpackedTarball_get_dir,fontconfig)/src/.libs -lfontconfig \
1377)
Caolán McNamara6cb661f2016-12-19 08:59:02 +00001378
David Tardon4eb68422013-05-24 14:16:03 +02001379endef
1380
1381endif # SYSTEM_FONTCONFIG
1382
Michael Stahle3abec32014-02-11 15:57:18 +01001383ifneq ($(SYSTEM_GRAPHITE),)
Michael Stahl87e44332011-04-13 16:11:39 +00001384
Michael Stahl87e44332011-04-13 16:11:39 +00001385define gb_LinkTarget__use_graphite
Michael Stahl87e44332011-04-13 16:11:39 +00001386$(call gb_LinkTarget_set_include,$(1),\
1387 $$(INCLUDE) \
1388 $(GRAPHITE_CFLAGS) \
1389)
1390$(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +01001391
Michael Stahl87e44332011-04-13 16:11:39 +00001392endef
1393
Khaled Hosny9de76cb2016-09-23 18:34:09 +02001394gb_ExternalProject__use_graphite:=
1395
Michael Stahle3abec32014-02-11 15:57:18 +01001396else # !SYSTEM_GRAPHITE
Michael Stahl87e44332011-04-13 16:11:39 +00001397
Michael Stahl87e44332011-04-13 16:11:39 +00001398define gb_LinkTarget__use_graphite
Matúš Kukan7a030392012-10-29 23:29:37 +01001399$(call gb_LinkTarget_use_unpacked,$(1),graphite)
Matúš Kukan1ceb47d2012-10-25 09:55:13 +02001400$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001401 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
Matúš Kukan1ceb47d2012-10-25 09:55:13 +02001402 $$(INCLUDE) \
1403)
Michael Stahlc923f7d2012-04-07 23:22:08 +02001404$(call gb_LinkTarget_use_static_libraries,$(1),\
Matúš Kukan1ceb47d2012-10-25 09:55:13 +02001405 graphite \
Michael Stahl87e44332011-04-13 16:11:39 +00001406)
Caolán McNamara6bccd202011-07-25 22:10:33 +01001407
Michael Stahl87e44332011-04-13 16:11:39 +00001408endef
1409
Khaled Hosny9de76cb2016-09-23 18:34:09 +02001410define gb_ExternalProject__use_graphite
David Tardonb5c566f2016-11-03 17:23:56 +01001411$(call gb_ExternalProject_use_static_libraries,$(1),\
1412 graphite \
1413)
Khaled Hosny9de76cb2016-09-23 18:34:09 +02001414
1415endef
Michael Stahl87e44332011-04-13 16:11:39 +00001416endif # SYSTEM_GRAPHITE
1417
Michael Stahl187194b2014-02-11 19:17:42 +01001418ifneq ($(SYSTEM_ICU),)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001419
Peter Foleyb92a0d92012-12-25 17:39:43 -05001420gb_LinkTarget__use_icu_headers:=
Fridrich Štrba8e9675d2013-01-25 10:55:04 +01001421gb_ExternalProject__use_icu:=
Peter Foleyb92a0d92012-12-25 17:39:43 -05001422
Matúš Kukan6fad1752011-08-11 12:42:39 +02001423define gb_LinkTarget__use_icudata
1424$(call gb_LinkTarget_add_libs,$(1),-licudata)
1425
1426endef
David Tardon1a852392011-07-26 09:58:54 +02001427define gb_LinkTarget__use_icui18n
1428$(call gb_LinkTarget_add_libs,$(1),-licui18n)
Matúš Kukan6fad1752011-08-11 12:42:39 +02001429
David Tardon1a852392011-07-26 09:58:54 +02001430endef
Michael Stahlc74af0d2011-04-01 20:49:35 +00001431define gb_LinkTarget__use_icuuc
1432$(call gb_LinkTarget_add_libs,$(1),-licuuc)
Caolán McNamara6bccd202011-07-25 22:10:33 +01001433
Michael Stahlc74af0d2011-04-01 20:49:35 +00001434endef
1435
1436else # !SYSTEM_ICU
1437
Michael Stahl057613c2014-07-24 00:22:51 +02001438$(eval $(call gb_Helper_register_packages_for_install,ure, \
1439 icu_ure \
1440))
1441
Michael Stahle7592692014-03-14 11:23:52 +01001442$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1443 icu \
1444))
1445
Tor Lillqvist084db5f2012-09-24 10:37:25 +03001446ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
Tor Lillqvist8a3ea752011-11-21 14:25:37 +02001447gb_ICU_suffix:=lo
1448else
1449gb_ICU_suffix:=
1450endif
1451
Peter Foleyb92a0d92012-12-25 17:39:43 -05001452define gb_LinkTarget__use_icu_headers
Peter Foleyce9bf0f2013-03-23 12:32:31 -04001453$(call gb_LinkTarget_use_unpacked,$(1),icu)
Peter Foleyb92a0d92012-12-25 17:39:43 -05001454$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001455 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1456 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1457 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
Peter Foleyb92a0d92012-12-25 17:39:43 -05001458 $$(INCLUDE) \
1459)
1460
1461endef
1462
Fridrich Štrba8e9675d2013-01-25 10:55:04 +01001463define gb_ExternalProject__use_icu
1464$(call gb_ExternalProject_use_package,$(1),icu)
Fridrich Štrba851ca9c2013-01-25 10:29:59 +01001465
1466endef
1467
Peter Foleyf7452122012-11-04 08:46:44 -05001468# icudata and icui18n is called icudt and icuin when built with MSVC :-/
Michael Stahla92f80f2013-10-23 15:00:29 +02001469define gb_LinkTarget__use_icudata
Stephan Bergmann475e4b42016-10-25 16:46:35 +02001470$(call gb_LinkTarget_use_package,$(1),icu_ure)
Michael Stahla92f80f2013-10-23 15:00:29 +02001471
1472ifeq ($(OS),WNT)
1473$(call gb_LinkTarget_add_libs,$(1),\
1474 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
Matúš Kukan6fad1752011-08-11 12:42:39 +02001475)
Michael Stahla92f80f2013-10-23 15:00:29 +02001476else
1477$(call gb_LinkTarget_add_libs,$(1),\
1478 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1479)
1480endif
Matúš Kukan6fad1752011-08-11 12:42:39 +02001481
1482endef
Michael Stahla92f80f2013-10-23 15:00:29 +02001483
1484define gb_LinkTarget__use_icui18n
1485$(call gb_LinkTarget_use_package,$(1),icu)
1486
1487ifeq ($(OS),WNT)
1488$(call gb_LinkTarget_add_libs,$(1),\
1489 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1490)
1491else
1492$(call gb_LinkTarget_add_libs,$(1),\
1493 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1494)
1495endif
1496
1497endef
1498
Michael Stahlc74af0d2011-04-01 20:49:35 +00001499define gb_LinkTarget__use_icuuc
Stephan Bergmann475e4b42016-10-25 16:46:35 +02001500$(call gb_LinkTarget_use_package,$(1),icu_ure)
Michael Stahla92f80f2013-10-23 15:00:29 +02001501
1502ifeq ($(OS),WNT)
1503$(call gb_LinkTarget_add_libs,$(1),\
1504 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001505)
Michael Stahla92f80f2013-10-23 15:00:29 +02001506else
1507$(call gb_LinkTarget_add_libs,$(1),\
1508 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1509)
1510endif
Caolán McNamara6bccd202011-07-25 22:10:33 +01001511
Michael Stahlc74af0d2011-04-01 20:49:35 +00001512endef
1513
1514endif # SYSTEM_ICU
1515
Michael Stahle3abec32014-02-11 15:57:18 +01001516ifneq ($(SYSTEM_HARFBUZZ),)
Khaled Hosny7e389f42013-04-20 13:00:56 +02001517
1518define gb_LinkTarget__use_harfbuzz
1519$(call gb_LinkTarget_set_include,$(1),\
1520 $$(INCLUDE) \
1521 $(HARFBUZZ_CFLAGS) \
1522)
1523$(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1524
1525endef
1526
David Tardoncc96f0c2017-02-01 12:32:35 +01001527gb_ExternalProject__use_harfbuzz :=
1528
Michael Stahle3abec32014-02-11 15:57:18 +01001529else # SYSTEM_HARFBUZZ != TRUE
Khaled Hosny7e389f42013-04-20 13:00:56 +02001530
Khaled Hosny7e389f42013-04-20 13:00:56 +02001531define gb_LinkTarget__use_harfbuzz
Michael Stahl8db02752013-05-07 23:28:45 +02001532$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl2f6261f2013-09-19 19:28:36 +02001533 $(HARFBUZZ_CFLAGS) \
Michael Stahl8db02752013-05-07 23:28:45 +02001534 $$(INCLUDE) \
1535)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001536$(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
Stephan Bergmann0a554242018-09-22 17:30:36 +02001537$(call gb_LinkTarget_use_external,$(1),icuuc)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001538$(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
Khaled Hosny7e389f42013-04-20 13:00:56 +02001539
1540endef
1541
David Tardoncc96f0c2017-02-01 12:32:35 +01001542define gb_ExternalProject__use_harfbuzz
1543$(call gb_ExternalProject_use_external_project,$(1),harfbuzz)
1544
1545endef
1546
Khaled Hosny7e389f42013-04-20 13:00:56 +02001547endif # SYSTEM_HARFBUZZ
Michael Stahl4a8919f2011-04-18 11:13:57 +00001548
Norbert Thiebaudbf6d1f72013-08-31 18:55:53 -05001549ifeq ($(DISABLE_OPENSSL),TRUE)
Andres Gomeze3f607e2013-04-11 10:24:25 +03001550
1551gb_ExternalProject__use_openssl:=
1552gb_LinkTarget__use_openssl_headers:=
1553gb_LinkTarget__use_openssl:=
1554
1555else # !DISABLE_OPENSSL
1556
Michael Stahle3abec32014-02-11 15:57:18 +01001557ifneq ($(SYSTEM_OPENSSL),)
Michael Stahl4a8919f2011-04-18 11:13:57 +00001558
Peter Foley9ddba662012-12-28 11:19:06 -05001559gb_LinkTarget__use_openssl_headers:=
1560gb_ExternalProject__use_openssl:=
1561
Michael Stahl4a8919f2011-04-18 11:13:57 +00001562define gb_LinkTarget__use_openssl
1563$(call gb_LinkTarget_set_include,$(1),\
1564 $$(INCLUDE) \
1565 $(OPENSSL_CFLAGS) \
1566)
1567$(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +01001568
Michael Stahl4a8919f2011-04-18 11:13:57 +00001569endef
1570
1571else # !SYSTEM_OPENSSL
1572
Michael Stahlf921e262014-03-13 19:36:48 +01001573$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1574 openssl \
1575))
1576
Peter Foley9ddba662012-12-28 11:19:06 -05001577define gb_ExternalProject__use_openssl
1578$(call gb_ExternalProject_use_package,$(1),openssl)
1579
1580endef
1581
1582define gb_LinkTarget__use_openssl_headers
Stephan Bergmann74b6e9d2021-01-07 10:15:51 +01001583$(call gb_LinkTarget_use_external_project,$(1),openssl,full)
Peter Foley9ddba662012-12-28 11:19:06 -05001584$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001585 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
Peter Foley9ddba662012-12-28 11:19:06 -05001586 $$(INCLUDE) \
1587)
1588
1589endef
1590
Michael Stahl4a8919f2011-04-18 11:13:57 +00001591define gb_LinkTarget__use_openssl
Peter Foley9ddba662012-12-28 11:19:06 -05001592$(call gb_LinkTarget_use_package,$(1),openssl)
Michael Stahl4a8919f2011-04-18 11:13:57 +00001593ifeq ($(OS),WNT)
Michael Stahl5b906622013-10-24 00:22:20 +02001594$(call gb_LinkTarget_add_libs,$(1),\
Jan-Marek Glogowski0911b0a2020-07-14 23:16:53 +02001595 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.lib \
1596 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.lib \
Michael Stahl4a8919f2011-04-18 11:13:57 +00001597)
1598else
Michael Stahl2f6261f2013-09-19 19:28:36 +02001599$(call gb_LinkTarget_add_libs,$(1),\
1600 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1601 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
Jan-Marek Glogowski0911b0a2020-07-14 23:16:53 +02001602 $(if $(filter $(OS),LINUX),-pthread) \
Michael Stahl4a8919f2011-04-18 11:13:57 +00001603)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001604$(call gb_LinkTarget_use_external_project,$(1),openssl)
Michael Stahl4a8919f2011-04-18 11:13:57 +00001605ifeq ($(OS),SOLARIS)
Michael Stahl80374352012-09-28 12:25:50 +02001606$(call gb_LinkTarget_add_libs,$(1),\
1607 -lnsl \
1608 -lsocket \
Michael Stahl4a8919f2011-04-18 11:13:57 +00001609)
1610endif
1611endif
Caolán McNamara6bccd202011-07-25 22:10:33 +01001612
Michael Stahl4a8919f2011-04-18 11:13:57 +00001613endef
1614
1615endif # SYSTEM_OPENSSL
Andres Gomeze3f607e2013-04-11 10:24:25 +03001616endif # DISABLE_OPENSSL
Michael Stahl4a8919f2011-04-18 11:13:57 +00001617
Matúš Kukanc4560482011-07-28 01:03:23 +02001618
Norbert Thiebaudbf6d1f72013-08-31 18:55:53 -05001619ifeq ($(DISABLE_OPENSSL),TRUE)
Andres Gomez48d49752013-04-11 10:32:54 +03001620
1621define gb_LinkTarget__use_gnutls
1622$(call gb_LinkTarget_set_include,$(1),\
1623 $$(INCLUDE) \
1624 $(GNUTLS_CFLAGS) \
1625)
1626
1627$(call gb_LinkTarget_add_defs,$(1),\
1628 -DDISABLE_OPENSSL \
1629)
1630
1631$(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1632
1633endef
1634
1635define gb_LinkTarget__use_libgcrypt
1636$(call gb_LinkTarget_set_include,$(1),\
1637 $$(INCLUDE) \
1638 $(LIBGCRYPT_CFLAGS) \
1639)
1640
1641$(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1642
1643endef
1644
1645else # !DISABLE_OPENSSL
1646
1647gb_LinkTarget__use_gnutls:=
1648gb_LinkTarget__use_libgcrypt:=
1649
1650endif # DISABLE_OPENSSL
1651
1652
Michael Stahle3abec32014-02-11 15:57:18 +01001653ifneq ($(SYSTEM_CDR),)
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001654
1655define gb_LinkTarget__use_cdr
1656$(call gb_LinkTarget_set_include,$(1),\
1657 $$(INCLUDE) \
1658 $(CDR_CFLAGS) \
1659)
1660$(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1661
1662endef
1663
Bjoern Michaelsenfb455e52013-02-19 11:22:02 +01001664else # !SYSTEM_CDR
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001665
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001666define gb_LinkTarget__use_cdr
David Tardonf16f3662013-05-24 13:48:03 +02001667$(call gb_LinkTarget_set_include,$(1),\
1668 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1669 $$(INCLUDE) \
1670)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001671$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001672 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrbab8f39c52012-10-05 13:32:14 +02001673)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001674$(call gb_LinkTarget_use_external_project,$(1),libcdr)
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001675endef
1676
Bjoern Michaelsenfb455e52013-02-19 11:22:02 +01001677endif # SYSTEM_CDR
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001678
1679
Michael Stahle3abec32014-02-11 15:57:18 +01001680ifneq ($(SYSTEM_EBOOK),)
David Tardon316be1b2013-11-09 15:52:36 +01001681
1682define gb_LinkTarget__use_ebook
1683$(call gb_LinkTarget_set_include,$(1),\
1684 $$(INCLUDE) \
1685 $(EBOOK_CFLAGS) \
1686)
1687$(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1688
1689endef
1690
1691gb_ExternalProject__use_ebook :=
1692
1693else # !SYSTEM_EBOOK
1694
1695define gb_LinkTarget__use_ebook
1696$(call gb_LinkTarget_set_include,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001697 -I${WORKDIR}/UnpackedTarball/libebook/inc \
David Tardon316be1b2013-11-09 15:52:36 +01001698 $$(INCLUDE) \
1699)
1700$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001701 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
David Tardon316be1b2013-11-09 15:52:36 +01001702)
1703$(call gb_LinkTarget_use_external_project,$(1),libebook)
1704
1705endef
1706
1707define gb_ExternalProject__use_ebook
1708$(call gb_ExternalProject_use_external_project,$(1),libebook)
1709
1710endef
1711
1712endif # SYSTEM_EBOOK
1713
1714
Michael Stahle3abec32014-02-11 15:57:18 +01001715ifneq ($(SYSTEM_ETONYEK),)
David Tardon08ca3e42013-10-24 16:46:49 +02001716
1717define gb_LinkTarget__use_etonyek
1718$(call gb_LinkTarget_set_include,$(1),\
1719 $$(INCLUDE) \
1720 $(ETONYEK_CFLAGS) \
1721)
1722$(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1723
1724endef
1725
1726gb_ExternalProject__use_etonyek :=
1727
1728else # !SYSTEM_ETONYEK
1729
David Tardon78deb812015-05-19 16:12:08 +02001730ifeq ($(COM),MSC)
1731
1732$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1733 etonyek \
1734))
1735
David Tardon08ca3e42013-10-24 16:46:49 +02001736define gb_LinkTarget__use_etonyek
1737$(call gb_LinkTarget_set_include,$(1),\
David Tardon78deb812015-05-19 16:12:08 +02001738 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1739 $$(INCLUDE) \
1740)
1741$(call gb_LinkTarget_use_libraries,$(1),\
1742 etonyek \
1743)
1744
1745endef
1746
1747else # !MSC
1748
1749$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1750 libetonyek \
1751))
1752
1753define gb_LinkTarget__use_etonyek
1754$(call gb_LinkTarget_use_package,$(1),libetonyek)
1755
1756$(call gb_LinkTarget_set_include,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001757 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
David Tardon78deb812015-05-19 16:12:08 +02001758 -DLIBETONYEK_VISIBILITY \
David Tardon08ca3e42013-10-24 16:46:49 +02001759 $$(INCLUDE) \
1760)
1761$(call gb_LinkTarget_add_libs,$(1),\
David Tardon78deb812015-05-19 16:12:08 +02001762 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
David Tardon08ca3e42013-10-24 16:46:49 +02001763)
1764$(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1765
1766endef
1767
1768define gb_ExternalProject__use_etonyek
1769$(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1770
1771endef
1772
David Tardon78deb812015-05-19 16:12:08 +02001773endif
1774
David Tardon08ca3e42013-10-24 16:46:49 +02001775endif # SYSTEM_ETONYEK
1776
1777
Michael Stahle3abec32014-02-11 15:57:18 +01001778ifneq ($(SYSTEM_FREEHAND),)
Fridrich Štrba67153d72013-10-31 12:42:50 +01001779
1780define gb_LinkTarget__use_freehand
1781$(call gb_LinkTarget_set_include,$(1),\
1782 $$(INCLUDE) \
1783 $(FREEHAND_CFLAGS) \
1784)
1785$(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1786
1787endef
1788
1789gb_ExternalProject__use_freehand :=
1790
1791else # !SYSTEM_FREEHAND
1792
1793define gb_LinkTarget__use_freehand
1794$(call gb_LinkTarget_set_include,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001795 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
Fridrich Štrba67153d72013-10-31 12:42:50 +01001796 $$(INCLUDE) \
1797)
1798$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001799 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba67153d72013-10-31 12:42:50 +01001800)
1801$(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1802
1803endef
1804
1805define gb_ExternalProject__use_freehand
1806$(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1807
1808endef
1809
1810endif # SYSTEM_FREEHAND
1811
1812
Michael Stahle3abec32014-02-11 15:57:18 +01001813ifneq ($(SYSTEM_ODFGEN),)
Fridrich Štrba93848e12013-05-02 20:25:51 +02001814
1815define gb_LinkTarget__use_odfgen
1816$(call gb_LinkTarget_set_include,$(1),\
1817 $$(INCLUDE) \
1818 $(ODFGEN_CFLAGS) \
1819)
1820$(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1821
1822endef
1823
1824else # !SYSTEM_ODFGEN
1825
David Tardon36c3f912014-05-24 09:13:33 +02001826ifeq ($(COM),MSC)
1827
1828$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1829 odfgen \
1830))
1831
Fridrich Štrba93848e12013-05-02 20:25:51 +02001832define gb_LinkTarget__use_odfgen
David Tardon0f8a90c2013-05-24 13:49:11 +02001833$(call gb_LinkTarget_set_include,$(1),\
1834 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1835 $$(INCLUDE) \
1836)
David Tardon36c3f912014-05-24 09:13:33 +02001837$(call gb_LinkTarget_use_libraries,$(1),\
1838 odfgen \
Fridrich Štrba93848e12013-05-02 20:25:51 +02001839)
Fridrich Štrba93848e12013-05-02 20:25:51 +02001840
1841endef
1842
David Tardon36c3f912014-05-24 09:13:33 +02001843else # !MSC
1844
1845$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1846 libodfgen \
1847))
1848
1849define gb_LinkTarget__use_odfgen
1850$(call gb_LinkTarget_use_package,$(1),libodfgen)
1851
1852$(call gb_LinkTarget_set_include,$(1),\
1853 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
Stephan Bergmannb6ee5cf2015-01-26 15:09:13 +01001854 -DLIBODFGEN_VISIBILITY \
David Tardon36c3f912014-05-24 09:13:33 +02001855 $$(INCLUDE) \
1856)
1857$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001858 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
David Tardon36c3f912014-05-24 09:13:33 +02001859)
1860
1861endef
1862
1863endif
1864
Fridrich Štrba93848e12013-05-02 20:25:51 +02001865endif # SYSTEM_ODFGEN
1866
Miklos Vajna3f163062017-08-02 16:29:48 +02001867ifneq ($(SYSTEM_EPUBGEN),)
1868
1869define gb_LinkTarget__use_epubgen
1870$(call gb_LinkTarget_set_include,$(1),\
1871 $$(INCLUDE) \
1872 $(EPUBGEN_CFLAGS) \
1873)
1874$(call gb_LinkTarget_add_libs,$(1),$(EPUBGEN_LIBS))
1875
1876endef
1877gb_ExternalProject__use_epubgen :=
1878
1879else # !SYSTEM_EPUBGEN
1880
1881define gb_LinkTarget__use_epubgen
1882$(call gb_LinkTarget_set_include,$(1),\
1883 -I$(call gb_UnpackedTarball_get_dir,libepubgen)/inc \
1884 $$(INCLUDE) \
1885)
1886$(call gb_LinkTarget_add_libs,$(1),\
Miklos Vajnab2b1debf2017-12-13 10:54:27 +01001887 $(call gb_UnpackedTarball_get_dir,libepubgen)/src/lib/.libs/libepubgen-0.1$(gb_StaticLibrary_PLAINEXT) \
Miklos Vajna3f163062017-08-02 16:29:48 +02001888)
1889$(call gb_LinkTarget_use_external_project,$(1),libepubgen)
1890
1891endef
1892define gb_ExternalProject__use_epubgen
1893$(call gb_ExternalProject_use_external_project,$(1),libepubgen)
1894
1895endef
1896
1897endif # SYSTEM_EPUBGEN
Fridrich Štrba93848e12013-05-02 20:25:51 +02001898
David Tardonb421ce72014-05-24 08:39:54 +02001899ifneq ($(SYSTEM_REVENGE),)
1900
1901define gb_LinkTarget__use_revenge
1902$(call gb_LinkTarget_set_include,$(1),\
1903 $$(INCLUDE) \
1904 $(REVENGE_CFLAGS) \
1905)
1906$(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1907
1908endef
1909
David Tardon7c9c7792014-05-25 13:06:57 +02001910gb_ExternalProject__use_revenge :=
1911
David Tardonb421ce72014-05-24 08:39:54 +02001912else # !SYSTEM_REVENGE
1913
1914ifeq ($(COM),MSC)
1915
1916$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1917 revenge \
1918))
1919
1920define gb_LinkTarget__use_revenge
1921$(call gb_LinkTarget_set_include,$(1),\
David Tardon0b7d0a82014-05-25 13:19:31 +02001922 $(REVENGE_CFLAGS) \
David Tardonb421ce72014-05-24 08:39:54 +02001923 $$(INCLUDE) \
1924)
1925$(call gb_LinkTarget_use_libraries,$(1),\
1926 revenge \
1927)
1928
1929endef
1930
David Tardon7c9c7792014-05-25 13:06:57 +02001931define gb_ExternalProject__use_revenge
1932$(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1933
1934endef
1935
David Tardonb421ce72014-05-24 08:39:54 +02001936else # !MSC
1937
1938$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1939 librevenge \
1940))
1941
1942define gb_LinkTarget__use_revenge
1943$(call gb_LinkTarget_use_package,$(1),librevenge)
1944
1945$(call gb_LinkTarget_set_include,$(1),\
David Tardon0b7d0a82014-05-25 13:19:31 +02001946 $(REVENGE_CFLAGS) \
Stephan Bergmannb6ee5cf2015-01-26 15:09:13 +01001947 -DLIBREVENGE_VISIBILITY \
David Tardonb421ce72014-05-24 08:39:54 +02001948 $$(INCLUDE) \
1949)
1950$(call gb_LinkTarget_add_libs,$(1),\
David Tardon0b7d0a82014-05-25 13:19:31 +02001951 $(REVENGE_LIBS) \
David Tardonb421ce72014-05-24 08:39:54 +02001952)
1953endef
1954
David Tardon7c9c7792014-05-25 13:06:57 +02001955define gb_ExternalProject__use_revenge
1956$(call gb_ExternalProject_use_package,$(1),librevenge)
1957
1958endef
1959
David Tardonb421ce72014-05-24 08:39:54 +02001960endif # MSC
1961
1962endif # SYSTEM_REVENGE
1963
1964
Michael Stahle3abec32014-02-11 15:57:18 +01001965ifneq ($(SYSTEM_ABW),)
Fridrich Štrba10eaaac2014-01-13 17:01:32 +01001966
1967define gb_LinkTarget__use_abw
1968$(call gb_LinkTarget_set_include,$(1),\
1969 $$(INCLUDE) \
1970 $(ABW_CFLAGS) \
1971)
1972$(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1973
1974endef
1975gb_ExternalProject__use_abw :=
1976
1977else # !SYSTEM_ABW
1978
1979define gb_LinkTarget__use_abw
1980$(call gb_LinkTarget_set_include,$(1),\
1981 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1982 $$(INCLUDE) \
1983)
1984$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001985 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba10eaaac2014-01-13 17:01:32 +01001986)
1987$(call gb_LinkTarget_use_external_project,$(1),libabw)
1988
1989endef
1990define gb_ExternalProject__use_abw
1991$(call gb_ExternalProject_use_external_project,$(1),libabw)
1992
1993endef
1994
1995endif # SYSTEM_ABW
1996
1997
Michael Stahle3abec32014-02-11 15:57:18 +01001998ifneq ($(SYSTEM_MSPUB),)
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001999
2000define gb_LinkTarget__use_mspub
2001$(call gb_LinkTarget_set_include,$(1),\
2002 $$(INCLUDE) \
2003 $(MSPUB_CFLAGS) \
2004)
2005$(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
2006
2007endef
2008
Bjoern Michaelsena4c80752013-02-19 11:22:51 +01002009else # !SYSTEM_MSPUB
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02002010
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02002011define gb_LinkTarget__use_mspub
Michael Stahl35ac39e2013-05-16 13:09:11 +02002012$(call gb_LinkTarget_set_include,$(1),\
2013 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
2014 $$(INCLUDE) \
2015)
Michael Stahl2f6261f2013-09-19 19:28:36 +02002016$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02002017 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba093a5c92013-01-28 10:13:50 +01002018)
Michael Stahl2f6261f2013-09-19 19:28:36 +02002019$(call gb_LinkTarget_use_external_project,$(1),libmspub)
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02002020
2021endef
2022
Bjoern Michaelsena4c80752013-02-19 11:22:51 +01002023endif # SYSTEM_MSPUB
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02002024
2025
David Tardon516fb342014-06-26 21:26:11 +02002026ifneq ($(SYSTEM_PAGEMAKER),)
2027
2028define gb_LinkTarget__use_pagemaker
2029$(call gb_LinkTarget_set_include,$(1),\
2030 $$(INCLUDE) \
2031 $(PAGEMAKER_CFLAGS) \
2032)
2033$(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
2034
2035endef
2036gb_ExternalProject__use_pagemaker :=
2037
2038else # !SYSTEM_PAGEMAKER
2039
2040define gb_LinkTarget__use_pagemaker
2041$(call gb_LinkTarget_set_include,$(1),\
2042 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
2043 $$(INCLUDE) \
2044)
2045$(call gb_LinkTarget_add_libs,$(1),\
2046 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
2047)
2048$(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
2049
2050endef
2051define gb_ExternalProject__use_pagemaker
2052$(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
2053
2054endef
2055
2056endif # SYSTEM_PAGEMAKER
2057
2058
Aleksas Pantechovskise59b5b12017-08-27 22:10:14 +03002059ifneq ($(SYSTEM_QXP),)
2060
2061define gb_LinkTarget__use_qxp
2062$(call gb_LinkTarget_set_include,$(1),\
2063 $$(INCLUDE) \
2064 $(QXP_CFLAGS) \
2065)
2066$(call gb_LinkTarget_add_libs,$(1),$(QXP_LIBS))
2067
2068endef
2069gb_ExternalProject__use_qxp :=
2070
2071else # !SYSTEM_QXP
2072
2073define gb_LinkTarget__use_qxp
2074$(call gb_LinkTarget_set_include,$(1),\
2075 -I$(call gb_UnpackedTarball_get_dir,libqxp)/inc \
2076 $$(INCLUDE) \
2077)
2078$(call gb_LinkTarget_add_libs,$(1),\
2079 $(call gb_UnpackedTarball_get_dir,libqxp)/src/lib/.libs/libqxp-0.0$(gb_StaticLibrary_PLAINEXT) \
2080)
2081$(call gb_LinkTarget_use_external_project,$(1),libqxp)
2082
2083endef
2084define gb_ExternalProject__use_qxp
2085$(call gb_ExternalProject_use_external_project,$(1),libqxp)
2086
2087endef
2088
2089endif # SYSTEM_QXP
2090
2091
Aleksas Pantechovskisaaed6fe2016-06-22 19:02:29 +03002092ifneq ($(SYSTEM_ZMF),)
2093
2094define gb_LinkTarget__use_zmf
2095$(call gb_LinkTarget_set_include,$(1),\
2096 $$(INCLUDE) \
2097 $(ZMF_CFLAGS) \
2098)
2099$(call gb_LinkTarget_add_libs,$(1),$(ZMF_LIBS))
2100
2101endef
2102gb_ExternalProject__use_zmf :=
2103
2104else # !SYSTEM_ZMF
2105
2106define gb_LinkTarget__use_zmf
2107$(call gb_LinkTarget_set_include,$(1),\
2108 -I$(call gb_UnpackedTarball_get_dir,libzmf)/inc \
2109 $$(INCLUDE) \
2110)
2111$(call gb_LinkTarget_add_libs,$(1),\
2112 $(call gb_UnpackedTarball_get_dir,libzmf)/src/lib/.libs/libzmf-0.0$(gb_StaticLibrary_PLAINEXT) \
2113)
2114$(call gb_LinkTarget_use_external_project,$(1),libzmf)
2115
2116endef
2117define gb_ExternalProject__use_zmf
2118$(call gb_ExternalProject_use_external_project,$(1),libzmf)
2119
2120endef
2121
2122endif # SYSTEM_ZMF
2123
2124
Michael Stahle3abec32014-02-11 15:57:18 +01002125ifneq ($(SYSTEM_VISIO),)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002126
2127define gb_LinkTarget__use_visio
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002128$(call gb_LinkTarget_set_include,$(1),\
2129 $$(INCLUDE) \
Fridrich Štrbae531e8a2011-10-05 10:21:08 +02002130 $(VISIO_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002131)
Fridrich Štrbae531e8a2011-10-05 10:21:08 +02002132$(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02002133
2134endef
2135
Bjoern Michaelsenfe8bcfa2013-02-19 11:14:46 +01002136else # !SYSTEM_VISIO
Matúš Kukanc6a63952011-07-28 17:29:44 +02002137
Matúš Kukanc6a63952011-07-28 17:29:44 +02002138define gb_LinkTarget__use_visio
Michael Stahlacc7f612013-05-16 13:14:37 +02002139$(call gb_LinkTarget_set_include,$(1),\
2140 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2141 $$(INCLUDE) \
2142)
Michael Stahl2f6261f2013-09-19 19:28:36 +02002143$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02002144 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba64ab6112012-11-05 11:43:55 +01002145)
Michael Stahl2f6261f2013-09-19 19:28:36 +02002146$(call gb_LinkTarget_use_external_project,$(1),libvisio)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002147
2148endef
2149
Bjoern Michaelsenfe8bcfa2013-02-19 11:14:46 +01002150endif # SYSTEM_VISIO
Matúš Kukanc6a63952011-07-28 17:29:44 +02002151
2152
Michael Stahle3abec32014-02-11 15:57:18 +01002153ifneq ($(SYSTEM_WPD),)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002154
2155define gb_LinkTarget__use_wpd
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002156$(call gb_LinkTarget_set_include,$(1),\
2157 $$(INCLUDE) \
Fridrich Štrba8703f3e2011-10-05 10:04:04 +02002158 $(WPD_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002159)
Fridrich Štrba8703f3e2011-10-05 10:04:04 +02002160$(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02002161
2162endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02002163gb_ExternalProject__use_wpd :=
Matúš Kukanc6a63952011-07-28 17:29:44 +02002164
Bjoern Michaelsen5de206a2013-02-19 11:20:31 +01002165else # !SYSTEM_WPD
Matúš Kukanc6a63952011-07-28 17:29:44 +02002166
David Tardonc868a0c2014-12-23 18:37:54 +01002167ifeq ($(COM),MSC)
2168
2169$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2170 wpd \
2171))
2172
Fridrich Štrba4425db62012-09-24 13:17:45 +02002173define gb_LinkTarget__use_wpd
Michael Stahldb5c8c52013-05-16 13:28:14 +02002174$(call gb_LinkTarget_set_include,$(1),\
2175 $(WPD_CFLAGS) \
2176 $$(INCLUDE) \
2177)
David Tardonc868a0c2014-12-23 18:37:54 +01002178$(call gb_LinkTarget_use_libraries,$(1),\
2179 wpd \
Michael Stahl34295432012-09-24 22:25:28 +02002180)
Fridrich Štrba4425db62012-09-24 13:17:45 +02002181
2182endef
David Tardonc868a0c2014-12-23 18:37:54 +01002183
Michael Stahl2b7536a2012-10-05 21:17:25 +02002184define gb_ExternalProject__use_wpd
David Tardonc868a0c2014-12-23 18:37:54 +01002185$(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
Michael Stahl2b7536a2012-10-05 21:17:25 +02002186
2187endef
Fridrich Štrba4425db62012-09-24 13:17:45 +02002188
David Tardonc868a0c2014-12-23 18:37:54 +01002189else # !MSC
2190
2191$(eval $(call gb_Helper_register_packages_for_install,ooo, \
2192 libwpd \
2193))
2194
2195define gb_LinkTarget__use_wpd
2196$(call gb_LinkTarget_use_package,$(1),libwpd)
2197
2198$(call gb_LinkTarget_set_include,$(1),\
2199 $(WPD_CFLAGS) \
2200 $$(INCLUDE) \
2201)
2202$(call gb_LinkTarget_add_libs,$(1),\
2203 $(WPD_LIBS) \
2204)
2205
2206endef
2207
2208define gb_ExternalProject__use_wpd
2209$(call gb_ExternalProject_use_package,$(1),libwpd)
2210
2211endef
2212
2213endif # MSC
2214
Bjoern Michaelsen5de206a2013-02-19 11:20:31 +01002215endif # SYSTEM_WPD
Matúš Kukanc6a63952011-07-28 17:29:44 +02002216
2217
Michael Stahle3abec32014-02-11 15:57:18 +01002218ifneq ($(SYSTEM_WPG),)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002219
2220define gb_LinkTarget__use_wpg
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002221$(call gb_LinkTarget_set_include,$(1),\
2222 $$(INCLUDE) \
Fridrich Štrba62c43b42011-10-05 10:15:40 +02002223 $(WPG_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002224)
Fridrich Štrba62c43b42011-10-05 10:15:40 +02002225$(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02002226
2227endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02002228gb_ExternalProject__use_wpg :=
Matúš Kukanc6a63952011-07-28 17:29:44 +02002229
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01002230else # !SYSTEM_WPG
Matúš Kukanc6a63952011-07-28 17:29:44 +02002231
David Tardonc868a0c2014-12-23 18:37:54 +01002232ifeq ($(COM),MSC)
2233
2234$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2235 wpg \
2236))
2237
Matúš Kukanc6a63952011-07-28 17:29:44 +02002238define gb_LinkTarget__use_wpg
David Tardonc51a2542013-05-24 14:53:37 +02002239$(call gb_LinkTarget_set_include,$(1),\
2240 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2241 $$(INCLUDE) \
2242)
David Tardonc868a0c2014-12-23 18:37:54 +01002243$(call gb_LinkTarget_use_libraries,$(1),\
2244 wpg \
Michael Stahl53b7bdc2012-10-05 17:19:47 +02002245)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002246
2247endef
David Tardonc868a0c2014-12-23 18:37:54 +01002248
2249else # !MSC
2250
2251$(eval $(call gb_Helper_register_packages_for_install,ooo, \
2252 libwpg \
2253))
2254
2255define gb_LinkTarget__use_wpg
2256$(call gb_LinkTarget_use_package,$(1),libwpg)
2257
2258$(call gb_LinkTarget_set_include,$(1),\
2259 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2260 $$(INCLUDE) \
2261)
2262$(call gb_LinkTarget_add_libs,$(1),\
2263 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2264)
Michael Stahl2b7536a2012-10-05 21:17:25 +02002265
2266endef
Matúš Kukanc6a63952011-07-28 17:29:44 +02002267
David Tardonc868a0c2014-12-23 18:37:54 +01002268endif # MSC
2269
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01002270endif # SYSTEM_WPG
Matúš Kukanc6a63952011-07-28 17:29:44 +02002271
2272
Michael Stahle3abec32014-02-11 15:57:18 +01002273ifneq ($(SYSTEM_WPS),)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002274
2275define gb_LinkTarget__use_wps
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002276$(call gb_LinkTarget_set_include,$(1),\
2277 $$(INCLUDE) \
Fridrich Štrbae991bba2011-10-05 10:18:53 +02002278 $(WPS_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002279)
Fridrich Štrbae991bba2011-10-05 10:18:53 +02002280$(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02002281
2282endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02002283gb_ExternalProject__use_wps :=
Matúš Kukanc6a63952011-07-28 17:29:44 +02002284
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01002285else # !SYSTEM_WPS
Matúš Kukanc6a63952011-07-28 17:29:44 +02002286
David Tardonf85d10f2014-05-30 15:35:48 +02002287ifeq ($(COM),MSC)
2288
2289$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2290 wps \
2291))
2292
Matúš Kukanc6a63952011-07-28 17:29:44 +02002293define gb_LinkTarget__use_wps
David Tardon6f9d8212013-05-24 14:58:31 +02002294$(call gb_LinkTarget_set_include,$(1),\
2295 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2296 $$(INCLUDE) \
2297)
David Tardonf85d10f2014-05-30 15:35:48 +02002298
2299$(call gb_LinkTarget_use_libraries,$(1),\
2300 wps \
Fridrich Štrba8c07bd32013-04-19 12:06:58 +02002301)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002302
2303endef
David Tardonf85d10f2014-05-30 15:35:48 +02002304
2305else # !MSC
2306
2307$(eval $(call gb_Helper_register_packages_for_install,ooo, \
2308 libwps \
2309))
2310
2311define gb_LinkTarget__use_wps
2312$(call gb_LinkTarget_use_package,$(1),libwps)
2313
2314$(call gb_LinkTarget_set_include,$(1),\
2315 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2316 $$(INCLUDE) \
2317)
2318$(call gb_LinkTarget_add_libs,$(1),\
osnolaf9568332015-05-18 10:21:10 +02002319 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
David Tardonf85d10f2014-05-30 15:35:48 +02002320)
Michael Stahl2b7536a2012-10-05 21:17:25 +02002321
2322endef
Matúš Kukanc6a63952011-07-28 17:29:44 +02002323
David Tardonf85d10f2014-05-30 15:35:48 +02002324endif # MSC
2325
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01002326endif # SYSTEM_WPS
Matúš Kukanc6a63952011-07-28 17:29:44 +02002327
2328
Michael Stahle3abec32014-02-11 15:57:18 +01002329ifneq ($(SYSTEM_MWAW),)
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002330
2331define gb_LinkTarget__use_mwaw
2332$(call gb_LinkTarget_set_include,$(1),\
2333 $$(INCLUDE) \
2334 $(MWAW_CFLAGS) \
2335)
2336$(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2337
2338endef
2339
2340else # !SYSTEM_MWAW
2341
David Tardon79211c12014-05-30 13:55:20 +02002342ifeq ($(COM),MSC)
2343
2344$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2345 mwaw \
2346))
2347
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002348define gb_LinkTarget__use_mwaw
Michael Stahlff718952013-05-16 13:11:36 +02002349$(call gb_LinkTarget_set_include,$(1),\
2350 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2351 $$(INCLUDE) \
2352)
David Tardon79211c12014-05-30 13:55:20 +02002353
2354$(call gb_LinkTarget_use_libraries,$(1),\
2355 mwaw \
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002356)
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002357
2358endef
2359
David Tardon79211c12014-05-30 13:55:20 +02002360else # !MSC
2361
2362$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2363 libmwaw \
2364))
2365
2366define gb_LinkTarget__use_mwaw
2367$(call gb_LinkTarget_use_package,$(1),libmwaw)
2368
2369$(call gb_LinkTarget_set_include,$(1),\
2370 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2371 $$(INCLUDE) \
2372)
2373$(call gb_LinkTarget_add_libs,$(1),\
2374 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2375)
2376
2377endef
2378
2379endif # MSC
2380
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002381endif # SYSTEM_MWAW
2382
osnola1faae1f2016-08-10 12:43:56 +02002383ifneq ($(SYSTEM_STAROFFICE),)
2384
2385define gb_LinkTarget__use_staroffice
2386$(call gb_LinkTarget_set_include,$(1),\
2387 $$(INCLUDE) \
2388 $(STAROFFICE_CFLAGS) \
2389)
2390$(call gb_LinkTarget_add_libs,$(1),$(STAROFFICE_LIBS))
2391
2392endef
2393
2394else # !SYSTEM_STAROFFICE
2395
2396ifeq ($(COM),MSC)
2397
2398$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2399 staroffice \
2400))
2401
2402define gb_LinkTarget__use_staroffice
2403$(call gb_LinkTarget_set_include,$(1),\
2404 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2405 $$(INCLUDE) \
2406)
2407
2408$(call gb_LinkTarget_use_libraries,$(1),\
2409 staroffice \
2410)
2411
2412endef
2413
2414else # !MSC
2415
2416$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2417 libstaroffice \
2418))
2419
2420define gb_LinkTarget__use_staroffice
2421$(call gb_LinkTarget_use_package,$(1),libstaroffice)
2422
2423$(call gb_LinkTarget_set_include,$(1),\
2424 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2425 $$(INCLUDE) \
2426)
2427$(call gb_LinkTarget_add_libs,$(1),\
2428 -L$(call gb_UnpackedTarball_get_dir,libstaroffice)/src/lib/.libs -lstaroffice-0.0 \
2429)
2430
2431endef
2432
2433endif # MSC
2434
2435endif # SYSTEM_STAROFFICE
2436
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002437
Michael Stahle3abec32014-02-11 15:57:18 +01002438ifneq ($(SYSTEM_LCMS2),)
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002439
2440define gb_LinkTarget__use_lcms2
2441$(call gb_LinkTarget_set_include,$(1),\
2442 $$(INCLUDE) \
Peter Foleyf7452122012-11-04 08:46:44 -05002443 $(LCMS2_CFLAGS) \
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002444)
2445$(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2446
2447endef
2448
Peter Foley8905c0e2012-11-08 21:00:30 -05002449gb_ExternalProject__use_lcms2 :=
2450
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002451else # !SYSTEM_LCMS2
2452
Michael Stahl32a617d2014-02-17 11:23:19 +01002453$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2454 lcms2 \
2455))
2456
Peter Foley8905c0e2012-11-08 21:00:30 -05002457define gb_ExternalProject__use_lcms2
2458$(call gb_ExternalProject_use_package,$(1),lcms2)
2459
2460endef
2461
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03002462ifeq ($(OS),ANDROID)
2463
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03002464define gb_LinkTarget__use_lcms2
Christian Lohmaier3dee92e2012-11-13 19:44:44 +01002465$(call gb_LinkTarget_use_package,$(1),lcms2)
Matúš Kukan3790e842012-09-04 22:00:15 +02002466$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002467 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
Matúš Kukan3790e842012-09-04 22:00:15 +02002468 $$(INCLUDE) \
2469)
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03002470
2471endef
2472
2473else
2474
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002475define gb_LinkTarget__use_lcms2
Christian Lohmaier3dee92e2012-11-13 19:44:44 +01002476$(call gb_LinkTarget_use_package,$(1),lcms2)
Matúš Kukan3790e842012-09-04 22:00:15 +02002477$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002478 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
Matúš Kukan3790e842012-09-04 22:00:15 +02002479 $$(INCLUDE) \
2480)
Michael Stahl25f65f22013-10-23 22:04:36 +02002481$(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002482
2483endef
2484
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03002485endif # ANDROID
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002486endif # SYSTEM_LCMS2
2487
Matúš Kukan8dc394d2014-03-31 19:36:41 +02002488ifneq ($(ENABLE_LPSOLVE),)
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002489
Michael Stahlab586f12014-02-11 19:25:30 +01002490ifneq ($(SYSTEM_LPSOLVE),)
Matúš Kukanc4560482011-07-28 01:03:23 +02002491
Peter Foley085346f2012-11-03 19:19:30 -04002492define gb_LinkTarget__use_lpsolve
Matúš Kukanc4560482011-07-28 01:03:23 +02002493$(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
Peter Foley085346f2012-11-03 19:19:30 -04002494$(call gb_LinkTarget_add_defs,$(1),\
2495 -DSYSTEM_LPSOLVE \
Peter Foley29d5e292012-11-07 18:18:08 -05002496)
Matúš Kukanc4560482011-07-28 01:03:23 +02002497
2498endef
2499
2500else # !SYSTEM_LPSOLVE
2501
Peter Foley085346f2012-11-03 19:19:30 -04002502define gb_LinkTarget__use_lpsolve
Stephan Bergmann54471172019-10-19 15:50:07 +02002503$(call gb_LinkTarget_use_package,$(1),lpsolve)
Michael Stahlb7d8ca82013-10-24 01:25:59 +02002504ifeq ($(COM),MSC)
2505$(call gb_LinkTarget_add_libs,$(1),\
2506 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2507)
2508else
Michael Stahlb177b302013-10-23 21:33:51 +02002509$(call gb_LinkTarget_add_libs,$(1),\
2510 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
Matúš Kukanc4560482011-07-28 01:03:23 +02002511)
Michael Stahlb7d8ca82013-10-24 01:25:59 +02002512endif
Peter Foley085346f2012-11-03 19:19:30 -04002513$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002514 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
Peter Foley085346f2012-11-03 19:19:30 -04002515 $$(INCLUDE) \
2516)
Matúš Kukanc4560482011-07-28 01:03:23 +02002517
2518endef
2519
Matúš Kukan083fa762014-02-27 17:08:09 +01002520$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2521 lpsolve \
2522))
2523
Matúš Kukanc4560482011-07-28 01:03:23 +02002524endif # SYSTEM_LPSOLVE
Matúš Kukan4f7b9682014-02-28 10:39:19 +01002525
Matúš Kukan077bdc72014-03-27 14:51:46 +01002526else
2527
2528gb_LinkTarget__use_lpsolve :=
2529
Matúš Kukan8dc394d2014-03-31 19:36:41 +02002530endif # ENABLE_LPSOLVE
2531
2532ifneq ($(ENABLE_COINMP),)
Matúš Kukan4f7b9682014-02-28 10:39:19 +01002533
Rene Engelhardd85f5132014-08-06 00:03:21 +02002534ifneq ($(SYSTEM_COINMP),TRUE)
2535
Matúš Kukan4f7b9682014-02-28 10:39:19 +01002536define gb_LinkTarget__use_coinmp
2537$(call gb_LinkTarget_use_package,$(1),coinmp)
2538ifeq ($(COM),MSC)
2539$(call gb_LinkTarget_add_libs,$(1),\
David Ostrovsky152e2a22014-11-30 18:26:01 +01002540 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
Matúš Kukan4f7b9682014-02-28 10:39:19 +01002541)
2542else
2543$(call gb_LinkTarget_add_libs,$(1),\
2544 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2545 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2546 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2547 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2548 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2549 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2550 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2551)
2552endif
2553$(call gb_LinkTarget_set_include,$(1),\
2554 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
Caolán McNamara67b4b342014-06-06 14:32:09 +01002555 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
Matúš Kukan4f7b9682014-02-28 10:39:19 +01002556 $$(INCLUDE) \
2557)
2558
2559endef
2560
2561$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2562 coinmp \
2563))
2564
Rene Engelhardd85f5132014-08-06 00:03:21 +02002565else # SYSTEM_COINMP
2566
2567define gb_LinkTarget__use_coinmp
2568$(call gb_LinkTarget_set_include,$(1),\
2569 $$(INCLUDE) \
2570 $(COINMP_CFLAGS) \
2571)
2572$(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2573
2574endef
2575
2576endif
2577
Matúš Kukan077bdc72014-03-27 14:51:46 +01002578else
2579
2580gb_LinkTarget__use_coinmp :=
2581
Matúš Kukan8dc394d2014-03-31 19:36:41 +02002582endif # ENABLE_COINMP
Matúš Kukanc4560482011-07-28 01:03:23 +02002583
Michael Stahl9ec0e6d2015-11-27 23:54:40 +01002584ifneq (,$(filter MDNSRESPONDER,$(BUILD_TYPE)))
2585
2586define gb_LinkTarget__use_mDNSResponder
2587$(call gb_LinkTarget_set_include,$(1),\
2588 -I$(call gb_UnpackedTarball_get_dir,mDNSResponder)/mDNSShared \
2589 $$(INCLUDE) \
2590)
2591$(call gb_LinkTarget_use_static_libraries,$(1),mDNSResponder)
2592endef
2593
2594endif # MDNSRESPONDER
2595
Caolán McNamaraaabc73d2012-08-30 13:58:15 +01002596ifeq ($(ENABLE_GIO),TRUE)
Matúš Kukanc4560482011-07-28 01:03:23 +02002597
Matúš Kukan464b4332012-01-15 02:12:49 +01002598define gb_LinkTarget__use_gio
2599$(call gb_LinkTarget_set_include,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +01002600 $$(INCLUDE) \
Caolán McNamara1ac9ccf2012-01-16 08:57:38 +00002601 $(GIO_CFLAGS) \
Matúš Kukan464b4332012-01-15 02:12:49 +01002602)
2603
2604$(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2605
2606endef
2607
Caolán McNamaraaabc73d2012-08-30 13:58:15 +01002608else # ENABLE_GIO
2609
2610define gb_LinkTarget__use_gio
Caolán McNamara1e98bb42012-11-06 20:09:57 +00002611
Caolán McNamaraaabc73d2012-08-30 13:58:15 +01002612endef
2613
2614endif # ENABLE_GIO
2615
Siqid0419802013-07-24 11:16:31 +02002616ifeq ($(ENABLE_AVAHI),TRUE)
2617
2618define gb_LinkTarget__use_avahi
2619$(call gb_LinkTarget_set_include,$(1),\
2620 $$(INCLUDE) \
2621 $(AVAHI_CFLAGS) \
2622)
2623
2624$(call gb_LinkTarget_add_defs,$(1),\
2625 -DENABLE_AVAHI \
2626)
2627
2628$(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2629
2630endef
2631
2632else # ENABLE_AVAHI
2633
David Tardon9ce38ef2013-11-05 07:03:08 +01002634gb_LinkTarget__use_avahi :=
Siqid0419802013-07-24 11:16:31 +02002635
2636endif # ENABLE_AVAHI
2637
Caolán McNamara68ffb332012-09-14 11:31:50 +01002638ifeq ($(ENABLE_CUPS),TRUE)
2639
2640define gb_LinkTarget__use_cups
2641$(call gb_LinkTarget_add_defs,$(1),\
2642 -DENABLE_CUPS \
2643)
2644
2645$(call gb_LinkTarget_add_libs,$(1),\
2646 -lcups \
2647)
2648
2649endef
2650
2651else # ENABLE_CUPS
2652
2653define gb_LinkTarget__use_cups
2654
2655endef
2656
Arkadiy Illarionov02addb32018-07-08 16:33:32 +03002657endif # ENABLE_CUPS
David Tardon1b717ce2011-11-02 13:00:48 +01002658
Caolán McNamara9ec0a3e2012-08-30 13:44:53 +01002659ifeq ($(ENABLE_DBUS),TRUE)
David Tardon1b717ce2011-11-02 13:00:48 +01002660
2661define gb_LinkTarget__use_dbus
2662$(call gb_LinkTarget_set_include,$(1),\
2663 $$(INCLUDE) \
2664 $(DBUS_CFLAGS) \
2665)
2666
David Tardon1b717ce2011-11-02 13:00:48 +01002667$(call gb_LinkTarget_add_libs,$(1),\
2668 $(DBUS_LIBS) \
2669)
2670
2671endef
2672
2673else # ENABLE_DBUS
2674
2675define gb_LinkTarget__use_dbus
2676
2677endef
2678
2679endif # ENABLE_DBUS
2680
2681
Michael Stahle3abec32014-02-11 15:57:18 +01002682ifneq ($(SYSTEM_LIBPNG),)
David Tardon6df9c472011-09-15 14:44:34 +02002683
Michael Stahlb0e0ee42017-09-14 14:12:40 +02002684define gb_LinkTarget__use_libpng
David Tardon6df9c472011-09-15 14:44:34 +02002685$(call gb_LinkTarget_set_include,$(1),\
2686 $$(INCLUDE) \
2687 $(LIBPNG_CFLAGS) \
2688)
2689
2690$(call gb_LinkTarget_add_libs,$(1),\
2691 $(LIBPNG_LIBS) \
2692)
2693
2694endef
2695
Michael Stahlb0e0ee42017-09-14 14:12:40 +02002696gb_ExternalProject__use_libpng :=
David Tardon5955e7b2016-11-03 13:58:29 +01002697
David Tardon6df9c472011-09-15 14:44:34 +02002698else # !SYSTEM_LIBPNG
2699
Michael Stahlb0e0ee42017-09-14 14:12:40 +02002700define gb_LinkTarget__use_libpng
Michael Stahl416b3212013-05-08 17:22:22 +02002701$(call gb_LinkTarget_set_include,$(1),\
2702 $(LIBPNG_CFLAGS) \
2703 $$(INCLUDE) \
2704)
Matúš Kukanf96d58b2012-09-08 18:13:20 +02002705$(call gb_LinkTarget_use_static_libraries,$(1),\
Michael Stahlb0e0ee42017-09-14 14:12:40 +02002706 libpng \
David Tardon6df9c472011-09-15 14:44:34 +02002707)
Michael Stahl398ce442012-09-28 21:47:29 +02002708$(call gb_LinkTarget__use_zlib,$(1))
David Tardon6df9c472011-09-15 14:44:34 +02002709
2710endef
2711
Michael Stahlb0e0ee42017-09-14 14:12:40 +02002712define gb_ExternalProject__use_libpng
David Tardon5955e7b2016-11-03 13:58:29 +01002713$(call gb_ExternalProject_use_static_libraries,$(1),\
Michael Stahlb0e0ee42017-09-14 14:12:40 +02002714 libpng \
David Tardon5955e7b2016-11-03 13:58:29 +01002715)
2716
2717endef
2718
David Tardon6df9c472011-09-15 14:44:34 +02002719endif # !SYSTEM_LIBPNG
2720
Michael Stahl50471a82011-12-06 19:17:52 +01002721
Michael Stahle3abec32014-02-11 15:57:18 +01002722ifneq ($(SYSTEM_CURL),)
Michael Stahl50471a82011-12-06 19:17:52 +01002723
2724define gb_LinkTarget__use_curl
Cédric Bosdonnat89361fa2014-07-16 17:02:01 +02002725$(call gb_LinkTarget_add_defs,$(1),\
2726 -DSYSTEM_CURL \
2727)
Michael Stahl50471a82011-12-06 19:17:52 +01002728$(call gb_LinkTarget_set_include,$(1),\
2729 $$(INCLUDE) \
2730 $(CURL_CFLAGS) \
2731)
2732$(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2733
2734endef
2735
2736else # !SYSTEM_CURL
2737
Michael Stahl32a617d2014-02-17 11:23:19 +01002738$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2739 curl \
2740))
2741
Michael Stahl50471a82011-12-06 19:17:52 +01002742define gb_LinkTarget__use_curl
Christian Lohmaier3dee92e2012-11-13 19:44:44 +01002743$(call gb_LinkTarget_use_package,$(1),curl)
Matúš Kukan9f3a3ab2012-10-29 22:57:34 +01002744$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002745 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
Matúš Kukan9f3a3ab2012-10-29 22:57:34 +01002746 $$(INCLUDE) \
2747)
Michael Stahl936a1a92013-10-23 22:37:11 +02002748
2749ifeq ($(COM),MSC)
Michael Stahl714b93b2013-10-24 00:32:04 +02002750$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahl020eb3b2021-07-21 11:57:51 +02002751 $(call gb_UnpackedTarball_get_dir,curl)/builds/libcurl-vc12-$(gb_MSBUILD_PLATFORM)-$(gb_MSBUILD_CONFIG)-dll-ipv6-sspi-schannel/lib/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).lib \
Michael Stahl50471a82011-12-06 19:17:52 +01002752)
Michael Stahl936a1a92013-10-23 22:37:11 +02002753else
2754$(call gb_LinkTarget_add_libs,$(1),\
2755 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2756)
2757endif
Michael Stahl50471a82011-12-06 19:17:52 +01002758
2759endef
2760
2761endif # SYSTEM_CURL
2762
Stephan Bergmann49313b02012-11-27 15:35:02 +01002763ifeq ($(ENABLE_VALGRIND),TRUE)
David Tardon3446cda2011-12-23 12:21:19 +01002764
2765define gb_LinkTarget__use_valgrind
2766$(call gb_LinkTarget_add_defs,$(1),\
Stephan Bergmann49313b02012-11-27 15:35:02 +01002767 -DHAVE_VALGRIND_HEADERS \
David Tardon3446cda2011-12-23 12:21:19 +01002768)
2769
2770$(call gb_LinkTarget_set_include,$(1),\
2771 $$(INCLUDE) \
2772 $(VALGRIND_CFLAGS) \
2773)
2774
2775endef
2776
Stephan Bergmann49313b02012-11-27 15:35:02 +01002777else # !ENABLE_VALGRIND
David Tardon3446cda2011-12-23 12:21:19 +01002778
2779define gb_LinkTarget__use_valgrind
2780
2781endef
2782
Stephan Bergmann49313b02012-11-27 15:35:02 +01002783endif # ENABLE_VALGRIND
David Tardon3446cda2011-12-23 12:21:19 +01002784
Ashod Nakashian0d8c6702019-03-06 22:06:35 -05002785ifeq ($(ENABLE_POPPLER),TRUE)
2786
Michael Stahl32db4992014-02-11 19:35:22 +01002787ifneq ($(SYSTEM_POPPLER),)
David Tardondba2d322012-02-18 18:54:35 +01002788
2789define gb_LinkTarget__use_poppler
David Tardondba2d322012-02-18 18:54:35 +01002790$(call gb_LinkTarget_set_include,$(1),\
2791 $(POPPLER_CFLAGS) \
2792 $$(INCLUDE) \
2793)
2794
2795$(call gb_LinkTarget_add_libs,$(1),\
2796 $(POPPLER_LIBS) \
2797)
2798
2799endef
2800
2801else # !SYSTEM_POPPLER
2802
David Tardondba2d322012-02-18 18:54:35 +01002803define gb_LinkTarget__use_poppler
David Tardoncad68c62015-09-29 18:09:16 +02002804$(call gb_LinkTarget_use_external_project,$(1),poppler,full)
Peter Foleyfb1d11d2013-02-17 09:26:01 -05002805
David Tardon548b61a2012-02-21 06:58:02 +01002806$(call gb_LinkTarget_set_include,$(1),\
Fridrich Štrbaeb276d12013-07-08 14:01:17 +02002807 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2808 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2809 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
David Tardon548b61a2012-02-21 06:58:02 +01002810 $$(INCLUDE) \
David Tardondba2d322012-02-18 18:54:35 +01002811)
2812
Michael Stahl67e53552018-06-20 16:10:44 +02002813$(call gb_LinkTarget_use_static_libraries,$(1),poppler)
David Tardon548b61a2012-02-21 06:58:02 +01002814
Michael Stahl77d297f2017-09-13 22:50:14 +02002815$(call gb_LinkTarget_use_external,$(1),libjpeg)
Michael Stahl43532a02016-11-03 15:58:08 +01002816
David Tardon548b61a2012-02-21 06:58:02 +01002817ifeq ($(OS),MACOSX)
Michael Stahl967986b2012-09-28 00:54:49 +02002818$(call gb_LinkTarget_add_libs,$(1),\
2819 -lobjc \
David Tardon548b61a2012-02-21 06:58:02 +01002820)
Caolán McNamara0d5cc8c2014-08-30 15:12:53 +01002821else ifeq ($(OS),LINUX)
2822$(call gb_LinkTarget_add_libs,$(1),\
2823 -pthread \
2824)
David Tardon548b61a2012-02-21 06:58:02 +01002825else ifeq ($(OS),WNT)
Michael Stahldc397aae2012-09-28 15:31:46 +02002826$(call gb_LinkTarget_use_system_win32_libs,$(1),\
David Tardon548b61a2012-02-21 06:58:02 +01002827 advapi32 \
2828 gdi32 \
2829)
2830endif
2831
David Tardondba2d322012-02-18 18:54:35 +01002832endef
2833
2834endif # SYSTEM_POPPLER
2835
Ashod Nakashian0d8c6702019-03-06 22:06:35 -05002836endif # ENABLE_POPPLER
2837
David Tardon3446cda2011-12-23 12:21:19 +01002838
Michael Stahl46648152014-02-11 16:33:18 +01002839ifneq ($(SYSTEM_CLUCENE),)
David Tardon22c60cb2012-04-07 15:50:47 +02002840
2841define gb_LinkTarget__use_clucene
2842$(call gb_LinkTarget_add_defs,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02002843 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
David Tardon22c60cb2012-04-07 15:50:47 +02002844)
2845
2846$(call gb_LinkTarget_set_include,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02002847 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
David Tardon22c60cb2012-04-07 15:50:47 +02002848 $$(INCLUDE) \
2849)
2850
2851$(call gb_LinkTarget_add_libs,$(1),\
2852 $(CLUCENE_LIBS) \
2853)
2854
2855endef
2856
2857else # !SYSTEM_CLUCENE
2858
2859define gb_LinkTarget__use_clucene
Michael Stahl28cde0c2013-05-07 23:47:27 +02002860$(call gb_LinkTarget_set_include,$(1),\
2861 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2862 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2863 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2864 $$(INCLUDE) \
2865)
2866
Michael Stahlc923f7d2012-04-07 23:22:08 +02002867$(call gb_LinkTarget_use_libraries,$(1),\
David Tardon22c60cb2012-04-07 15:50:47 +02002868 clucene \
2869)
2870
2871endef
2872
Marcos Paulo de Souzaf70343b2014-02-12 06:53:02 -02002873$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
David Tardon22c60cb2012-04-07 15:50:47 +02002874 clucene \
2875))
2876
2877endif # SYSTEM_CLUCENE
2878
Peter Foley64402842011-12-22 16:34:35 -05002879define gb_LinkTarget__use_gobject
Rene Engelhardac3c7ba2012-11-06 20:38:47 +01002880$(call gb_LinkTarget_add_libs,$(1),\
2881 $(GOBJECT_LIBS) \
2882)
2883
2884$(call gb_LinkTarget_set_include,$(1),\
2885 $$(INCLUDE) \
2886 $(GOBJECT_CFLAGS) \
2887)
Peter Foley64402842011-12-22 16:34:35 -05002888endef
2889
Sophia Schröderf4fc28a2018-04-11 15:39:57 +01002890ifneq ($(SYSTEM_HSQLDB),)
2891
2892define gb_LinkTarget__use_hsqldb
2893
2894$(call gb_LinkTarget_add_defs,$(1),\
2895 -DSYSTEM_HSQLDB \
2896 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2897)
2898
2899endef
2900
2901else # !SYSTEM_HSQLDB
2902
2903define gb_LinkTarget__use_hsqldb
2904
2905endef
2906
2907endif # SYSTEM_HSQLDB
2908
Andrew Udvare6776c532019-01-08 04:53:51 -05002909ifeq ($(ENABLE_LDAP),TRUE)
Michael Stahl5378dea2014-02-11 19:11:47 +01002910ifneq ($(SYSTEM_OPENLDAP),)
Michael Stahle0ee0d42012-07-16 19:00:07 +02002911
2912define gb_LinkTarget__use_openldap
2913
2914$(call gb_LinkTarget_add_libs,$(1),\
2915 -lldap \
2916 -llber \
2917)
2918
2919endef
2920
Michael Stahl2f6261f2013-09-19 19:28:36 +02002921gb_ExternalProject__use_openldap :=
2922
Michael Stahl5378dea2014-02-11 19:11:47 +01002923else # !SYSTEM_OPENLDAP
Michael Stahle0ee0d42012-07-16 19:00:07 +02002924
Michael Stahle0ee0d42012-07-16 19:00:07 +02002925define gb_LinkTarget__use_openldap
Matúš Kukan7a030392012-10-29 23:29:37 +01002926$(call gb_LinkTarget_use_unpacked,$(1),openldap)
Michael Stahle0ee0d42012-07-16 19:00:07 +02002927$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002928 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
Michael Stahle0ee0d42012-07-16 19:00:07 +02002929 $$(INCLUDE) \
2930)
Stephan Bergmann6b4c4352015-10-09 09:21:48 +02002931$(call gb_LinkTarget_use_external_project,$(1),openldap,full)
Michael Stahl2f6261f2013-09-19 19:28:36 +02002932$(call gb_LinkTarget_add_libs,$(1), \
2933 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2934 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
Michael Stahle0ee0d42012-07-16 19:00:07 +02002935)
2936
2937endef
Andrew Udvare6776c532019-01-08 04:53:51 -05002938endif
Michael Stahle0ee0d42012-07-16 19:00:07 +02002939
Michael Stahl2f6261f2013-09-19 19:28:36 +02002940define gb_ExternalProject__use_openldap
2941$(call gb_ExternalProject_use_external_project,$(1),openldap)
2942
2943endef
2944
Michael Stahle0ee0d42012-07-16 19:00:07 +02002945endif # SYSTEM_OPENLDAP
2946
Wastack45f42682016-07-28 17:16:19 +02002947ifneq ($(SYSTEM_LIBTOMMATH),)
2948
2949define gb_LinkTarget__use_libtommath
2950$(call gb_LinkTarget_set_include,$(1),\
2951 $(LIBTOMMATH_CFLAGS) \
2952 $$(INCLUDE) \
2953)
2954$(call gb_LinkTarget_add_libs,$(1),$(LIBTOMMATH_LIBS))
2955
2956endef
2957
2958else # !SYSTEM_LIBTOMMATH
2959define gb_LinkTarget__use_libtommath
2960$(call gb_LinkTarget_set_include,$(1),\
2961 -I${WORKDIR}/UnpackedTarball/libtommath \
2962 $$(INCLUDE) \
2963)
2964$(call gb_LinkTarget_add_libs,$(1),\
2965 $(call gb_UnpackedTarball_get_dir,libtommath)/libtommath$(gb_StaticLibrary_PLAINEXT) \
2966)
2967$(call gb_LinkTarget_use_external_project,$(1),libtommath)
2968
2969endef
2970
2971endif # SYSTEM_LIBTOMMATH
2972
2973define gb_ExternalProject__use_libtommath
2974$(call gb_ExternalProject_use_external_project,$(1),libtommath)
2975
2976endef
Michael Stahle0ee0d42012-07-16 19:00:07 +02002977
Javier Fernandezf53228c2013-05-10 18:21:30 +00002978ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2979
Michael Stahl23647592014-02-11 19:04:20 +01002980ifneq ($(SYSTEM_FIREBIRD),)
Javier Fernandezf53228c2013-05-10 18:21:30 +00002981
Rene Engelhard0b68d702013-07-16 21:50:14 +02002982define gb_LinkTarget__use_libfbembed
Javier Fernandezf53228c2013-05-10 18:21:30 +00002983$(call gb_LinkTarget_set_include,$(1),\
2984 $(FIREBIRD_CFLAGS) \
2985 $$(INCLUDE) \
2986)
2987$(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
2988
2989endef
2990
Javier Fernandezf53228c2013-05-10 18:21:30 +00002991else # !SYSTEM_FIREBIRD
2992
Michael Stahl2c78d492017-01-09 14:45:11 +01002993$(eval $(call gb_Helper_register_packages_for_install,firebirdsdbc,\
2994 firebird \
2995))
2996
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +01002997#$(call gb_LinkTarget__use_libatomic_ops,$(1))
Wastack45f42682016-07-28 17:16:19 +02002998#$(call gb_LinkTarget__use_libtommath,$(1))
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +01002999
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +01003000define gb_LinkTarget__use_libfbembed
3001$(call gb_LinkTarget_use_package,$(1),firebird)
Javier Fernandezf53228c2013-05-10 18:21:30 +00003002$(call gb_LinkTarget_set_include,$(1),\
Stephan Bergmann416c5522016-10-17 08:39:09 +02003003 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/include \
Javier Fernandezf53228c2013-05-10 18:21:30 +00003004 $$(INCLUDE) \
3005)
Michael Stahl37563db2013-10-22 22:22:49 +02003006ifeq ($(COM),MSC)
3007$(call gb_LinkTarget_add_libs,$(1),\
Stephan Bergmann416c5522016-10-17 08:39:09 +02003008 $(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/bin/ifbclient.lib \
Javier Fernandezf53228c2013-05-10 18:21:30 +00003009)
Michael Stahl37563db2013-10-22 22:22:49 +02003010else
3011$(call gb_LinkTarget_add_libs,$(1),\
Stephan Bergmann416c5522016-10-17 08:39:09 +02003012 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib -lfbclient \
Michael Stahl37563db2013-10-22 22:22:49 +02003013)
3014endif
Javier Fernandezf53228c2013-05-10 18:21:30 +00003015
3016endef
3017
Javier Fernandezf53228c2013-05-10 18:21:30 +00003018
3019# endef
3020
3021endif # SYSTEM_FIREBIRD
3022
3023else # !ENABLE_FIREBIRD_SDBC
Michael Stahl6fa0b372014-02-12 17:01:35 +01003024
Javier Fernandezf53228c2013-05-10 18:21:30 +00003025gb_LinkTarget__use_firebird :=
3026# gb_LinkTarget__use_atomic_ops :=
Wastack45f42682016-07-28 17:16:19 +02003027# gb_LinkTarget__use_libtommath :=
Javier Fernandezf53228c2013-05-10 18:21:30 +00003028
3029endif # ENABLE_FIREBIRD_SDBC
3030
3031
Michael Stahl5866b332014-02-11 18:56:33 +01003032ifneq ($(SYSTEM_POSTGRESQL),)
David Tardon8bc7afb2012-04-05 10:53:08 +02003033
3034define gb_LinkTarget__use_postgresql
3035
David Tardon8bc7afb2012-04-05 10:53:08 +02003036$(call gb_LinkTarget_set_include,$(1),\
3037 $(POSTGRESQL_INC) \
3038 $$(INCLUDE) \
3039)
3040
3041$(call gb_LinkTarget_add_libs,$(1),\
3042 -lpq \
3043)
3044
3045$(call gb_LinkTarget_add_ldflags,$(1),\
3046 $(POSTGRESQL_LIB) \
3047)
3048
3049endef
3050
3051else # !SYSTEM_POSTGRESQL
3052
Michael Stahl2cca78f82021-01-21 14:26:01 +01003053ifeq ($(OS),WNT)
3054$(eval $(call gb_Helper_register_packages_for_install,postgresqlsdbc,\
3055 postgresql \
3056))
3057endif # WNT
3058
David Tardon8bc7afb2012-04-05 10:53:08 +02003059define gb_LinkTarget__use_postgresql
3060
Michael Stahlae6cc832021-01-19 15:38:05 +01003061$(call gb_LinkTarget_use_external_project,$(1),postgresql,full)
David Tardoncb9823b2012-10-22 06:33:00 +02003062
David Tardon8bc7afb2012-04-05 10:53:08 +02003063$(call gb_LinkTarget_set_include,$(1),\
Michael Stahlee8323e2013-05-08 00:19:40 +02003064 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
3065 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
David Tardon8bc7afb2012-04-05 10:53:08 +02003066 $$(INCLUDE) \
3067)
3068
Michael Stahlae6cc832021-01-19 15:38:05 +01003069ifeq ($(OS),WNT)
3070
Michael Stahlae6cc832021-01-19 15:38:05 +01003071$(call gb_LinkTarget_add_libs,$(1),\
3072 $(call gb_UnpackedTarball_get_dir,postgresql)/$(gb_MSBUILD_CONFIG)/libpq/libpq.lib \
3073)
3074
3075else # WNT
3076
Michael Stahl2f6261f2013-09-19 19:28:36 +02003077$(call gb_LinkTarget_add_libs,$(1),\
3078 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
Michael Stahlae6cc832021-01-19 15:38:05 +01003079 $(call gb_UnpackedTarball_get_dir,postgresql)/src/common/libpgcommon$(gb_StaticLibrary_PLAINEXT) \
3080 $(call gb_UnpackedTarball_get_dir,postgresql)/src/port/libpgport$(gb_StaticLibrary_PLAINEXT) \
David Tardon8bc7afb2012-04-05 10:53:08 +02003081)
3082
Michael Stahlae6cc832021-01-19 15:38:05 +01003083endif # WNT
David Tardon8bc7afb2012-04-05 10:53:08 +02003084
3085endef
3086
David Tardon8bc7afb2012-04-05 10:53:08 +02003087endif # SYSTEM_POSTGRESQL
3088
Jan-Marek Glogowskid3c6ac62019-07-09 15:28:29 +00003089ifeq ($(ENABLE_KF5),TRUE)
Milian Wolff4d78cf92018-01-10 16:26:10 +01003090
Jan-Marek Glogowskid3c6ac62019-07-09 15:28:29 +00003091define gb_LinkTarget__use_kf5
Milian Wolff4d78cf92018-01-10 16:26:10 +01003092$(call gb_LinkTarget_set_include,$(1),\
3093 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS)))) \
3094 $$(INCLUDE) \
3095)
3096
Michael Weghorn4aa60492019-06-08 13:45:36 +02003097$(call gb_LinkTarget_add_cxxflags,$(1),\
Milian Wolff4d78cf92018-01-10 16:26:10 +01003098 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS))) \
3099)
3100
3101$(call gb_LinkTarget_add_libs,$(1),\
3102 $(KF5_LIBS) \
3103)
3104
Milian Wolff4d78cf92018-01-10 16:26:10 +01003105endef
3106
Jan-Marek Glogowskid3c6ac62019-07-09 15:28:29 +00003107else # !ENABLE_KF5
Milian Wolff4d78cf92018-01-10 16:26:10 +01003108
Jan-Marek Glogowskid3c6ac62019-07-09 15:28:29 +00003109define gb_LinkTarget__use_kf5
Milian Wolff4d78cf92018-01-10 16:26:10 +01003110
3111endef
3112
Jan-Marek Glogowskid3c6ac62019-07-09 15:28:29 +00003113endif # ENABLE_KF5
Milian Wolff4d78cf92018-01-10 16:26:10 +01003114
3115
3116
Jan-Marek Glogowski2ffb83d2017-10-30 18:45:46 +01003117ifeq ($(ENABLE_QT5),TRUE)
Jan-Marek Glogowski93359452017-10-21 13:50:30 +00003118
Jan-Marek Glogowski2ffb83d2017-10-30 18:45:46 +01003119define gb_LinkTarget__use_qt5
Jan-Marek Glogowski93359452017-10-21 13:50:30 +00003120$(call gb_LinkTarget_set_include,$(1),\
Jan-Marek Glogowski2ffb83d2017-10-30 18:45:46 +01003121 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS)))) \
3122 $$(INCLUDE) \
Jan-Marek Glogowski93359452017-10-21 13:50:30 +00003123)
3124
3125$(call gb_LinkTarget_add_defs,$(1),\
Jan-Marek Glogowski2ffb83d2017-10-30 18:45:46 +01003126 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS))) \
Jan-Marek Glogowski93359452017-10-21 13:50:30 +00003127)
3128
3129$(call gb_LinkTarget_add_libs,$(1),\
Jan-Marek Glogowski2ffb83d2017-10-30 18:45:46 +01003130 $(QT5_LIBS) \
Jan-Marek Glogowski93359452017-10-21 13:50:30 +00003131)
3132
Jan-Marek Glogowski93359452017-10-21 13:50:30 +00003133endef
3134
Jan-Marek Glogowski2ffb83d2017-10-30 18:45:46 +01003135else # !ENABLE_QT5
Jan-Marek Glogowski93359452017-10-21 13:50:30 +00003136
Jan-Marek Glogowski2ffb83d2017-10-30 18:45:46 +01003137define gb_LinkTarget__use_qt5
Jan-Marek Glogowski93359452017-10-21 13:50:30 +00003138
3139endef
3140
Jan-Marek Glogowski2ffb83d2017-10-30 18:45:46 +01003141endif # ENABLE_QT5
David Tardond4efa8b2012-04-28 20:48:14 +02003142
David Ostrovskye16ac692012-05-27 22:50:41 +02003143# PYTHON
Michael Stahl91926332012-11-27 15:50:53 +01003144# extra python_headers external because pyuno wrapper must not link python
Michael Stahl0443d0a2014-02-11 16:57:35 +01003145ifneq ($(SYSTEM_PYTHON),)
David Ostrovskye16ac692012-05-27 22:50:41 +02003146
Michael Stahl91926332012-11-27 15:50:53 +01003147define gb_LinkTarget__use_python_headers
David Ostrovskye16ac692012-05-27 22:50:41 +02003148$(call gb_LinkTarget_add_defs,$(1),\
Andrea Gelmini2a81eee2018-12-06 23:10:27 +01003149 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
David Ostrovskye16ac692012-05-27 22:50:41 +02003150)
3151
3152$(call gb_LinkTarget_set_include,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02003153 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
David Ostrovskye16ac692012-05-27 22:50:41 +02003154 $$(INCLUDE) \
3155)
3156
Michael Stahl91926332012-11-27 15:50:53 +01003157endef
3158
3159define gb_LinkTarget__use_python
3160$(call gb_LinkTarget__use_python_headers,$(1))
3161
David Ostrovskye16ac692012-05-27 22:50:41 +02003162$(call gb_LinkTarget_add_libs,$(1),\
3163 $(PYTHON_LIBS) \
3164)
3165
3166endef
3167
3168else # !SYSTEM_PYTHON
3169
Michael Stahl720ca8e2014-03-18 18:24:15 +01003170$(eval $(call gb_Helper_register_packages_for_install,python,\
3171 python3 \
Jan-Marek Glogowski9c7a9062021-02-07 15:15:58 +01003172 $(if $(filter WNT,$(OS)),libffi) \
Michael Stahl720ca8e2014-03-18 18:24:15 +01003173))
3174
Michael Stahl91926332012-11-27 15:50:53 +01003175define gb_LinkTarget__use_python_headers
David Tardoncad68c62015-09-29 18:09:16 +02003176$(call gb_LinkTarget_use_external_project,$(1),python3,full)
Michael Stahl91926332012-11-27 15:50:53 +01003177$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02003178 -I$(call gb_UnpackedTarball_get_dir,python3) \
3179 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3180 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
Michael Stahl91926332012-11-27 15:50:53 +01003181 $$(INCLUDE) \
3182)
3183
3184endef
3185
David Ostrovskye16ac692012-05-27 22:50:41 +02003186define gb_LinkTarget__use_python
Michael Stahl91926332012-11-27 15:50:53 +01003187$(call gb_LinkTarget__use_python_headers,$(1))
Michael Stahld9162d22015-07-29 12:17:03 +02003188ifeq ($(OS),MACOSX)
3189$(call gb_LinkTarget_use_generated_package,$(1),python3)
3190else
Michael Stahl57dd4d02015-07-29 10:56:57 +02003191$(call gb_LinkTarget_use_package,$(1),python3)
Michael Stahld9162d22015-07-29 12:17:03 +02003192endif
David Ostrovskye16ac692012-05-27 22:50:41 +02003193
3194ifeq ($(OS),WNT)
Jan-Marek Glogowskibd066a12020-07-18 03:57:20 +02003195ifeq ($(CPUNAME),X86_64)
3196python_arch_subdir=amd64
3197else ifeq ($(CPUNAME),ARM64)
3198python_arch_subdir=arm64
3199else
3200python_arch_subdir=win32
3201endif
David Ostrovskye16ac692012-05-27 22:50:41 +02003202$(call gb_LinkTarget_add_libs,$(1),\
Jan-Marek Glogowskibd066a12020-07-18 03:57:20 +02003203 $(call gb_UnpackedTarball_get_dir,python3)/PCbuild/$(python_arch_subdir)/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).lib \
David Ostrovskye16ac692012-05-27 22:50:41 +02003204)
3205else ifeq ($(OS),MACOSX)
3206$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahl9d921ba2012-11-27 15:32:36 +01003207 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
David Ostrovskye16ac692012-05-27 22:50:41 +02003208)
3209else
Michael Stahlb6bcbb62013-04-21 14:34:50 +02003210$(call gb_LinkTarget_add_libs,$(1),\
3211 -L$(call gb_UnpackedTarball_get_dir,python3) \
Jan-Marek Glogowskib4dfba92020-07-14 23:35:57 +02003212 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \
David Ostrovskye16ac692012-05-27 22:50:41 +02003213)
3214endif
3215
David Ostrovskye16ac692012-05-27 22:50:41 +02003216endef
3217
Michael Stahl79084662020-01-09 15:06:07 +01003218# this is only used by python currently
3219define gb_ExternalProject__use_libffi
3220$(call gb_ExternalProject_use_external_project,$(1),libffi)
3221
3222endef
3223
David Ostrovskye16ac692012-05-27 22:50:41 +02003224endif # SYSTEM_PYTHON
3225
Kohei Yoshida49b0b692012-09-04 15:05:35 -04003226# ORCUS
Michael Stahle3abec32014-02-11 15:57:18 +01003227ifneq ($(SYSTEM_LIBORCUS),)
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003228
3229define gb_LinkTarget__use_orcus
3230$(call gb_LinkTarget_set_include,$(1),\
3231 $$(INCLUDE) \
Matúš Kukana2d63fe2012-09-09 16:29:10 +02003232 $(ORCUS_CFLAGS) \
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003233)
Rene Engelhard26b80fc2013-04-13 19:29:33 +02003234$(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
Rene Engelhardfb360f52013-04-13 16:17:29 +02003235endef
3236
3237define gb_LinkTarget__use_orcus-parser
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003238
3239endef
3240
Kohei Yoshida31f589b2012-08-30 23:26:59 -04003241else # !SYSTEM_LIBORCUS
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003242
David Tardonedb38d72015-06-04 16:09:48 +02003243ifeq ($(COM),MSC)
3244
3245$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3246 orcus \
3247 orcus-parser \
3248))
3249
Kohei Yoshidac8b7e982012-08-31 10:11:32 -04003250define gb_LinkTarget__use_orcus
Matúš Kukan1ee76032012-09-09 15:29:43 +02003251$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl10fc13c2013-05-06 23:35:13 +02003252 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
Matúš Kukan1ee76032012-09-09 15:29:43 +02003253 $$(INCLUDE) \
3254)
David Tardonf1035c12012-11-23 06:49:21 +01003255
David Tardonedb38d72015-06-04 16:09:48 +02003256$(call gb_LinkTarget_use_libraries,$(1),\
3257 orcus \
Stephan Bergmann3743cdb2013-02-17 22:58:21 +01003258)
David Tardonf1035c12012-11-23 06:49:21 +01003259
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003260endef
3261
Kohei Yoshida4d9c2fb2013-04-11 23:11:21 -04003262define gb_LinkTarget__use_orcus-parser
Kohei Yoshidaecc884e2013-12-17 21:18:46 -05003263$(call gb_LinkTarget_set_include,$(1),\
3264 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3265 $$(INCLUDE) \
3266)
David Tardonedb38d72015-06-04 16:09:48 +02003267
3268$(call gb_LinkTarget_use_libraries,$(1),\
3269 orcus-parser \
Kohei Yoshida4d9c2fb2013-04-11 23:11:21 -04003270)
3271
3272endef
3273
David Tardonedb38d72015-06-04 16:09:48 +02003274else # !MSC
3275
3276$(eval $(call gb_Helper_register_packages_for_install,ooo,\
3277 liborcus \
3278))
3279
3280define gb_LinkTarget__use_orcus
3281$(call gb_LinkTarget_use_package,$(1),liborcus)
3282
3283$(call gb_LinkTarget_set_include,$(1),\
3284 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3285 $$(INCLUDE) \
3286)
3287
3288$(call gb_LinkTarget_add_libs,$(1),\
Kohei Yoshida109ed8f2020-09-09 21:23:48 -04003289 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.16 \
David Tardonedb38d72015-06-04 16:09:48 +02003290)
3291
3292$(if $(SYSTEM_BOOST), \
3293 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3294 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3295)
3296
3297endef
3298
3299define gb_LinkTarget__use_orcus-parser
3300$(call gb_LinkTarget_use_package,$(1),liborcus)
3301
3302$(call gb_LinkTarget_set_include,$(1),\
3303 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3304 $$(INCLUDE) \
3305)
3306
3307$(call gb_LinkTarget_add_libs,$(1),\
Kohei Yoshida109ed8f2020-09-09 21:23:48 -04003308 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.16 \
David Tardonedb38d72015-06-04 16:09:48 +02003309)
3310
3311endef
3312
3313endif # MSC
3314
Kohei Yoshida31f589b2012-08-30 23:26:59 -04003315endif # SYSTEM_LIBORCUS
David Ostrovskye16ac692012-05-27 22:50:41 +02003316
David Tardon49a4d362013-11-12 16:44:40 +01003317ifeq ($(ENABLE_EOT),TRUE)
3318
Michael Stahle3abec32014-02-11 15:57:18 +01003319ifneq ($(SYSTEM_LIBEOT),)
David Tardon49a4d362013-11-12 16:44:40 +01003320
3321define gb_LinkTarget__use_libeot
3322$(call gb_LinkTarget_set_include,$(1),\
3323 $$(INCLUDE) \
3324 $(LIBEOT_CFLAGS) \
3325)
3326$(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3327
3328endef
3329
3330gb_ExternalProject__use_libeot :=
3331
3332else # !SYSTEM_LIBEOT
3333
3334define gb_LinkTarget__use_libeot
3335$(call gb_LinkTarget_set_include,$(1),\
3336 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3337 $$(INCLUDE) \
3338)
3339$(call gb_LinkTarget_add_libs,$(1),\
3340 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3341)
3342$(call gb_LinkTarget_use_external_project,$(1),libeot)
3343
3344endef
3345
3346define gb_ExternalProject__use_libeot
3347$(call gb_ExternalProject_use_external_project,$(1),libeot)
3348
3349endef
3350
3351endif # SYSTEM_LIBEOT
3352
3353else # !ENABLE_EOT
3354
3355gb_LinkTarget__use_libeot :=
3356gb_ExternalProject__use_libeot :=
3357
3358endif # ENABLE_EOT
3359
Michael Stahl78b59b82012-09-27 21:45:47 +02003360### X11 stuff ###
3361
Samuel Mehrbrodtc29ea222015-09-18 14:12:08 +02003362ifeq ($(USING_X11), TRUE)
Michael Stahl78b59b82012-09-27 21:45:47 +02003363
Michael Stahl78b59b82012-09-27 21:45:47 +02003364define gb_LinkTarget__use_Xrandr
Michael Stahl78b59b82012-09-27 21:45:47 +02003365$(call gb_LinkTarget_set_include,$(1),\
3366 $$(INCLUDE) \
3367 $(XRANDR_CFLAGS) \
3368)
3369
3370$(call gb_LinkTarget_add_libs,$(1),\
3371 $(XRANDR_LIBS) \
3372)
3373endef
3374
Michael Stahl78b59b82012-09-27 21:45:47 +02003375define gb_LinkTarget__use_Xrender
Michael Stahl78b59b82012-09-27 21:45:47 +02003376$(call gb_LinkTarget_set_include,$(1),\
3377 $$(INCLUDE) \
3378 $(XRENDER_CFLAGS) \
3379)
3380
3381$(call gb_LinkTarget_add_libs,$(1),\
3382 $(XRENDER_LIBS) \
3383)
3384endef
3385
Samuel Mehrbrodtc29ea222015-09-18 14:12:08 +02003386endif # USING_X11
Michael Stahl78b59b82012-09-27 21:45:47 +02003387
Tor Lillqvist35491072011-08-02 21:22:35 +03003388
Michael Meeksb440cfc2013-02-28 12:05:07 +00003389gb_ExternalProject__use_nss3:=
3390
Tor Lillqvist9dc7f052012-08-13 09:19:35 +03003391
Michael Stahle3abec32014-02-11 15:57:18 +01003392ifneq ($(SYSTEM_NSS),)
David Tardonb6aa4842011-08-11 13:10:14 +02003393
David Tardon2b9dbc82012-08-13 06:57:51 +02003394define gb_LinkTarget__use_nss3
3395$(call gb_LinkTarget_add_defs,$(1),\
Stephan Bergmannea641222012-11-19 16:40:33 +01003396 -DSYSTEM_NSS \
David Tardon2b9dbc82012-08-13 06:57:51 +02003397)
3398
David Tardonb6aa4842011-08-11 13:10:14 +02003399$(call gb_LinkTarget_set_include,$(1),\
3400 $$(INCLUDE) \
Tomas Chvatal75f77e62011-11-02 21:16:53 +01003401 $(NSS_CFLAGS) \
David Tardonb6aa4842011-08-11 13:10:14 +02003402)
3403
3404$(call gb_LinkTarget_add_libs,$(1),\
Tomas Chvatal75f77e62011-11-02 21:16:53 +01003405 $(NSS_LIBS) \
David Tardonb6aa4842011-08-11 13:10:14 +02003406)
Caolán McNamara24ae3ab2011-08-11 12:47:00 +01003407
David Tardonb6aa4842011-08-11 13:10:14 +02003408endef
3409
Michael Stahl8a59b882021-10-19 16:00:53 +02003410define gb_LinkTarget__use_nssutil3
3411$(call gb_LinkTarget__use_nss3,$(1))
3412
3413endef
3414
David Tardon2b9dbc82012-08-13 06:57:51 +02003415define gb_LinkTarget__use_plc4
3416$(call gb_LinkTarget__use_nss3,$(1))
3417
3418endef
3419
David Tardon6ef46562013-02-04 10:04:07 +01003420define gb_LinkTarget__use_ssl3
3421$(call gb_LinkTarget__use_nss3,$(1))
3422
3423endef
3424
Michael Stahle3abec32014-02-11 15:57:18 +01003425else # !SYSTEM_NSS
David Tardonb6aa4842011-08-11 13:10:14 +02003426
Michael Stahlffae67c2014-03-13 19:51:19 +01003427$(eval $(call gb_Helper_register_packages_for_install,ooo, \
3428 nss \
3429))
3430
David Tardon2b9dbc82012-08-13 06:57:51 +02003431define gb_LinkTarget__use_nss3
Peter Foleyc003d252013-01-01 09:39:36 -05003432$(call gb_LinkTarget_use_package,$(1),nss)
David Tardon2b9dbc82012-08-13 06:57:51 +02003433$(call gb_LinkTarget_set_include,$(1),\
3434 $$(INCLUDE) \
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003435 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3436 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
David Tardon2b9dbc82012-08-13 06:57:51 +02003437)
3438
Michael Stahld2f62c32013-10-23 00:14:01 +02003439ifeq ($(COM),MSC)
3440$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003441 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3442 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3443 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
David Tardon2b9dbc82012-08-13 06:57:51 +02003444)
Michael Stahld2f62c32013-10-23 00:14:01 +02003445else
3446$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003447 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
Michael Stahld2f62c32013-10-23 00:14:01 +02003448 -lnspr4 \
3449 -lnss3 \
3450 -lsmime3 \
3451)
3452endif
David Tardon2b9dbc82012-08-13 06:57:51 +02003453
3454endef
3455
Caolán McNamara24ae3ab2011-08-11 12:47:00 +01003456define gb_LinkTarget__use_plc4
Peter Foleyc003d252013-01-01 09:39:36 -05003457$(call gb_LinkTarget_use_package,$(1),nss)
Michael Stahld2f62c32013-10-23 00:14:01 +02003458ifeq ($(COM),MSC)
3459$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003460 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
David Tardonb6aa4842011-08-11 13:10:14 +02003461)
Michael Stahld2f62c32013-10-23 00:14:01 +02003462else
3463$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003464 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
Michael Stahld2f62c32013-10-23 00:14:01 +02003465)
3466endif
Caolán McNamara24ae3ab2011-08-11 12:47:00 +01003467
David Tardonb6aa4842011-08-11 13:10:14 +02003468endef
3469
David Tardon6ef46562013-02-04 10:04:07 +01003470define gb_LinkTarget__use_ssl3
3471$(call gb_LinkTarget_use_package,$(1),nss)
Michael Stahld2f62c32013-10-23 00:14:01 +02003472ifeq ($(COM),MSC)
3473$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003474 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
David Tardon6ef46562013-02-04 10:04:07 +01003475)
Michael Stahld2f62c32013-10-23 00:14:01 +02003476else
3477$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003478 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
Michael Stahld2f62c32013-10-23 00:14:01 +02003479)
3480endif
David Tardon6ef46562013-02-04 10:04:07 +01003481
3482endef
3483
Michael Stahl8a59b882021-10-19 16:00:53 +02003484define gb_LinkTarget__use_nssutil3
3485$(call gb_LinkTarget_use_package,$(1),nss)
3486$(call gb_LinkTarget_set_include,$(1),\
3487 $$(INCLUDE) \
3488 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3489 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3490)
3491
3492ifeq ($(COM),MSC)
3493$(call gb_LinkTarget_add_libs,$(1),\
3494 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nssutil3.lib \
3495)
3496else
3497$(call gb_LinkTarget_add_libs,$(1),\
3498 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3499 -lnssutil3 \
3500)
3501endif
3502
3503endef
3504
Michael Meeksb440cfc2013-02-28 12:05:07 +00003505define gb_ExternalProject__use_nss3
3506$(call gb_ExternalProject_use_package,$(1),nss)
Michael Meeksb440cfc2013-02-28 12:05:07 +00003507
3508endef
3509
Michael Stahle3abec32014-02-11 15:57:18 +01003510endif # SYSTEM_NSS
3511
Markus Mohrharda46ef632015-11-15 04:39:24 +01003512ifeq ($(ENABLE_BREAKPAD),TRUE)
3513
Markus Mohrharda46ef632015-11-15 04:39:24 +01003514define gb_LinkTarget__use_breakpad
3515$(call gb_LinkTarget_set_include,$(1),\
3516 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3517 $$(INCLUDE) \
3518)
3519
3520ifeq ($(COM),MSC)
Markus Mohrhardff9b7d12016-03-31 00:00:03 +02003521$(call gb_LinkTarget_use_static_libraries,$(1),\
3522 breakpad \
Markus Mohrharda46ef632015-11-15 04:39:24 +01003523)
3524else
3525$(call gb_LinkTarget_add_libs,$(1),\
3526 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3527)
3528endif
3529
3530$(call gb_LinkTarget_use_external_project,$(1),breakpad)
3531
Michael Stahlb4d3a0d2016-02-23 15:08:47 +01003532endef
3533
Markus Mohrhard133a5d872016-02-27 14:50:13 +01003534endif # ENABLE_BREAKPAD
Markus Mohrharda46ef632015-11-15 04:39:24 +01003535
David Tardon7c77ff52017-11-24 10:44:42 +01003536ifeq ($(ENABLE_GPGMEPP),TRUE)
3537
Katarina Behrensaceba1e2017-02-10 16:30:51 +01003538ifneq ($(SYSTEM_GPGMEPP),)
Katarina Behrens595848c2017-01-30 15:50:55 +01003539
Katarina Behrensf41fa222017-02-23 12:57:42 +01003540gb_ExternalProject__use_gpgmepp:=
Thorsten Behrensdc003d592017-02-17 09:32:05 +01003541gb_ExternalProject__use_libassuan:=
3542gb_ExternalProject__use_libgpg-error:=
3543
Katarina Behrensf41fa222017-02-23 12:57:42 +01003544define gb_LinkTarget__use_gpgmepp
Katarina Behrens595848c2017-01-30 15:50:55 +01003545$(call gb_LinkTarget_set_include,$(1),\
3546 $$(INCLUDE) \
Katarina Behrensaceba1e2017-02-10 16:30:51 +01003547 $$(GPGMEPP_CFLAGS) \
Katarina Behrens595848c2017-01-30 15:50:55 +01003548)
3549
3550$(call gb_LinkTarget_add_libs,$(1),\
Katarina Behrensaceba1e2017-02-10 16:30:51 +01003551 $(GPGMEPP_LIBS) \
Katarina Behrens595848c2017-01-30 15:50:55 +01003552)
3553
3554endef
3555
Thorsten Behrensa27f2622017-11-23 18:06:59 +01003556else ifneq ($(filter GPGMEPP,$(BUILD_TYPE)),) # NON-SYSTEM_GPGME
Katarina Behrens55519a12017-02-15 16:00:16 +01003557
Katarina Behrensf41fa222017-02-23 12:57:42 +01003558define gb_ExternalProject__use_gpgmepp
Thorsten Behrens50a55d82017-11-15 21:31:07 +01003559$(call gb_ExternalProject_use_external_project,$(1),gpgmepp)
Thorsten Behrensdc003d592017-02-17 09:32:05 +01003560
3561endef
3562define gb_ExternalProject__use_libassuan
3563$(call gb_ExternalProject_use_external_project,$(1),libassuan)
3564
3565endef
3566define gb_ExternalProject__use_libgpg-error
3567$(call gb_ExternalProject_use_external_project,$(1),libgpg-error)
3568
3569endef
3570
Thorsten Behrens50a55d82017-11-15 21:31:07 +01003571ifneq ($(filter WNT,$(OS)),)
3572
3573define gb_LinkTarget__use_libgpg-error
3574$(call gb_LinkTarget_use_package,$(1),libgpg-error)
3575
3576$(call gb_LinkTarget_set_include,$(1),\
3577 $(GPG_ERROR_CFLAGS) \
3578 $$(INCLUDE) \
3579)
3580$(call gb_LinkTarget_add_libs,$(1),\
3581 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libgpg-error)/src/.libs libgpg-error.lib \
3582)
3583
3584endef
3585
3586define gb_LinkTarget__use_libassuan
3587$(call gb_LinkTarget_use_package,$(1),libassuan)
3588
3589$(call gb_LinkTarget_set_include,$(1),\
3590 $(LIBASSUAN_CFLAGS) \
3591 $$(INCLUDE) \
3592)
3593$(call gb_LinkTarget_add_libs,$(1),\
3594 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libassuan)/src/.libs libassuan.lib \
3595)
3596
3597endef
3598
Katarina Behrensf41fa222017-02-23 12:57:42 +01003599define gb_LinkTarget__use_gpgmepp
Katarina Behrens55519a12017-02-15 16:00:16 +01003600$(call gb_LinkTarget_set_include,$(1),\
Thorsten Behrens50a55d82017-11-15 21:31:07 +01003601 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3602 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3603 $$(GPG_ERROR_CFLAGS) \
3604 $$(INCLUDE) \
3605)
3606$(call gb_LinkTarget_use_libraries,$(1),\
3607 gpgmepp \
3608)
3609
3610endef
3611
3612$(eval $(call gb_Helper_register_packages_for_install,ooo,\
Michael Stahl2a589022020-08-05 11:59:03 +02003613 gpgmepp \
Thorsten Behrens50a55d82017-11-15 21:31:07 +01003614 libassuan \
3615 libgpg-error \
3616))
3617
3618$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3619 gpgmepp \
3620))
3621
3622endif
3623
3624ifneq ($(filter MACOSX LINUX,$(OS)),)
3625
3626define gb_LinkTarget__use_gpgmepp
3627$(call gb_LinkTarget_use_package,$(1),gpgmepp)
3628
3629$(call gb_LinkTarget_set_include,$(1),\
3630 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3631 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
Samuel Mehrbrodt65866962017-02-24 16:54:36 +01003632 $$(GPG_ERROR_CFLAGS) \
Katarina Behrens55519a12017-02-15 16:00:16 +01003633 $$(INCLUDE) \
3634)
3635$(call gb_LinkTarget_add_libs,$(1),\
Thorsten Behrens50a55d82017-11-15 21:31:07 +01003636 -L$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src/.libs/ -lgpgmepp \
Caolán McNamaraa58c4442017-12-08 09:48:09 +00003637 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L$(call gb_UnpackedTarball_get_dir,gpgmepp)/src/.libs/ -lgpgme) \
3638 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(GPG_ERROR_LIBS)) \
3639 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(LIBASSUAN_LIBS)) \
Katarina Behrens55519a12017-02-15 16:00:16 +01003640)
Katarina Behrens55519a12017-02-15 16:00:16 +01003641
3642endef
3643
Thorsten Behrenscc71c6a2017-03-25 01:28:07 +01003644$(eval $(call gb_Helper_register_packages_for_install,ooo,\
Thorsten Behrens50a55d82017-11-15 21:31:07 +01003645 gpgmepp \
Thorsten Behrenscc71c6a2017-03-25 01:28:07 +01003646 libassuan \
3647 libgpg-error \
3648))
3649
Katarina Behrens595848c2017-01-30 15:50:55 +01003650endif
3651
Thorsten Behrensa4034d52017-03-26 05:57:10 +02003652endif
3653
David Tardon7c77ff52017-11-24 10:44:42 +01003654else # !ENABLE_GPGMEPP
3655
3656gb_ExternalProject__use_gpgmepp :=
3657gb_ExternalProject__use_libassuan :=
3658gb_ExternalProject__use_libgpg-error :=
3659
3660gb_LinkTarget__use_gpgmepp :=
3661gb_LinkTarget__use_libassuan :=
3662gb_LinkTarget__use_libgpg-error :=
3663
3664endif # ENABLE_GPGMEPP
3665
Stephan Bergmannecc617e2015-07-08 11:20:19 +02003666define gb_LinkTarget__use_dconf
Michael Weghorn2d4bb242019-09-30 15:08:30 +00003667$(call gb_LinkTarget_set_include,$(1),\
3668 $$(INCLUDE) \
3669 $(DCONF_CFLAGS) \
3670)
3671
Stephan Bergmannecc617e2015-07-08 11:20:19 +02003672$(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3673endef
3674
Michael Stahl2ee5f242011-09-15 14:01:27 +02003675### Jars ############################################################
3676
Sophia Schröderf4fc28a2018-04-11 15:39:57 +01003677ifneq ($(SYSTEM_HSQLDB),)
3678
3679define gb_Jar__use_hsqldb
3680$(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3681endef
3682define gb_JunitTest__use_hsqldb
3683$(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3684endef
3685
3686else # !SYSTEM_HSQLDB
3687
3688ifeq ($(ENABLE_JAVA),TRUE)
3689$(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3690 hsqldb \
3691))
3692endif
3693
3694define gb_Jar__use_hsqldb
3695$(call gb_Jar_use_jar,$(1),hsqldb)
3696endef
3697define gb_JunitTest__use_hsqldb
3698$(call gb_JunitTest_use_jar,$(1),hsqldb)
3699endef
3700
3701endif # SYSTEM_HSQLDB
3702
3703
Rene Engelhard40facc42014-05-23 07:43:19 +02003704ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3705
Michael Stahl7d2f7c62014-02-11 19:39:18 +01003706ifneq ($(SYSTEM_BSH),)
David Tardon3bcf9102011-10-04 09:44:48 +02003707
Michael Stahla4551262012-08-15 17:41:25 +02003708define gb_Jar__use_bsh
3709$(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
David Tardon3bcf9102011-10-04 09:44:48 +02003710endef
3711
3712else # !SYSTEM_BSH
3713
David Tardon2dec0672014-05-19 10:20:37 +02003714ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl8475eb92014-03-18 20:38:30 +01003715$(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003716 bsh \
3717))
David Tardon2dec0672014-05-19 10:20:37 +02003718endif
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003719
Michael Stahla4551262012-08-15 17:41:25 +02003720define gb_Jar__use_bsh
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003721$(call gb_Jar_use_jar,$(1),bsh)
David Tardon3bcf9102011-10-04 09:44:48 +02003722endef
3723
3724endif # SYSTEM_BSH
3725
Rene Engelhard40facc42014-05-23 07:43:19 +02003726endif
3727
3728ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
Michael Stahl2ee5f242011-09-15 14:01:27 +02003729
Michael Stahl49dde4c2014-02-11 19:42:28 +01003730ifneq ($(SYSTEM_RHINO),)
Tomas Chvatal32af02b2012-05-06 12:49:33 +02003731
Michael Stahla4551262012-08-15 17:41:25 +02003732define gb_Jar__use_rhino
3733$(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
Tomas Chvatal32af02b2012-05-06 12:49:33 +02003734endef
3735
3736else # !SYSTEM_RHINO
3737
David Tardon2dec0672014-05-19 10:20:37 +02003738ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl6474d1c2014-03-18 20:50:02 +01003739$(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003740 js \
3741))
David Tardon2dec0672014-05-19 10:20:37 +02003742endif
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003743
Michael Stahla4551262012-08-15 17:41:25 +02003744define gb_Jar__use_rhino
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003745$(call gb_Jar_use_jar,$(1),js)
Tomas Chvatal32af02b2012-05-06 12:49:33 +02003746endef
3747
3748endif # SYSTEM_RHINO
3749
Rene Engelhard40facc42014-05-23 07:43:19 +02003750endif
3751
Michael Stahl7d2f7c62014-02-11 19:39:18 +01003752ifneq ($(SYSTEM_APACHE_COMMONS),)
David Tardon9b530e12012-04-07 10:07:35 +02003753
Michael Stahla4551262012-08-15 17:41:25 +02003754define gb_Jar__use_commons-logging
3755$(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003756endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02003757gb_ExternalProject__use_commons-logging :=
David Tardon9b530e12012-04-07 10:07:35 +02003758
3759else # !SYSTEM_APACHE_COMMONS
3760
David Tardon2dec0672014-05-19 10:20:37 +02003761ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl2bec9f42014-03-18 21:54:33 +01003762$(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
rbujd8a7f722014-08-18 13:52:32 +02003763 commons-logging-$(COMMONS_LOGGING_VERSION) \
Michael Stahldb23d4b2013-10-24 23:10:27 +02003764))
David Tardon2dec0672014-05-19 10:20:37 +02003765endif
David Tardon9b530e12012-04-07 10:07:35 +02003766
Michael Stahla4551262012-08-15 17:41:25 +02003767define gb_Jar__use_commons-logging
Michael Stahl461d8302013-10-25 18:40:48 +02003768$(call gb_Jar_use_external_project,$(1),apache_commons_logging)
rbujd8a7f722014-08-18 13:52:32 +02003769$(call gb_Jar_use_jar,$(1),commons-logging-$(COMMONS_LOGGING_VERSION))
David Tardon9b530e12012-04-07 10:07:35 +02003770endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02003771define gb_ExternalProject__use_commons-logging
Michael Stahla60427e2013-10-26 20:17:52 +02003772$(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
Michael Stahl2b7536a2012-10-05 21:17:25 +02003773endef
David Tardon9b530e12012-04-07 10:07:35 +02003774
3775endif # SYSTEM_APACHE_COMMONS
3776
3777
Michael Stahl32db4992014-02-11 19:35:22 +01003778ifneq ($(SYSTEM_JFREEREPORT),)
David Tardon9b530e12012-04-07 10:07:35 +02003779
Michael Stahla4551262012-08-15 17:41:25 +02003780define gb_Jar__use_flow-engine
3781$(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003782endef
3783
Michael Stahla4551262012-08-15 17:41:25 +02003784define gb_Jar__use_flute
3785$(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003786endef
3787
Michael Stahla4551262012-08-15 17:41:25 +02003788define gb_Jar__use_libbase
3789$(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003790endef
3791
Michael Stahla4551262012-08-15 17:41:25 +02003792define gb_Jar__use_libfonts
3793$(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003794endef
3795
Michael Stahla4551262012-08-15 17:41:25 +02003796define gb_Jar__use_libformula
3797$(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003798endef
3799
Michael Stahla4551262012-08-15 17:41:25 +02003800define gb_Jar__use_liblayout
3801$(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003802endef
3803
Michael Stahla4551262012-08-15 17:41:25 +02003804define gb_Jar__use_libloader
3805$(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003806endef
3807
Michael Stahla4551262012-08-15 17:41:25 +02003808define gb_Jar__use_librepository
3809$(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003810endef
3811
Michael Stahla4551262012-08-15 17:41:25 +02003812define gb_Jar__use_libserializer
3813$(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003814endef
3815
Michael Stahla4551262012-08-15 17:41:25 +02003816define gb_Jar__use_libxml
3817$(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003818endef
3819
Michael Stahla4551262012-08-15 17:41:25 +02003820define gb_Jar__use_sac
3821$(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003822endef
3823
3824else # !SYSTEM_JFREEREPORT
3825
David Tardon2dec0672014-05-19 10:20:37 +02003826ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl4c3626af2014-03-18 22:03:00 +01003827$(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
Michael Stahl070ca1e2013-10-25 21:01:58 +02003828 flow-engine \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003829 flute-1.1.6 \
3830 libbase-1.1.6 \
3831 libfonts-1.1.6 \
3832 libformula-1.1.7 \
Michael Stahl070ca1e2013-10-25 21:01:58 +02003833 liblayout \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003834 libloader-1.1.6 \
3835 librepository-1.1.6 \
3836 libserializer-1.1.6 \
3837 libxml-1.1.7 \
3838 sac \
3839))
David Tardon2dec0672014-05-19 10:20:37 +02003840endif
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003841
Michael Stahla4551262012-08-15 17:41:25 +02003842define gb_Jar__use_flow-engine
Michael Stahl070ca1e2013-10-25 21:01:58 +02003843$(call gb_Jar_use_jar,$(1),flow-engine)
David Tardon9b530e12012-04-07 10:07:35 +02003844endef
3845
Michael Stahla4551262012-08-15 17:41:25 +02003846define gb_Jar__use_flute
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003847$(call gb_Jar_use_jar,$(1),flute-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003848endef
3849
Michael Stahla4551262012-08-15 17:41:25 +02003850define gb_Jar__use_libbase
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003851$(call gb_Jar_use_jar,$(1),libbase-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003852endef
3853
Michael Stahla4551262012-08-15 17:41:25 +02003854define gb_Jar__use_libfonts
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003855$(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003856endef
3857
Michael Stahla4551262012-08-15 17:41:25 +02003858define gb_Jar__use_libformula
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003859$(call gb_Jar_use_jar,$(1),libformula-1.1.7)
David Tardon9b530e12012-04-07 10:07:35 +02003860endef
3861
Michael Stahla4551262012-08-15 17:41:25 +02003862define gb_Jar__use_liblayout
Michael Stahl070ca1e2013-10-25 21:01:58 +02003863$(call gb_Jar_use_jar,$(1),liblayout)
David Tardon9b530e12012-04-07 10:07:35 +02003864endef
3865
Michael Stahla4551262012-08-15 17:41:25 +02003866define gb_Jar__use_libloader
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003867$(call gb_Jar_use_jar,$(1),libloader-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003868endef
3869
Michael Stahla4551262012-08-15 17:41:25 +02003870define gb_Jar__use_librepository
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003871$(call gb_Jar_use_jar,$(1),librepository-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003872endef
3873
Michael Stahla4551262012-08-15 17:41:25 +02003874define gb_Jar__use_libserializer
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003875$(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003876endef
3877
Michael Stahla4551262012-08-15 17:41:25 +02003878define gb_Jar__use_libxml
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003879$(call gb_Jar_use_jar,$(1),libxml-1.1.7)
David Tardon9b530e12012-04-07 10:07:35 +02003880endef
3881
Michael Stahla4551262012-08-15 17:41:25 +02003882define gb_Jar__use_sac
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003883$(call gb_Jar_use_jar,$(1),sac)
David Tardon9b530e12012-04-07 10:07:35 +02003884endef
3885
3886endif # SYSTEM_JFREEREPORT
3887
David Tardonc2eca352012-12-02 10:51:37 +01003888
3889# Executables
3890
David Tardonedf67302012-12-30 12:27:04 +01003891# FIXME: the library target should be for build too
3892define gb_Executable__register_bestreversemap
3893$(call gb_Executable_add_runtime_dependencies,bestreversemap,\
Caolán McNamara002a83f2016-12-15 10:15:59 +00003894 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
David Tardonedf67302012-12-30 12:27:04 +01003895)
3896endef
3897
David Tardonceb0d062012-12-30 13:11:43 +01003898# TODO depending on the whole URE might be overkill, but I do not have a
3899# Windows machine to debug it...
3900# FIXME: the library target should be for build too
3901define gb_Executable__register_climaker
3902$(call gb_Executable_add_runtime_dependencies,climaker,\
3903 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
Michael Stahl4e6b4fb2015-11-27 12:49:34 +01003904 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
Tor Lillqviste4c6fe52013-04-24 15:11:39 +03003905 $(call gb_UnoApi_get_target,udkapi) \
Michael Stahl4e6b4fb2015-11-27 12:49:34 +01003906 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
David Tardonceb0d062012-12-30 13:11:43 +01003907)
3908endef
3909
David Tardon6c1614a2014-01-08 13:49:46 +01003910define gb_Executable__register_cppumaker
3911$(call gb_Executable_add_runtime_dependencies,cppumaker,\
Caolán McNamara002a83f2016-12-15 10:15:59 +00003912 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
David Tardon6c1614a2014-01-08 13:49:46 +01003913)
3914endef
3915
Matúš Kukanbae52ee2013-05-16 09:17:57 +02003916# This is used to determine what we need for 'build' platform.
Michael Stahl4e6b4fb2015-11-27 12:49:34 +01003917# FIXME: the library target should be for build too
Matúš Kukan9555b5b2013-06-14 12:48:20 +02003918define gb_Executable__register_gengal
Matúš Kukan94b68822013-06-17 10:41:18 +02003919$(call gb_Executable_add_runtime_dependencies,gengal,\
David Tardon1546c292013-05-07 20:41:41 +02003920 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
Stephan Bergmann986a7622020-05-04 17:05:55 +02003921 $(if $(filter MACOSX,$(OS)),$(call gb_Library_get_target,vclplug_osx)) \
3922 $(if $(filter WNT,$(OS)),$(call gb_Library_get_target,vclplug_win)) \
Jan-Marek Glogowski63972e72020-07-17 22:14:39 +02003923 $(if $(filter host,$(gb_Side)),$(call gb_Package_get_target,postprocess_images)) \
Matúš Kukan8b162f22013-09-27 10:58:28 +02003924 $(call gb_Package_get_target_for_build,postprocess_registry) \
Matúš Kukan15614c82015-12-05 07:05:37 +01003925 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3926 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3927 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
Michael Stahl4e6b4fb2015-11-27 12:49:34 +01003928 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3929 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
David Tardon1546c292013-05-07 20:41:41 +02003930 $(call gb_UnoApi_get_target,offapi) \
3931 $(call gb_UnoApi_get_target,udkapi) \
3932)
3933endef
3934
Michael Stahl187194b2014-02-11 19:17:42 +01003935ifeq ($(SYSTEM_ICU),)
David Tardonedf67302012-12-30 12:27:04 +01003936
3937define gb_Executable__register_gendict
3938$(call gb_Executable_add_runtime_dependencies,gendict,\
3939 $(call gb_Package_get_target_for_build,icu) \
Stephan Bergmann475e4b42016-10-25 16:46:35 +02003940 $(call gb_Package_get_target_for_build,icu_ure) \
David Tardonedf67302012-12-30 12:27:04 +01003941)
3942endef
3943
3944endif
3945
David Tardonceb0d062012-12-30 13:11:43 +01003946define gb_Executable__register_idlc
3947$(call gb_Executable_add_runtime_dependencies,idlc,\
David Tardonce038cf2013-10-20 20:43:46 +02003948 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
David Tardonceb0d062012-12-30 13:11:43 +01003949)
3950endef
3951
David Tardonedf67302012-12-30 12:27:04 +01003952define gb_Executable__register_localize
3953$(call gb_Executable_add_runtime_dependencies,localize,\
Caolán McNamara00657ae2017-06-11 20:56:30 +01003954 $(foreach exec,cfgex helpex propex treex ulfex xrmex,\
David Tardonedf67302012-12-30 12:27:04 +01003955 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3956 ) \
3957)
3958endef
3959
Michael Stahl4c51feb2013-09-21 01:39:41 +02003960# FIXME ure/services.rdb needs cleanup
Stephan Bergmannab149c72013-04-24 10:42:40 +02003961# The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
David Tardonedf67302012-12-30 12:27:04 +01003962# due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3963# FIXME: the library target should be for build too
3964define gb_Executable__register_saxparser
3965$(call gb_Executable_add_runtime_dependencies,saxparser,\
3966 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
David Tardon92f66c52014-10-13 16:59:33 +02003967 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
Matúš Kukanb469cd22013-05-24 12:24:27 +02003968 $(call gb_Rdb_get_target_for_build,saxparser) \
Tor Lillqvistcb872392016-08-17 01:14:54 +03003969 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
Tor Lillqviste4c6fe52013-04-24 15:11:39 +03003970 $(call gb_UnoApi_get_target,udkapi) \
David Tardonedf67302012-12-30 12:27:04 +01003971)
3972endef
3973
Stephan Bergmannab149c72013-04-24 10:42:40 +02003974# NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
David Tardonedf67302012-12-30 12:27:04 +01003975# required due to the settings for URE_SERVICES and URE_TYPES in
3976# cppuhelper/source/unorc
3977# FIXME: the library target should be for build too
3978define gb_Executable__register_uno
3979$(call gb_Executable_add_runtime_dependencies,uno,\
3980 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
Michael Stahl4e6b4fb2015-11-27 12:49:34 +01003981 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
Tor Lillqviste4c6fe52013-04-24 15:11:39 +03003982 $(call gb_UnoApi_get_target,udkapi) \
David Tardonedf67302012-12-30 12:27:04 +01003983)
3984endef
3985
3986
3987# External executables
3988
Michael Stahl379f9782014-02-11 16:49:19 +01003989ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
David Tardonc2eca352012-12-02 10:51:37 +01003990
3991gb_ExternalExecutable__register_xmllint :=
3992
3993else # ! SYSTEM_LIBXML_FOR_BUILD
3994
3995define gb_ExternalExecutable__register_xmllint
Michael Stahl84b0f062017-09-14 14:54:07 +02003996$(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)
David Tardon5b660242014-07-28 10:38:49 +02003997$(call gb_ExternalExecutable_add_dependencies,xmllint,\
3998 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
Michael Stahl84b0f062017-09-14 14:54:07 +02003999 $(call gb_Package_get_target,libxml2) \
David Tardon5b660242014-07-28 10:38:49 +02004000)
David Tardonc2eca352012-12-02 10:51:37 +01004001
4002endef
4003
4004endif # SYSTEM_LIBXML_FOR_BUILD
4005
Michael Stahle3abec32014-02-11 15:57:18 +01004006ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
David Tardonc2eca352012-12-02 10:51:37 +01004007
4008gb_ExternalExecutable__register_xsltproc :=
4009
4010else # ! SYSTEM_LIBXSLT_FOR_BUILD
4011
4012define gb_ExternalExecutable__register_xsltproc
Michael Stahl15b973e2017-09-14 15:26:10 +02004013$(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)
David Tardon5b660242014-07-28 10:38:49 +02004014$(call gb_ExternalExecutable_add_dependencies,xsltproc,\
4015 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
Michael Stahl84b0f062017-09-14 14:54:07 +02004016 $(call gb_Package_get_target,libxml2) \
Michael Stahl15b973e2017-09-14 15:26:10 +02004017 $(call gb_Package_get_target,libxslt) \
David Tardon5b660242014-07-28 10:38:49 +02004018)
David Tardonc2eca352012-12-02 10:51:37 +01004019
4020endef
4021
4022endif # SYSTEM_LIBXSLT_FOR_BUILD
4023
David Tardonce038cf2013-10-20 20:43:46 +02004024ifneq (,$(SYSTEM_UCPP))
4025
4026gb_ExternalExecutable__register_ucpp :=
4027
4028else # ! SYSTEM_UCPP
4029
4030define gb_ExternalExecutable__register_ucpp
David Tardon489d2ea2013-10-21 08:17:32 +02004031$(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
David Tardonce038cf2013-10-20 20:43:46 +02004032
4033endef
4034
4035endif # SYSTEM_UCPP
4036
Matúš Kukane4826722013-03-05 22:03:38 +01004037ifeq (,$(PYTHON_FOR_BUILD))
David Tardonc2eca352012-12-02 10:51:37 +01004038
4039define gb_ExternalExecutable__register_python
Christian Lohmaier04032bd2013-03-19 17:27:01 +01004040ifeq ($(OS),MACOSX)
4041
4042# use set_external, to avoid having the command added as prerequisite for the
4043# targets that make use of it. (Otherwise make will choke as it doesn't have a
4044# matching rule to build that specific file)
4045$(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))
4046# the Zip ensures that internal python has been built (cannot use the Package
4047# target, as that is not used on Mac)
David Tardon45a5c262013-05-16 13:36:24 +02004048$(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
Christian Lohmaier04032bd2013-03-19 17:27:01 +01004049
4050else
4051
Jan-Marek Glogowski114ed732020-07-17 23:03:59 +02004052$(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))
Stephan Bergmann233610f2014-03-19 11:24:13 +01004053$(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
Christian Lohmaier04032bd2013-03-19 17:27:01 +01004054$(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
4055
4056endif
David Tardonc2eca352012-12-02 10:51:37 +01004057
4058endef
4059
Matúš Kukane4826722013-03-05 22:03:38 +01004060else
4061
4062define gb_ExternalExecutable__register_python
4063$(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
4064
4065endef
4066
4067endif # PYTHON_FOR_BUILD
David Tardonc2eca352012-12-02 10:51:37 +01004068
David Tardon63069262012-12-29 12:56:24 +01004069ifneq ($(SYSTEM_GENBRK),)
4070
4071define gb_ExternalExecutable__register_genbrk
4072$(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
4073
4074endef
4075
4076else # ! SYSTEM_GENBRK
4077
4078define gb_ExternalExecutable__register_genbrk
David Tardondbac8f52014-04-18 18:34:40 +02004079$(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
Stephan Bergmann58d80a62014-03-19 10:39:40 +01004080$(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
David Tardon63069262012-12-29 12:56:24 +01004081$(call gb_ExternalExecutable_add_dependencies,genbrk,\
4082 $(call gb_Package_get_target_for_build,icu) \
Stephan Bergmann475e4b42016-10-25 16:46:35 +02004083 $(call gb_Package_get_target_for_build,icu_ure) \
David Tardon63069262012-12-29 12:56:24 +01004084)
4085
4086endef
4087
4088endif
4089
4090ifneq ($(SYSTEM_GENCCODE),)
4091
4092define gb_ExternalExecutable__register_genccode
4093$(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
4094
4095endef
4096
4097else # ! SYSTEM_GENCCODE
4098
4099define gb_ExternalExecutable__register_genccode
David Tardondbac8f52014-04-18 18:34:40 +02004100$(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
Stephan Bergmann58d80a62014-03-19 10:39:40 +01004101$(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
David Tardon63069262012-12-29 12:56:24 +01004102$(call gb_ExternalExecutable_add_dependencies,genccode,\
4103 $(call gb_Package_get_target_for_build,icu) \
Stephan Bergmann475e4b42016-10-25 16:46:35 +02004104 $(call gb_Package_get_target_for_build,icu_ure) \
David Tardon63069262012-12-29 12:56:24 +01004105)
4106
4107endef
4108
4109endif
4110
4111ifneq ($(SYSTEM_GENCMN),)
4112
4113define gb_ExternalExecutable__register_gencmn
4114$(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
4115
4116endef
4117
4118else # ! SYSTEM_GENCMN
4119
4120define gb_ExternalExecutable__register_gencmn
David Tardondbac8f52014-04-18 18:34:40 +02004121$(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
Stephan Bergmann58d80a62014-03-19 10:39:40 +01004122$(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
David Tardon63069262012-12-29 12:56:24 +01004123$(call gb_ExternalExecutable_add_dependencies,gencmn,\
4124 $(call gb_Package_get_target_for_build,icu) \
Stephan Bergmann475e4b42016-10-25 16:46:35 +02004125 $(call gb_Package_get_target_for_build,icu_ure) \
David Tardon63069262012-12-29 12:56:24 +01004126)
4127
4128endef
4129
4130endif
4131
Jacobo Aragunde Péreze6fe5082015-02-02 19:49:37 +00004132ifeq (OWNCLOUD_ANDROID_LIB,$(filter OWNCLOUD_ANDROID_LIB,$(BUILD_TYPE)))
4133
4134$(eval $(call gb_Helper_register_jars,OXT,\
4135 owncloud-android-library \
4136))
4137
4138define gb_Jar__use_owncloud_android_lib
4139$(call gb_Jar_use_external_project,$(1),owncloud-android-lib)
4140$(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,owncloud-android-lib)/bin/owncloud-android-library.jar)
4141endef
4142define gb_ExternalProject__use_owncloud_android_lib
4143$(call gb_ExternalProject_use_external_project,$(1),owncloud_android_lib)
4144endef
4145
4146endif
4147
Nathan Yee7eb863d2015-07-03 11:58:27 +02004148ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
4149ifneq ($(SYSTEM_BZIP2),)
4150
4151define gb_LinkTarget__use_bzip2
4152$(call gb_LinkTarget_set_include,$(1),\
4153 $(BZIP2_CFLAGS) \
4154 $$(INCLUDE) \
4155)
4156$(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
4157
4158endef
Jan Holesovsky025952f2015-07-03 13:46:38 +02004159
Nathan Yee7eb863d2015-07-03 11:58:27 +02004160gb_ExternalProject__use_bzip2 :=
4161
4162else # !SYSTEM_BZIP2
4163
4164define gb_LinkTarget__use_bzip2
Nathan Yee7eb863d2015-07-03 11:58:27 +02004165$(call gb_LinkTarget_set_include,$(1),\
4166 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
4167 $$(INCLUDE) \
4168)
Nathan Yeeb59955b2015-07-14 14:36:37 -07004169
4170ifeq ($(COM),MSC)
4171$(call gb_LinkTarget_add_libs,$(1),\
4172 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
4173)
4174else
Jan Holesovsky025952f2015-07-03 13:46:38 +02004175$(call gb_LinkTarget_add_libs,$(1),\
4176 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
4177)
Nathan Yeeb59955b2015-07-14 14:36:37 -07004178endif
4179
Jan Holesovskyec477172015-07-07 09:24:45 +02004180$(call gb_LinkTarget_use_external_project,$(1),bzip2)
Nathan Yee7eb863d2015-07-03 11:58:27 +02004181endef
4182
4183define gb_ExternalProject__use_bzip2
4184$(call gb_ExternalProject_use_external_project,$(1),bzip2)
4185endef
4186
4187endif
4188endif
4189
Stephan Bergmannec53ac62016-04-12 20:06:04 +02004190define gb_LinkTarget__use_clew
4191$(call gb_LinkTarget_set_include,$(1), \
4192 -I$(SRCDIR)/external/clew/source/include \
4193 $$(INCLUDE) \
4194)
4195$(call gb_LinkTarget_use_libraries,$(1),clew)
4196endef
4197
Rene Engelhardf05d8e32017-03-06 18:49:00 +01004198ifneq ($(ENABLE_PDFIUM),)
Miklos Vajnab6f9eeb2017-02-08 11:19:39 +01004199define gb_LinkTarget__use_pdfium
4200$(call gb_LinkTarget_set_include,$(1),\
4201 -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \
Miklos Vajna9b4ab9b2020-01-22 21:02:05 +01004202 -DCOMPONENT_BUILD \
Miklos Vajnab6f9eeb2017-02-08 11:19:39 +01004203 $$(INCLUDE) \
4204)
4205$(call gb_LinkTarget_use_libraries,$(1),pdfium)
4206endef
4207$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
4208 pdfium \
4209))
Rene Engelhardf05d8e32017-03-06 18:49:00 +01004210endif
Miklos Vajnab6f9eeb2017-02-08 11:19:39 +01004211
Shubham Goyalb4141ca2019-05-28 12:49:07 +05304212ifneq ($(SYSTEM_QRCODEGEN),)
4213
4214define gb_LinkTarget__use_qrcodegen
4215$(call gb_LinkTarget_set_include,$(1),\
Caolán McNamara08eb6de2019-07-25 11:11:41 +01004216 -DSYSTEM_QRCODEGEN \
4217 $$(INCLUDE) \
4218 $(QRCODEGEN_CFLAGS) \
Shubham Goyalb4141ca2019-05-28 12:49:07 +05304219)
4220$(call gb_LinkTarget_add_libs,$(1),$(QRCODEGEN_LIBS))
4221
4222endef
4223
4224gb_ExternalProject__use_qrcodegen :=
4225
4226else # !SYSTEM_QRCODEGEN
4227
Caolán McNamaraa2791a82020-09-21 17:02:31 +01004228ifneq ($(ENABLE_QRCODEGEN),)
4229
Shubham Goyalb4141ca2019-05-28 12:49:07 +05304230define gb_LinkTarget__use_qrcodegen
Shubham Goyal2de42b52019-07-03 12:15:08 +05304231$(call gb_LinkTarget_use_unpacked,$(1),qrcodegen)
Shubham Goyalb4141ca2019-05-28 12:49:07 +05304232$(call gb_LinkTarget_set_include,$(1),\
4233 -I$(call gb_UnpackedTarball_get_dir,qrcodegen/cpp/)\
4234 $$(INCLUDE) \
4235)
4236$(call gb_LinkTarget_use_static_libraries,$(1),\
4237 qrcodegen \
4238)
4239
4240endef
4241
4242define gb_ExternalProject__use_qrcodegen
4243$(call gb_ExternalProject_use_static_libraries,$(1),qrcodegen)
4244
4245endef
4246
Caolán McNamaraa2791a82020-09-21 17:02:31 +01004247else # !ENABLE_QRCODEGEN
4248
4249define gb_LinkTarget__use_qrcodegen
4250endef
4251
4252endif # ENABLE_QRCODEGEN
4253
Shubham Goyalb4141ca2019-05-28 12:49:07 +05304254endif # SYSTEM_QRCODEGEN
4255
Mike Kaganskif3e70042020-02-23 19:19:10 +03004256define gb_LinkTarget__use_dtoa
4257$(call gb_LinkTarget_use_unpacked,$(1),dtoa)
4258$(call gb_LinkTarget_set_include,$(1),\
4259 -I$(call gb_UnpackedTarball_get_dir,dtoa/include/)\
4260 $$(INCLUDE) \
4261)
4262$(call gb_LinkTarget_use_static_libraries,$(1),\
4263 dtoa \
4264)
4265
4266endef
4267
4268define gb_ExternalProject__use_dtoa
4269$(call gb_ExternalProject_use_static_libraries,$(1),dtoa)
4270
4271endef
4272
Mike Kaganskib8424432018-04-15 23:24:42 +03004273$(eval $(call gb_Helper_register_packages_for_install,ucrt_binarytable,\
4274 $(if $(UCRT_REDISTDIR),ucrt) \
Mike Kaganski61b1d632017-12-13 00:04:03 +03004275))
4276
Sarper Akdemira7f22392020-05-13 11:28:05 +03004277ifneq ($(SYSTEM_BOX2D),)
4278
4279define gb_LinkTarget__use_box2d
4280$(call gb_LinkTarget_set_include,$(1),\
4281 -DSYSTEM_BOX2D \
4282 $$(INCLUDE) \
4283 $(BOX2D_CFLAGS) \
4284)
4285$(call gb_LinkTarget_add_libs,$(1),$(BOX2D_LIBS))
4286
4287endef
4288
4289gb_ExternalProject__use_box2d :=
4290
4291else # !SYSTEM_BOX2D
4292
4293define gb_LinkTarget__use_box2d
4294$(call gb_LinkTarget_use_unpacked,$(1),box2d)
4295$(call gb_LinkTarget_set_include,$(1),\
4296 -I$(call gb_UnpackedTarball_get_dir,box2d/Box2D/)\
4297 $$(INCLUDE) \
4298)
4299$(call gb_LinkTarget_use_static_libraries,$(1),\
4300 box2d \
4301)
4302
4303endef
4304
4305define gb_ExternalProject__use_box2d
4306$(call gb_ExternalProject_use_static_libraries,$(1),box2d)
4307
4308endef
4309
4310endif # SYSTEM_BOX2D
4311
Michael Stahlc74af0d2011-04-01 20:49:35 +00004312# vim: set noet sw=4 ts=4: