blob: e01ba6670ced237d46aefb47f15cd21c925828a2 [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
93gb_LinkTarget__use_glm_headers :=
Zolnai Tamás6403f2b2014-06-25 15:19:41 +020094gb_ExternalProject__use_glm_headers :=
Markus Mohrhardae9e6112013-12-23 17:31:55 +000095
96else
97
98define gb_LinkTarget__use_glm_headers
99$(call gb_LinkTarget_use_unpacked,$(1),glm)
100$(call gb_LinkTarget_set_include,$(1),\
David Tardon13494912015-05-19 16:59:26 +0200101 $(GLM_CFLAGS) \
Markus Mohrhardae9e6112013-12-23 17:31:55 +0000102 $$(INCLUDE) \
103)
104
105endef
106
Zolnai Tamás6403f2b2014-06-25 15:19:41 +0200107define gb_ExternalProject__use_glm_headers
David Tardon682e3592015-06-24 15:11:40 +0200108$(call gb_ExternalProject_use_unpacked,$(1),glm)
Zolnai Tamás6403f2b2014-06-25 15:19:41 +0200109
110endef
111
Markus Mohrhardae9e6112013-12-23 17:31:55 +0000112endif
113
Michael Stahl674e7912013-05-06 20:23:49 +0200114ifeq (SANE,$(filter SANE,$(BUILD_TYPE)))
David Tardoneafaec92012-12-21 14:08:27 +0100115
116define gb_LinkTarget__use_sane_headers
Michael Stahl72279ea2013-05-06 20:14:35 +0200117$(call gb_LinkTarget_set_include,$(1),\
Mike Kaganski585d9802017-12-22 20:46:12 +0300118 $(if $(filter WNT,$(OS)), \
119 -I$(call gb_UnpackedTarball_get_dir,twain_dsm/pub/include), \
120 -I$(SRCDIR)/external/sane/inc) \
121 $$(INCLUDE) \
David Tardoneafaec92012-12-21 14:08:27 +0100122)
123
Mike Kaganski585d9802017-12-22 20:46:12 +0300124ifeq ($(OS),WNT)
125$(call gb_LinkTarget_use_unpacked,$(1),twain_dsm)
126endif
127
David Tardoneafaec92012-12-21 14:08:27 +0100128endef
129
130else
131
132gb_LinkTarget__use_sane_headers :=
133
134endif
135
Michael Stahl8555b372014-02-11 19:28:33 +0100136ifneq ($(SYSTEM_BLUEZ),)
David Tardon8fa06c82013-11-05 06:53:49 +0100137
138gb_LinkTarget__use_bluez_bluetooth_headers :=
139
140else # !SYSTEM_BLUEZ
141
142define gb_LinkTarget__use_bluez_bluetooth_headers
143$(call gb_LinkTarget_set_include,$(1),\
144 -I$(SRCDIR)/external/bluez_bluetooth/inc \
145 $$(INCLUDE) \
146)
147
148endef
149
150endif # SYSTEM_BLUEZ
151
Matúš Kukan8e535df2012-04-07 13:59:33 +0200152# External libraries
153
Michael Stahle3abec32014-02-11 15:57:18 +0100154ifneq ($(SYSTEM_CPPUNIT),)
David Tardon785e1d92011-07-25 10:34:22 +0200155
156define gb_LinkTarget__use_cppunit
157$(call gb_LinkTarget_set_include,$(1),\
158 $$(INCLUDE) \
159 $(CPPUNIT_CFLAGS) \
160)
161
162$(call gb_LinkTarget_add_libs,$(1),\
163 $(CPPUNIT_LIBS) \
164)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100165
David Tardon785e1d92011-07-25 10:34:22 +0200166endef
167
Michael Stahle3abec32014-02-11 15:57:18 +0100168else # !SYSTEM_CPPUNIT
David Tardon785e1d92011-07-25 10:34:22 +0200169
David Tardon785e1d92011-07-25 10:34:22 +0200170define gb_LinkTarget__use_cppunit
Markus Mohrhardd63a9402016-02-23 11:28:31 +0100171$(call gb_LinkTarget_use_external_project,$(1),cppunit, full)
Peter Foley143835b2012-11-25 16:37:40 -0500172
Peter Foley143835b2012-11-25 16:37:40 -0500173$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200174 -I$(call gb_UnpackedTarball_get_dir,cppunit/include)\
Peter Foley143835b2012-11-25 16:37:40 -0500175 $$(INCLUDE) \
176)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100177
Michael Stahl77fe50b2013-10-23 23:35:16 +0200178ifeq ($(COM),MSC)
179$(call gb_LinkTarget_add_libs,$(1),\
180 $(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll/cppunitd_dll.lib,ReleaseDll/cppunit_dll.lib) \
181)
182else
183$(call gb_LinkTarget_add_libs,$(1),\
184 -L$(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/.libs -lcppunit \
185)
186endif
187
David Tardon785e1d92011-07-25 10:34:22 +0200188endef
189
Michael Stahle3abec32014-02-11 15:57:18 +0100190endif # SYSTEM_CPPUNIT
Michael Stahlc74af0d2011-04-01 20:49:35 +0000191
Caolán McNamara482d7ce2016-11-25 20:25:27 +0000192ifneq ($(SYSTEM_EPOXY),)
David Tardon864f7752014-02-09 21:19:07 +0100193
Caolán McNamara482d7ce2016-11-25 20:25:27 +0000194define gb_LinkTarget__use_epoxy
David Tardon864f7752014-02-09 21:19:07 +0100195$(call gb_LinkTarget_set_include,$(1),\
196 $$(INCLUDE) \
Caolán McNamara482d7ce2016-11-25 20:25:27 +0000197 $(EPOXY_CFLAGS) \
David Tardon864f7752014-02-09 21:19:07 +0100198)
Caolán McNamara482d7ce2016-11-25 20:25:27 +0000199$(call gb_LinkTarget_add_libs,$(1),$(EPOXY_LIBS))
David Tardon864f7752014-02-09 21:19:07 +0100200
201endef
202
Caolán McNamara482d7ce2016-11-25 20:25:27 +0000203gb_ExternalProject__use_epoxy :=
Zolnai Tamás6403f2b2014-06-25 15:19:41 +0200204
Caolán McNamara482d7ce2016-11-25 20:25:27 +0000205else # !SYSTEM_EPOXY
David Tardon864f7752014-02-09 21:19:07 +0100206
Caolán McNamara482d7ce2016-11-25 20:25:27 +0000207define gb_LinkTarget__use_epoxy
208$(call gb_LinkTarget_set_include,$(1),\
209 -I$(call gb_UnpackedTarball_get_dir,epoxy/include) \
210 $$(INCLUDE) \
211)
212
213$(call gb_LinkTarget_use_libraries,$(1),\
214 epoxy \
215)
216
217endef
218
219$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
220 epoxy \
Michael Stahl0c94f232014-03-18 17:17:04 +0100221))
222
Caolán McNamara482d7ce2016-11-25 20:25:27 +0000223define gb_ExternalProject__use_epoxy
224$(call gb_ExternalProject_use_external_project,$(1),epoxy)
David Tardon864f7752014-02-09 21:19:07 +0100225
226endef
227
Caolán McNamara482d7ce2016-11-25 20:25:27 +0000228endif # SYSTEM_EPOXY
David Tardon864f7752014-02-09 21:19:07 +0100229
Tor Lillqvist40900fb2013-01-03 12:48:14 +0200230define gb_LinkTarget__use_iconv
Tamas Bunth26b40fc2018-08-16 16:35:17 +0200231ifeq ($(COM),MSC)
232$(call gb_LinkTarget_add_libs,$(1),libiconv.lib)
233else
Tor Lillqvist40900fb2013-01-03 12:48:14 +0200234$(call gb_LinkTarget_add_libs,$(1),-liconv)
Tamas Bunth26b40fc2018-08-16 16:35:17 +0200235endif
Tor Lillqvist40900fb2013-01-03 12:48:14 +0200236endef
237
Michael Stahl871d75e2017-09-14 13:30:05 +0200238ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
Peter Foleyc322d502013-01-23 16:29:08 -0500239
Michael Stahl871d75e2017-09-14 13:30:05 +0200240define gb_LinkTarget__use_mariadb-connector-c
David Tardon217eae42013-11-05 06:49:33 +0100241$(call gb_LinkTarget_set_include,$(1),\
242 $$(INCLUDE) \
243 $(MARIADB_CFLAGS) \
244)
245$(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS))
246
247endef
Michael Stahl871d75e2017-09-14 13:30:05 +0200248gb_ExternalProject__use_mariadb-connector-c :=
David Tardon217eae42013-11-05 06:49:33 +0100249
Michael Stahl871d75e2017-09-14 13:30:05 +0200250else # !SYSTEM_MARIADB_CONNECTOR_C
David Tardon217eae42013-11-05 06:49:33 +0100251
Michael Stahl871d75e2017-09-14 13:30:05 +0200252define gb_LinkTarget__use_mariadb-connector-c
David Tardon217eae42013-11-05 06:49:33 +0100253$(call gb_LinkTarget_set_include,$(1),\
254 $$(INCLUDE) \
255 $(MARIADB_CFLAGS) \
256)
257$(call gb_LinkTarget_use_static_libraries,$(1),\
Michael Stahl871d75e2017-09-14 13:30:05 +0200258 mariadb-connector-c \
David Tardon217eae42013-11-05 06:49:33 +0100259)
Michael Stahl13a05ee2018-08-20 19:07:40 +0200260ifeq ($(OS),MACOSX)
261$(call gb_LinkTarget_add_libs,$(1),\
262 -liconv \
263)
264endif
David Tardon217eae42013-11-05 06:49:33 +0100265
266endef
Michael Stahl871d75e2017-09-14 13:30:05 +0200267define gb_ExternalProject__use_mariadb-connector-c
268$(call gb_ExternalProject_use_static_libraries,$(1),mariadb-connector-c)
David Tardon217eae42013-11-05 06:49:33 +0100269
270endef
271
Michael Stahl871d75e2017-09-14 13:30:05 +0200272endif # SYSTEM_MARIADB_CONNECTOR_C
David Tardon217eae42013-11-05 06:49:33 +0100273
274
Michael Stahl871d75e2017-09-14 13:30:05 +0200275ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
David Tardon217eae42013-11-05 06:49:33 +0100276
Peter Foleyc322d502013-01-23 16:29:08 -0500277define gb_LinkTarget__use_mysql
278
279$(call gb_LinkTarget_add_defs,$(1),\
Fridrich Štrba1bf43062013-03-06 11:45:50 +0100280 -DSYSTEM_MARIADB \
Peter Foleyc322d502013-01-23 16:29:08 -0500281)
282
283$(call gb_LinkTarget_add_libs,$(1),\
Fridrich Štrbacad422a2013-03-06 16:33:07 +0100284 $(MARIADB_LIBS) \
Peter Foleyc322d502013-01-23 16:29:08 -0500285)
286
287$(call gb_LinkTarget_set_include,$(1),\
Fridrich Štrbacad422a2013-03-06 16:33:07 +0100288 $(MARIADB_CFLAGS) \
Peter Foleyc322d502013-01-23 16:29:08 -0500289 $$(INCLUDE) \
290)
291endef
292
293else
294
295define gb_LinkTarget__use_mysql
296
297$(call gb_LinkTarget_set_include,$(1),\
Peter Foleyc322d502013-01-23 16:29:08 -0500298 $$(INCLUDE) \
299)
300
301endef
302
303endif
304
Michael Stahl04ff5352014-02-11 16:21:04 +0100305ifneq ($(SYSTEM_ZLIB),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000306
307define gb_LinkTarget__use_zlib
Michael Stahla88ef232011-04-13 16:11:41 +0000308$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000309 -DSYSTEM_ZLIB \
310)
311$(call gb_LinkTarget_add_libs,$(1),-lz)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100312
Michael Stahlc74af0d2011-04-01 20:49:35 +0000313endef
314
David Tardoncb276232012-10-26 15:33:26 +0200315# nothing on system
316define gb_LinkTarget__use_zlib_x64
317
318endef
319
Fridrich Štrba2f4d1602013-03-14 12:45:24 +0100320gb_ExternalProject__use_zlib :=
321
Michael Stahlc74af0d2011-04-01 20:49:35 +0000322else # !SYSTEM_ZLIB
323
David Tardoncb276232012-10-26 15:33:26 +0200324define gb_LinkTarget__use_zlib_multiarch
325$(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
326
Matúš Kukanf5ff45b2012-09-08 16:29:05 +0200327$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl3c38b772013-05-08 15:47:24 +0200328 $(ZLIB_CFLAGS) \
Matúš Kukanf5ff45b2012-09-08 16:29:05 +0200329 $$(INCLUDE) \
330)
David Tardoncb276232012-10-26 15:33:26 +0200331
Michael Stahlc923f7d2012-04-07 23:22:08 +0200332$(call gb_LinkTarget_use_static_libraries,$(1),\
David Tardoncb276232012-10-26 15:33:26 +0200333 $(2) \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000334)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100335
Michael Stahlc74af0d2011-04-01 20:49:35 +0000336endef
337
David Tardoncb276232012-10-26 15:33:26 +0200338define gb_LinkTarget__use_zlib
339$(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
340
341endef
342
343define gb_LinkTarget__use_zlib_x64
344$(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
345
346endef
347
Fridrich Štrba2f4d1602013-03-14 12:45:24 +0100348define gb_ExternalProject__use_zlib
Fridrich Štrba2f4d1602013-03-14 12:45:24 +0100349$(call gb_ExternalProject_use_static_libraries,$(1),zlib)
350
351endef
352
Michael Stahlc74af0d2011-04-01 20:49:35 +0000353endif # SYSTEM_ZLIB
354
355
Michael Stahl77d297f2017-09-13 22:50:14 +0200356ifneq ($(SYSTEM_LIBJPEG),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000357
Michael Stahl77d297f2017-09-13 22:50:14 +0200358define gb_LinkTarget__use_libjpeg
Michael Stahleea709f2016-11-02 14:13:54 +0100359$(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
Michael Stahlc74af0d2011-04-01 20:49:35 +0000360$(call gb_LinkTarget_set_ldflags,$(1),\
Michael Stahl73d2fe92011-04-13 16:11:39 +0000361 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000362)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100363
Michael Stahlc74af0d2011-04-01 20:49:35 +0000364endef
365
Michael Stahl77d297f2017-09-13 22:50:14 +0200366gb_ExternalProject__use_libjpeg :=
Michael Stahleea709f2016-11-02 14:13:54 +0100367
Caolán McNamaraae967542017-03-14 14:20:36 +0000368else
Matúš Kukan71fae5d2014-11-17 09:16:34 +0100369
Michael Stahl77d297f2017-09-13 22:50:14 +0200370define gb_LinkTarget__use_libjpeg
Matúš Kukan71fae5d2014-11-17 09:16:34 +0100371$(call gb_LinkTarget_set_include,$(1),\
Michael Stahleea709f2016-11-02 14:13:54 +0100372 $(LIBJPEG_CFLAGS) \
Matúš Kukan71fae5d2014-11-17 09:16:34 +0100373 $$(INCLUDE) \
374)
Michael Stahleea709f2016-11-02 14:13:54 +0100375$(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
Michael Stahl77d297f2017-09-13 22:50:14 +0200376$(call gb_LinkTarget_use_external_project,$(1),libjpeg-turbo,full)
Matúš Kukan71fae5d2014-11-17 09:16:34 +0100377
378endef
379
Michael Stahl77d297f2017-09-13 22:50:14 +0200380define gb_ExternalProject__use_libjpeg
381$(call gb_ExternalProject_use_external_project,$(1),libjpeg-turbo)
Michael Stahleea709f2016-11-02 14:13:54 +0100382
383endef
384
Michael Stahl77d297f2017-09-13 22:50:14 +0200385endif # SYSTEM_LIBJPEG
Michael Stahlc74af0d2011-04-01 20:49:35 +0000386
Michael Stahlab586f12014-02-11 19:25:30 +0100387ifneq ($(SYSTEM_MYTHES),)
Peter Foley1d1bab42012-10-28 12:00:06 -0400388
389define gb_LinkTarget__use_mythes
Rene Engelhard99ef1f52012-10-28 23:00:03 +0100390$(call gb_LinkTarget_set_include,$(1),\
391 $$(INCLUDE) \
392 $(MYTHES_CFLAGS) \
393)
394$(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
395
Peter Foley1d1bab42012-10-28 12:00:06 -0400396endef
397
398else # !SYSTEM_MYTHES
399
Peter Foley1d1bab42012-10-28 12:00:06 -0400400define gb_LinkTarget__use_mythes
Michael Stahl90ad80e32013-05-07 23:59:00 +0200401$(call gb_LinkTarget_set_include,$(1),\
402 -I$(call gb_UnpackedTarball_get_dir,mythes) \
403 $$(INCLUDE) \
404)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200405
406ifeq ($(COM),MSC)
Matúš Kukan327db9f2012-10-28 22:40:30 +0100407$(call gb_LinkTarget_use_static_libraries,$(1),\
408 mythes \
Peter Foley1d1bab42012-10-28 12:00:06 -0400409)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200410else
411$(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
412$(call gb_LinkTarget_use_external_project,$(1),mythes)
413endif
Matúš Kukan327db9f2012-10-28 22:40:30 +0100414
Peter Foley1d1bab42012-10-28 12:00:06 -0400415endef
416
417endif # SYSTEM_MYTHES
418
Michael Stahlc74af0d2011-04-01 20:49:35 +0000419
Michael Stahl46648152014-02-11 16:33:18 +0100420ifneq ($(SYSTEM_EXPAT),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000421
David Tardon51149802013-04-09 09:22:20 +0200422define gb_LinkTarget__use_expat_impl
423$(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
Michael Stahlc74af0d2011-04-01 20:49:35 +0000424
Michael Stahla88ef232011-04-13 16:11:41 +0000425$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000426 -DSYSTEM_EXPAT \
427)
428
429$(call gb_LinkTarget_add_libs,$(1),-lexpat)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100430
Michael Stahlc74af0d2011-04-01 20:49:35 +0000431endef
432
Michael Stahl77289672012-11-17 00:36:29 +0100433gb_ExternalProject__use_expat :=
434
Michael Stahlc74af0d2011-04-01 20:49:35 +0000435else # !SYSTEM_EXPAT
436
David Tardon51149802013-04-09 09:22:20 +0200437define gb_LinkTarget__use_expat_impl
438$(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
Michael Stahlc74af0d2011-04-01 20:49:35 +0000439
David Ostrovsky2ffde7b2012-10-12 12:28:11 -0700440$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl5e037bb2013-05-07 21:47:18 +0200441 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
David Ostrovsky2ffde7b2012-10-12 12:28:11 -0700442 $$(INCLUDE) \
443)
444
Michael Stahlc923f7d2012-04-07 23:22:08 +0200445$(call gb_LinkTarget_use_static_libraries,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000446 $(2) \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000447)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100448
Michael Stahlc74af0d2011-04-01 20:49:35 +0000449endef
450
Michael Stahl77289672012-11-17 00:36:29 +0100451define gb_ExternalProject__use_expat
Michael Stahl77289672012-11-17 00:36:29 +0100452$(call gb_ExternalProject_use_static_libraries,$(1),expat)
453
454endef
455
Michael Stahlc74af0d2011-04-01 20:49:35 +0000456endif # SYSTEM_EXPAT
457
David Tardon51149802013-04-09 09:22:20 +0200458define gb_LinkTarget__use_expat
459$(call gb_LinkTarget__use_expat_impl,$(1),expat)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100460
Michael Stahlc74af0d2011-04-01 20:49:35 +0000461endef
462
David Tardon51149802013-04-09 09:22:20 +0200463define gb_LinkTarget__use_expat_x64
464$(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100465
Michael Stahlc74af0d2011-04-01 20:49:35 +0000466endef
467
Michael Stahl9fc9e9c2014-02-11 19:21:36 +0100468ifneq ($(SYSTEM_HYPH),)
Peter Foleydd584cb2012-11-03 13:54:46 -0400469
470define gb_LinkTarget__use_hyphen
471$(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
472
473endef
474
475else # !SYSTEM_HYPH
476
Peter Foleydd584cb2012-11-03 13:54:46 -0400477define gb_LinkTarget__use_hyphen
478$(call gb_LinkTarget_use_unpacked,$(1),hyphen)
479$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200480 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
Peter Foleydd584cb2012-11-03 13:54:46 -0400481 $$(INCLUDE) \
482)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200483
484ifeq ($(COM),MSC)
Peter Foleydd584cb2012-11-03 13:54:46 -0400485$(call gb_LinkTarget_use_static_libraries,$(1),\
486 hyphen \
487)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200488else
489$(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
490$(call gb_LinkTarget_use_external_project,$(1),hyphen)
491endif
Peter Foleydd584cb2012-11-03 13:54:46 -0400492
493endef
494
495endif # SYSTEM_HYPH
496
Michael Stahl9fc9e9c2014-02-11 19:21:36 +0100497ifneq ($(SYSTEM_HUNSPELL),)
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100498
499define gb_LinkTarget__use_hunspell
500$(call gb_LinkTarget_set_include,$(1),\
501 $$(INCLUDE) \
502 $(HUNSPELL_CFLAGS) \
503)
504$(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
505
506endef
507
Michael Stahl2f6261f2013-09-19 19:28:36 +0200508gb_ExternalProject__use_hunspell :=
509
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100510else # !SYSTEM_HUNSPELL
511
512define gb_LinkTarget__use_hunspell
513$(call gb_LinkTarget_add_defs,$(1),\
514 -DHUNSPELL_STATIC \
515)
Matúš Kukan7a030392012-10-29 23:29:37 +0100516$(call gb_LinkTarget_use_unpacked,$(1),hunspell)
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100517$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200518 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
Matúš Kukan7a030392012-10-29 23:29:37 +0100519 $$(INCLUDE) \
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100520)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200521
522ifeq ($(COM),MSC)
Michael Stahlc923f7d2012-04-07 23:22:08 +0200523$(call gb_LinkTarget_use_static_libraries,$(1),\
Matúš Kukan327db9f2012-10-28 22:40:30 +0100524 hunspell \
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100525)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200526else
527$(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
528$(call gb_LinkTarget_use_external_project,$(1),hunspell)
529endif
530
531endef
532
533define gb_ExternalProject__use_hunspell
534$(call gb_ExternalProject_use_external_project,$(1),hunspell)
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100535
536endef
537
538endif # SYSTEM_HUNSPELL
539
540
Michael Stahladddbbc2014-02-11 18:40:09 +0100541ifneq ($(SYSTEM_BOOST),)
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200542
David Tardon57c439a2016-03-08 06:06:36 +0100543define gb_LinkTarget__use_boost_lib
David Tardon0f6919c2012-06-06 17:04:01 +0200544$(call gb_LinkTarget_set_include,$(1),\
545 $$(INCLUDE) \
546 $(BOOST_CPPFLAGS) \
547)
548
549$(call gb_LinkTarget_add_ldflags,$(1),\
550 $(BOOST_LDFLAGS) \
551)
552
David Tardon57c439a2016-03-08 06:06:36 +0100553$(call gb_LinkTarget_add_libs,$(1),$(2))
554
555endef
556
Caolán McNamarac25eee42017-04-19 12:02:25 +0100557define gb_LinkTarget__use_boost_locale
558$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_LOCALE_LIB))
559
560endef
561
David Tardon23d2e0e2016-03-08 08:35:59 +0100562define gb_LinkTarget__use_boost_date_time
David Tardon57c439a2016-03-08 06:06:36 +0100563$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
David Tardon0f6919c2012-06-06 17:04:01 +0200564
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200565endef
566
David Tardonb4339fa2016-03-08 06:08:36 +0100567define gb_LinkTarget__use_boost_filesystem
568$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_FILESYSTEM_LIB))
569
570endef
571
572gb_ExternalProject__use_boost_filesystem :=
573
Markus Mohrhard36788e92014-01-08 13:17:28 +0100574define gb_LinkTarget__use_boost_iostreams
David Tardon57c439a2016-03-08 06:06:36 +0100575$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
Markus Mohrhard36788e92014-01-08 13:17:28 +0100576
577endef
578
David Tardon6d9de6b2014-03-03 20:39:13 +0100579gb_ExternalProject__use_boost_iostreams :=
580
Markus Mohrhard36788e92014-01-08 13:17:28 +0100581define gb_LinkTarget__use_boost_system
David Tardon57c439a2016-03-08 06:06:36 +0100582$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB))
Tor Lillqvist503b2482013-05-22 19:50:22 +0300583
584endef
585
Markus Mohrhard36788e92014-01-08 13:17:28 +0100586gb_ExternalProject__use_boost_system :=
Tor Lillqvist503b2482013-05-22 19:50:22 +0300587
Stephan Bergmann93208022013-02-16 22:56:19 +0100588define gb_LinkTarget__use_boost_headers
589$(call gb_LinkTarget_set_include,$(1),\
590 $$(INCLUDE) \
591 $(BOOST_CPPFLAGS) \
592)
593
594endef
595
Peter Foleycdb6eca2012-11-10 08:56:12 -0500596gb_ExternalProject__use_boost_headers:=
597
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200598else # !SYSTEM_BOOST
599
David Tardon57c439a2016-03-08 06:06:36 +0100600define gb_LinkTarget__use_boost_lib
Michael Stahl7f2e1682012-09-06 20:22:11 +0200601$(call gb_LinkTarget_add_defs,$(1),\
602 -DBOOST_ALL_NO_LIB \
603)
604
David Tardon57c439a2016-03-08 06:06:36 +0100605$(call gb_LinkTarget_use_static_libraries,$(1),$(2))
606
607endef
608
Caolán McNamarac25eee42017-04-19 12:02:25 +0100609define gb_LinkTarget__use_boost_locale
610$(call gb_LinkTarget__use_boost_lib,$(1),boost_locale)
611$(call gb_LinkTarget_add_libs,$(1),\
612 $(if $(filter $(OS),MACOSX),-liconv) \
613)
614
615endef
616
David Tardon23d2e0e2016-03-08 08:35:59 +0100617define gb_LinkTarget__use_boost_date_time
618$(call gb_LinkTarget__use_boost_lib,$(1),boost_date_time)
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200619
620endef
621
David Tardond72a33c2016-03-08 05:57:40 +0100622define gb_LinkTarget__use_boost_filesystem
David Tardon57c439a2016-03-08 06:06:36 +0100623$(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem)
David Tardond72a33c2016-03-08 05:57:40 +0100624
625endef
626
627define gb_ExternalProject__use_boost_filesystem
628$(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
629endef
630
Markus Mohrhard36788e92014-01-08 13:17:28 +0100631define gb_LinkTarget__use_boost_iostreams
David Tardon57c439a2016-03-08 06:06:36 +0100632$(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams)
Tor Lillqvist503b2482013-05-22 19:50:22 +0300633
634endef
635
Markus Mohrhard36788e92014-01-08 13:17:28 +0100636define gb_ExternalProject__use_boost_iostreams
637$(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
638endef
639
640define gb_LinkTarget__use_boost_system
David Tardon57c439a2016-03-08 06:06:36 +0100641$(call gb_LinkTarget__use_boost_lib,$(1),boost_system)
Markus Mohrhard36788e92014-01-08 13:17:28 +0100642
643endef
644
645define gb_ExternalProject__use_boost_system
646$(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
Tor Lillqvist503b2482013-05-22 19:50:22 +0300647endef
648
Peter Foleye1f742a2012-11-12 18:37:10 -0500649define gb_LinkTarget__use_boost_headers
Christian Lohmaier1654a1e72012-11-14 18:11:30 +0100650$(call gb_LinkTarget_use_unpacked,$(1),boost)
Michael Stahla53586f2013-01-26 21:19:13 +0100651$(call gb_LinkTarget_set_include,$(1),\
Stephan Bergmannf51656c2016-05-31 13:32:15 +0200652 $(BOOST_CPPFLAGS) \
Michael Stahla53586f2013-01-26 21:19:13 +0100653 $$(INCLUDE) \
654)
Peter Foleye1f742a2012-11-12 18:37:10 -0500655
656endef
657
Peter Foleycdb6eca2012-11-10 08:56:12 -0500658define gb_ExternalProject__use_boost_headers
David Tardon682e3592015-06-24 15:11:40 +0200659$(call gb_ExternalProject_use_unpacked,$(1),boost)
Peter Foleycdb6eca2012-11-10 08:56:12 -0500660
661endef
David Tardond72a33c2016-03-08 05:57:40 +0100662
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200663endif # SYSTEM_BOOST
664
665
Michael Stahl38abb6a2017-09-13 23:44:32 +0200666ifneq ($(SYSTEM_LIBCMIS),)
Matúš Kukan464b4332012-01-15 02:12:49 +0100667
Michael Stahl38abb6a2017-09-13 23:44:32 +0200668define gb_LinkTarget__use_libcmis
Matúš Kukan464b4332012-01-15 02:12:49 +0100669$(call gb_LinkTarget_set_include,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +0100670 $$(INCLUDE) \
Michael Stahl38abb6a2017-09-13 23:44:32 +0200671 $(LIBCMIS_CFLAGS) \
Matúš Kukan464b4332012-01-15 02:12:49 +0100672)
Michael Stahl38abb6a2017-09-13 23:44:32 +0200673$(call gb_LinkTarget_add_libs,$(1),$(LIBCMIS_LIBS))
Matúš Kukan464b4332012-01-15 02:12:49 +0100674
675endef
676
Michael Stahl38abb6a2017-09-13 23:44:32 +0200677else # !SYSTEM_LIBCMIS
Matúš Kukan464b4332012-01-15 02:12:49 +0100678
Michael Stahl38abb6a2017-09-13 23:44:32 +0200679define gb_LinkTarget__use_libcmis
Michael Stahl759d02b2013-05-08 00:55:21 +0200680$(call gb_LinkTarget_set_include,$(1),\
David Tardonb08a4122018-12-27 15:45:48 +0100681 -I$(call gb_UnpackedTarball_get_dir,libcmis)/inc \
Michael Stahl759d02b2013-05-08 00:55:21 +0200682 $$(INCLUDE) \
683)
Michael Stahlc923f7d2012-04-07 23:22:08 +0200684$(call gb_LinkTarget_use_static_libraries,$(1),\
Michael Stahl38abb6a2017-09-13 23:44:32 +0200685 libcmis \
Matúš Kukan464b4332012-01-15 02:12:49 +0100686)
687
688endef
689
Michael Stahl38abb6a2017-09-13 23:44:32 +0200690endif # SYSTEM_LIBCMIS
Matúš Kukan464b4332012-01-15 02:12:49 +0100691
David Tardon32cd12c2014-04-26 19:46:40 +0200692ifeq ($(ENABLE_JAVA),TRUE)
David Tardon2a71e152014-04-26 16:08:07 +0200693
David Tardon2a71e152014-04-26 16:08:07 +0200694define gb_LinkTarget__use_jawt
695$(call gb_LinkTarget_add_libs,$(1),\
696 $(JAWTLIB) \
697)
698
699endef
Peter Foleye5ccda42012-12-25 11:23:58 -0500700
David Tardon2a71e152014-04-26 16:08:07 +0200701else # !ENABLE_JAVA
702
703gb_LinkTarget__use_jawt :=
704
705endif # ENABLE_JAVA
Matúš Kukan464b4332012-01-15 02:12:49 +0100706
Michael Stahl23647592014-02-11 19:04:20 +0100707ifneq ($(SYSTEM_LIBATOMIC_OPS),)
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100708
709define gb_LinkTarget__use_libatomic_ops
710$(call gb_LinkTarget_set_include,$(1),\
711 $$(INCLUDE) \
712 $(LIBATOMIC_OPS_CFLAGS) \
713)
714$(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
715
716endef
717gb_ExternalProject__use_libatomic_ops :=
718
719else # !SYSTEM_LIBATOMIC_OPS
720
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100721define gb_LinkTarget__use_libatomic_ops
722$(call gb_LinkTarget_set_include,$(1),\
723$(LIBATOMIC_OPS_CFLAGS) \
724 $$(INCLUDE) \
725 $(LIBATOMIC_OPS_CFLAGS) \
726)
Michael Stahlb3085262013-10-24 12:22:58 +0200727$(call gb_LinkTarget_use_external_project,$(1),\
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100728 libatomic_ops \
729)
Andrzej J.R. Huntf479f622013-09-05 16:27:50 +0100730
Michael Stahlb3085262013-10-24 12:22:58 +0200731$(call gb_LinkTarget_add_libs,$(1),\
Andrzej J.R. Huntf479f622013-09-05 16:27:50 +0100732 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100733)
734
735endef
736
737define gb_ExternalProject__use_libatomic_ops
Michael Stahlb3085262013-10-24 12:22:58 +0200738$(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100739
740endef
741
742endif # SYSTEM_LIBATOMIC_OPS
743
744
Michael Stahle3abec32014-02-11 15:57:18 +0100745ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
Matúš Kukanbd030302011-12-03 15:06:52 +0100746
747define gb_LinkTarget__use_libexttextcat
748$(call gb_LinkTarget_set_include,$(1),\
749 $$(INCLUDE) \
750 $(LIBEXTTEXTCAT_CFLAGS) \
751)
Peter Foley31219f02012-11-09 17:25:56 -0500752$(call gb_LinkTarget_add_defs,$(1),\
753 -DSYSTEM_LIBEXTTEXTCAT \
754)
Matúš Kukanbd030302011-12-03 15:06:52 +0100755$(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
756
757endef
758
759else # !SYSTEM_LIBEXTTEXTCAT
760
Matúš Kukanbd030302011-12-03 15:06:52 +0100761define gb_LinkTarget__use_libexttextcat
Peter Foley31219f02012-11-09 17:25:56 -0500762$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl653e3582017-09-13 23:57:54 +0200763 -I$(call gb_UnpackedTarball_get_dir,libexttextcat/src) \
Peter Foley31219f02012-11-09 17:25:56 -0500764 $$(INCLUDE) \
765)
Matúš Kukanbd030302011-12-03 15:06:52 +0100766
Michael Stahl2f6261f2013-09-19 19:28:36 +0200767ifeq ($(COM),MSC)
768$(call gb_LinkTarget_use_static_libraries,$(1),\
Michael Stahl653e3582017-09-13 23:57:54 +0200769 libexttextcat \
Michael Stahl2f6261f2013-09-19 19:28:36 +0200770)
771else
772$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahl653e3582017-09-13 23:57:54 +0200773 $(call gb_UnpackedTarball_get_dir,libexttextcat)/src/.libs/libexttextcat-2.0.a\
Michael Stahl2f6261f2013-09-19 19:28:36 +0200774)
Michael Stahl653e3582017-09-13 23:57:54 +0200775$(call gb_LinkTarget_use_external_project,$(1),libexttextcat)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200776endif
777
778
Matúš Kukanbd030302011-12-03 15:06:52 +0100779endef
780
781endif # SYSTEM_LIBEXTTEXTCAT
782
783
László Némethf1579d32018-02-20 11:38:24 +0100784ifneq ($(SYSTEM_LIBNUMBERTEXT),)
785
786define gb_LinkTarget__use_libnumbertext
787$(call gb_LinkTarget_set_include,$(1),\
788 $$(INCLUDE) \
789 $(LIBNUMBERTEXT_CFLAGS) \
790)
791$(call gb_LinkTarget_add_defs,$(1),\
792 -DSYSTEM_LIBNUMBERTEXT \
793)
794$(call gb_LinkTarget_add_libs,$(1),$(LIBNUMBERTEXT_LIBS))
795
796endef
797
798else # !SYSTEM_LIBNUMBERTEXT
799
800ifneq ($(ENABLE_LIBNUMBERTEXT),)
801
Christian Lohmaier566050c2018-08-22 00:47:13 +0200802$(eval $(call gb_Helper_register_packages_for_install,ooo, \
803 libnumbertext_numbertext \
804))
805
László Némethf1579d32018-02-20 11:38:24 +0100806define gb_LinkTarget__use_libnumbertext
Mike Kaganski19c45de2018-05-15 15:39:01 +0100807$(call gb_LinkTarget_use_package,$(1),libnumbertext_numbertext)
László Némethf1579d32018-02-20 11:38:24 +0100808$(call gb_LinkTarget_set_include,$(1),\
809 -I$(call gb_UnpackedTarball_get_dir,libnumbertext/src) \
810 $$(INCLUDE) \
811)
812$(call gb_LinkTarget_add_defs,$(1),\
813 -DENABLE_LIBNUMBERTEXT \
814)
815
816ifeq ($(COM),MSC)
817$(call gb_LinkTarget_use_static_libraries,$(1),\
818 libnumbertext \
819)
820else
821
822$(call gb_LinkTarget_add_libs,$(1),\
823 $(call gb_UnpackedTarball_get_dir,libnumbertext)/src/.libs/libnumbertext-1.0.a\
824)
Stephan Bergmanne046c362018-05-04 10:21:23 +0200825$(call gb_LinkTarget_use_external_project,$(1),libnumbertext,full)
László Némethf1579d32018-02-20 11:38:24 +0100826
827endif
828
829endef
830
831else # !ENABLE_LIBNUMBERTEXT
832
833define gb_LinkTarget__use_libnumbertext
834endef
835
836endif # ENABLE_LIBNUMBERTEXT
837
838endif # SYSTEM_LIBNUMBERTEXT
839
840
Michael Stahl379f9782014-02-11 16:49:19 +0100841ifneq ($(SYSTEM_LIBXML),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000842
843define gb_LinkTarget__use_libxml2
Michael Stahla88ef232011-04-13 16:11:41 +0000844$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000845 -DSYSTEM_LIBXML \
846)
847$(call gb_LinkTarget_set_include,$(1),\
848 $$(INCLUDE) \
849 $(LIBXML_CFLAGS) \
850)
851$(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +0100852
Michael Stahlc74af0d2011-04-01 20:49:35 +0000853endef
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500854gb_ExternalProject__use_libxml2:=
Michael Stahlc74af0d2011-04-01 20:49:35 +0000855
856else # !SYSTEM_LIBXML
857
Michael Stahl64ea9942014-03-14 11:48:24 +0100858$(eval $(call gb_Helper_register_packages_for_install,ure,\
Michael Stahl84b0f062017-09-14 14:54:07 +0200859 libxml2 \
Michael Stahl64ea9942014-03-14 11:48:24 +0100860))
861
Michael Stahlc74af0d2011-04-01 20:49:35 +0000862define gb_LinkTarget__use_libxml2
Michael Stahl84b0f062017-09-14 14:54:07 +0200863$(call gb_LinkTarget_use_package,$(1),libxml2)
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500864$(call gb_LinkTarget_set_include,$(1),\
865 $$(INCLUDE) \
David Tardon7515b1a2014-07-17 17:27:05 +0200866 $(LIBXML_CFLAGS) \
867)
868
869$(call gb_LinkTarget_add_libs,$(1),\
870 $(LIBXML_LIBS) \
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500871)
872
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200873ifeq ($(COM),MSC)
David Tardon7515b1a2014-07-17 17:27:05 +0200874$(call gb_LinkTarget_use_external,$(1),icu_headers)
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200875endif
876
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500877endef
878define gb_ExternalProject__use_libxml2
Michael Stahl84b0f062017-09-14 14:54:07 +0200879$(call gb_ExternalProject_use_package,$(1),libxml2)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100880
David Tardon7515b1a2014-07-17 17:27:05 +0200881ifeq ($(COM),MSC)
Michael Stahl0c3838b2018-01-19 14:13:34 +0100882$(call gb_ExternalProject_use_packages,$(1),icu icu_ure)
David Tardon7515b1a2014-07-17 17:27:05 +0200883endif
884
Michael Stahlc74af0d2011-04-01 20:49:35 +0000885endef
886
887endif # SYSTEM_LIBXML
888
889
Michael Stahle3abec32014-02-11 15:57:18 +0100890ifneq ($(SYSTEM_LIBXSLT),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000891
892define gb_LinkTarget__use_libxslt
893$(call gb_LinkTarget_set_include,$(1),\
894 $$(INCLUDE) \
895 $(LIBXSLT_CFLAGS) \
896)
897$(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +0100898
Michael Stahlc74af0d2011-04-01 20:49:35 +0000899endef
900
David Tardonab03e872012-08-15 07:20:13 +0200901define gb_LinkTarget__use_libexslt
902$(call gb_LinkTarget_set_include,$(1),\
903 $$(INCLUDE) \
904 $(LIBEXSLT_CFLAGS) \
905)
906
907$(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
908
909endef
910
Michael Stahlc74af0d2011-04-01 20:49:35 +0000911else # !SYSTEM_LIBXSLT
912
Michael Stahl32a617d2014-02-17 11:23:19 +0100913$(eval $(call gb_Helper_register_packages_for_install,ooo,\
Michael Stahl15b973e2017-09-14 15:26:10 +0200914 libxslt \
Michael Stahl32a617d2014-02-17 11:23:19 +0100915))
916
Michael Stahlc74af0d2011-04-01 20:49:35 +0000917define gb_LinkTarget__use_libxslt
Michael Stahl15b973e2017-09-14 15:26:10 +0200918$(call gb_LinkTarget_use_package,$(1),libxslt)
Peter Foley856c0752013-02-02 15:44:30 -0500919$(call gb_LinkTarget_set_include,$(1),\
920 $$(INCLUDE) \
Michael Stahl15b973e2017-09-14 15:26:10 +0200921 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
Peter Foley856c0752013-02-02 15:44:30 -0500922)
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200923
924ifeq ($(COM),MSC)
925$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahl15b973e2017-09-14 15:26:10 +0200926 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libxslt.lib \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000927)
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200928else
929$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahl15b973e2017-09-14 15:26:10 +0200930 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libxslt/.libs -lxslt \
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200931)
932endif
Caolán McNamara6bccd202011-07-25 22:10:33 +0100933
Michael Stahlc74af0d2011-04-01 20:49:35 +0000934endef
935
David Tardonab03e872012-08-15 07:20:13 +0200936define gb_LinkTarget__use_libexslt
Michael Stahl15b973e2017-09-14 15:26:10 +0200937$(call gb_LinkTarget_use_package,$(1),libxslt)
Peter Foley856c0752013-02-02 15:44:30 -0500938$(call gb_LinkTarget_set_include,$(1),\
939 $$(INCLUDE) \
Michael Stahl15b973e2017-09-14 15:26:10 +0200940 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
Peter Foley856c0752013-02-02 15:44:30 -0500941)
942
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200943ifeq ($(COM),MSC)
944$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahl15b973e2017-09-14 15:26:10 +0200945 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libexslt.lib \
David Tardonab03e872012-08-15 07:20:13 +0200946)
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200947else
948$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahl15b973e2017-09-14 15:26:10 +0200949 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libexslt/.libs -lexslt \
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200950)
951endif
David Tardonab03e872012-08-15 07:20:13 +0200952
953endef
954
Michael Stahlc74af0d2011-04-01 20:49:35 +0000955endif # SYSTEM_LIBXSLT
956
Jan Holesovsky6a7b32b02012-08-10 10:27:54 +0200957
Miklos Vajnaab50f0b2017-06-21 21:59:11 +0200958ifneq ($(SYSTEM_XMLSEC),)
959
960define gb_LinkTarget__use_xmlsec
961$(call gb_LinkTarget_add_defs,$(1),\
962 -DSYSTEM_XMLSEC \
963)
964$(call gb_LinkTarget_set_include,$(1),\
965 $$(INCLUDE) \
966 $(XMLSEC_CFLAGS) \
967)
968$(call gb_LinkTarget_add_libs,$(1),$(XMLSEC_LIBS))
969
970endef
971
972gb_ExternalProject__use_xmlsec:=
973
974else # !SYSTEM_XMLSEC
975
976$(eval $(call gb_Helper_register_packages_for_install,ooo,\
977 xmlsec \
978))
979
980define gb_LinkTarget__use_xmlsec
981
982endef
983
984endif # SYSTEM_XMLSEC
985
Michael Stahl49dde4c2014-02-11 19:42:28 +0100986ifneq ($(SYSTEM_LIBLANGTAG),)
Eike Rathkea774a482012-08-06 19:22:43 +0200987
988define gb_LinkTarget__use_liblangtag
989$(call gb_LinkTarget_set_include,$(1),\
990 $$(INCLUDE) \
991 $(LIBLANGTAG_CFLAGS) \
992)
993
994$(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
995
996endef
997
David Tardonc2a119b2016-01-13 14:24:31 +0100998gb_ExternalProject__use_liblangtag :=
999
Eike Rathkea774a482012-08-06 19:22:43 +02001000else # !SYSTEM_LIBLANGTAG
1001
Stephan Bergmann475e4b42016-10-25 16:46:35 +02001002$(eval $(call gb_Helper_register_packages_for_install,ure,\
Michael Stahl01adcd82014-03-18 17:38:06 +01001003 liblangtag_data \
1004))
1005
David Tardon7d93bb82016-01-13 15:45:17 +01001006ifeq ($(COM),MSC)
1007
Eike Rathkea774a482012-08-06 19:22:43 +02001008define gb_LinkTarget__use_liblangtag
Peter Foley782151a2012-11-11 16:02:36 -05001009$(call gb_LinkTarget_set_include,$(1),\
David Tardon34513502016-01-13 14:21:10 +01001010 $(LIBLANGTAG_CFLAGS) \
Peter Foley782151a2012-11-11 16:02:36 -05001011 $$(INCLUDE) \
1012)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001013$(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
Michael Stahl0bb76482017-09-14 12:20:31 +02001014$(call gb_LinkTarget_use_external_project,$(1),liblangtag)
Eike Rathkea774a482012-08-06 19:22:43 +02001015
1016endef
1017
David Tardon7d93bb82016-01-13 15:45:17 +01001018else
1019
Stephan Bergmann475e4b42016-10-25 16:46:35 +02001020$(eval $(call gb_Helper_register_packages_for_install,ure,\
David Tardon7d93bb82016-01-13 15:45:17 +01001021 liblangtag \
1022))
1023
1024define gb_LinkTarget__use_liblangtag
1025$(call gb_LinkTarget_set_include,$(1),\
1026 $(LIBLANGTAG_CFLAGS) \
1027 $$(INCLUDE) \
1028)
1029$(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1030$(call gb_LinkTarget_use_package,$(1),liblangtag)
1031
1032endef
1033
1034endif # MSC
1035
David Tardonc2a119b2016-01-13 14:24:31 +01001036define gb_ExternalProject__use_liblangtag
Michael Stahl0bb76482017-09-14 12:20:31 +02001037$(call gb_ExternalProject_use_external_project,$(1),liblangtag)
David Tardonc2a119b2016-01-13 14:24:31 +01001038
1039endef
1040
Eike Rathkea774a482012-08-06 19:22:43 +02001041endif # SYSTEM_LIBLANGTAG
1042
Jan Holesovsky6a7b32b02012-08-10 10:27:54 +02001043
Matúš Kukandcae0502014-02-25 21:47:33 +01001044gb_ExternalProject__use_apr :=
1045
1046ifeq ($(WITH_WEBDAV),serf)
Matúš Kukan0b272532014-02-06 12:28:36 +01001047
1048define gb_LinkTarget__use_apr
1049$(call gb_LinkTarget_set_include,$(1),\
1050 $$(INCLUDE) \
1051 $(APR_CFLAGS) \
1052)
1053$(call gb_LinkTarget_add_libs,$(1),\
1054 $(APR_LIBS) \
Michael Stahl5cf22052014-06-05 13:35:14 +02001055 $(if $(filter $(OS),LINUX),-lpthread) \
1056 $(if $(filter $(OS),MACOSX),-liconv) \
Matúš Kukan0b272532014-02-06 12:28:36 +01001057)
1058
1059ifeq ($(SYSTEM_APR),)
1060$(call gb_LinkTarget_use_system_win32_libs,$(1),\
1061 mswsock \
1062 rpcrt4 \
1063 shell32 \
1064)
1065$(call gb_LinkTarget_add_defs,$(1),\
1066 -DAPR_DECLARE_STATIC \
1067 -DAPU_DECLARE_STATIC \
1068)
1069$(call gb_LinkTarget_use_external_project,$(1),apr_util)
1070endif
1071
1072endef
1073
1074define gb_ExternalProject__use_apr
1075ifeq ($(SYSTEM_APR),)
1076$(call gb_ExternalProject_use_external_project,$(1),apr_util)
1077endif
1078
1079endef
1080
1081define gb_LinkTarget__use_serf
1082$(call gb_LinkTarget_set_include,$(1),\
1083 $(SERF_CFLAGS) \
1084 $$(INCLUDE) \
1085)
1086$(call gb_LinkTarget_add_libs,$(1),\
1087 $(SERF_LIBS) \
1088)
1089
1090ifeq ($(SYSTEM_SERF),)
1091$(call gb_LinkTarget_use_external_project,$(1),serf)
1092endif
1093
1094endef
1095
Matúš Kukandcae0502014-02-25 21:47:33 +01001096else ifeq ($(WITH_WEBDAV),neon)
Eike Rathkea774a482012-08-06 19:22:43 +02001097
Michael Stahle3abec32014-02-11 15:57:18 +01001098ifneq ($(SYSTEM_NEON),)
Matúš Kukan464b4332012-01-15 02:12:49 +01001099
1100define gb_LinkTarget__use_neon
Matúš Kukan464b4332012-01-15 02:12:49 +01001101$(call gb_LinkTarget_add_defs,$(1),\
1102 -DNEON_VERSION=0x$(NEON_VERSION) \
David Tardonb74bf412013-08-12 09:39:59 +02001103 -DSYSTEM_NEON \
Matúš Kukan464b4332012-01-15 02:12:49 +01001104)
Matúš Kukan464b4332012-01-15 02:12:49 +01001105$(call gb_LinkTarget_set_include,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +01001106 $$(INCLUDE) \
Caolán McNamara1ac9ccf2012-01-16 08:57:38 +00001107 $(NEON_CFLAGS) \
Matúš Kukan464b4332012-01-15 02:12:49 +01001108)
1109
1110$(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
1111
1112endef
1113
1114else # !SYSTEM_NEON
1115
Marcos Paulo de Souzaf70343b2014-02-12 06:53:02 -02001116$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
Matúš Kukan464b4332012-01-15 02:12:49 +01001117 neon \
1118))
1119
1120define gb_LinkTarget__use_neon
Matúš Kukan7a030392012-10-29 23:29:37 +01001121$(call gb_LinkTarget_use_unpacked,$(1),neon)
Matúš Kukan464b4332012-01-15 02:12:49 +01001122$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001123 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
Matúš Kukan464b4332012-01-15 02:12:49 +01001124 $$(INCLUDE) \
1125)
Michael Stahlc923f7d2012-04-07 23:22:08 +02001126$(call gb_LinkTarget_use_libraries,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +01001127 neon \
1128)
1129
1130endef
1131
1132endif # SYSTEM_NEON
1133
Matúš Kukandcae0502014-02-25 21:47:33 +01001134endif # WITH_WEBDAV
Matúš Kukan464b4332012-01-15 02:12:49 +01001135
Michael Stahle3abec32014-02-11 15:57:18 +01001136ifneq ($(SYSTEM_REDLAND),)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001137
1138define gb_LinkTarget__use_librdf
Michael Stahla88ef232011-04-13 16:11:41 +00001139$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +00001140 -DSYSTEM_REDLAND \
1141)
1142$(call gb_LinkTarget_set_include,$(1),\
1143 $$(INCLUDE) \
1144 $(REDLAND_CFLAGS) \
1145)
1146$(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +01001147
Michael Stahlc74af0d2011-04-01 20:49:35 +00001148endef
1149
Peter Foley18bd1e72012-12-27 18:04:21 -05001150gb_LinkTarget__use_redland_headers:=
1151
1152gb_LinkTarget__use_raptor_headers:=
1153
1154gb_LinkTarget__use_rasqal_headers:=
1155
Michael Stahlc74af0d2011-04-01 20:49:35 +00001156else # !SYSTEM_REDLAND
1157
Peter Foley18bd1e72012-12-27 18:04:21 -05001158define gb_LinkTarget__use_redland_headers
1159$(call gb_LinkTarget_set_include,$(1),\
Michael Stahld719c012013-04-01 12:41:18 +02001160 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
Peter Foley18bd1e72012-12-27 18:04:21 -05001161 $$(INCLUDE) \
1162)
1163
1164endef
1165
1166define gb_LinkTarget__use_raptor_headers
1167$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001168 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
Peter Foley18bd1e72012-12-27 18:04:21 -05001169 $$(INCLUDE) \
1170)
1171
1172endef
1173
1174define gb_LinkTarget__use_rasqal_headers
1175$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001176 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
Peter Foley18bd1e72012-12-27 18:04:21 -05001177 $$(INCLUDE) \
1178)
1179
1180endef
1181
Tor Lillqvist9a42ca72012-04-19 21:45:14 +03001182ifneq ($(OS),ANDROID)
1183
Michael Stahl5f9cda22013-11-01 15:43:47 +01001184ifeq ($(COM),MSC)
Michael Stahlae8e5792014-01-10 12:07:31 +01001185$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
David Tardon491dea02013-05-01 11:23:50 +02001186 raptor2 \
1187 rasqal \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001188 rdf \
1189))
Michael Stahl5ae30d32014-03-13 19:32:13 +01001190else
1191$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1192 raptor \
1193 rasqal \
1194 redland \
1195))
Michael Stahl5f9cda22013-11-01 15:43:47 +01001196endif
Michael Stahlc74af0d2011-04-01 20:49:35 +00001197
1198define gb_LinkTarget__use_librdf
Michael Stahl831aaef2013-10-24 01:09:35 +02001199ifeq ($(COM),MSC)
1200$(call gb_LinkTarget_use_libraries,$(1),\
1201 raptor2 \
1202 rdf \
1203)
1204else
Caolán McNamara87114362016-12-19 21:17:48 +00001205$(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
Matúš Kukan85d1e392013-12-14 11:17:30 +01001206
Michael Stahl2793c542013-10-23 21:18:24 +02001207$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahl2793c542013-10-23 21:18:24 +02001208 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
Caolán McNamara87114362016-12-19 21:17:48 +00001209 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1210 -L$(call gb_UnpackedTarball_get_dir,rasqal)/src/.libs -lrasqal \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001211)
Michael Stahl831aaef2013-10-24 01:09:35 +02001212endif
Caolán McNamara6bccd202011-07-25 22:10:33 +01001213
Michael Stahlc74af0d2011-04-01 20:49:35 +00001214endef
1215
Tor Lillqvist9a42ca72012-04-19 21:45:14 +03001216else # ANDROID
1217
Tor Lillqvist9a42ca72012-04-19 21:45:14 +03001218define gb_LinkTarget__use_librdf
Caolán McNamara87114362016-12-19 21:17:48 +00001219$(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
Tor Lillqvist9a42ca72012-04-19 21:45:14 +03001220
1221endef
1222
1223endif # ANDROID
1224
Michael Stahlc74af0d2011-04-01 20:49:35 +00001225endif # SYSTEM_REDLAND
1226
1227
Noel Grandin2b5812e2018-08-26 17:22:56 +02001228ifneq ($(USING_X11)$(ENABLE_CAIRO_CANVAS)$(DISABLE_GUI),) # or
Michael Stahl32a617d2014-02-17 11:23:19 +01001229
Michael Stahl5c0e6d82014-02-11 17:03:53 +01001230ifneq ($(SYSTEM_CAIRO),)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001231
Michael Stahlc74af0d2011-04-01 20:49:35 +00001232define gb_LinkTarget__use_cairo
1233$(call gb_LinkTarget_set_include,$(1),\
1234 $$(INCLUDE) \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001235 $(CAIRO_CFLAGS) \
1236)
David Tardon962771f2013-05-24 14:35:18 +02001237$(call gb_LinkTarget_use_external,$(1),freetype_headers)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001238$(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +01001239
Michael Stahlc74af0d2011-04-01 20:49:35 +00001240endef
1241
Michael Stahl5c0e6d82014-02-11 17:03:53 +01001242else # !SYSTEM_CAIRO
Michael Stahlc74af0d2011-04-01 20:49:35 +00001243
Michael Stahl32a617d2014-02-17 11:23:19 +01001244$(eval $(call gb_Helper_register_packages_for_install,ooo,\
1245 cairo \
1246 $(if $(filter $(OS),WNT),,pixman) \
1247))
1248
Michael Stahlc74af0d2011-04-01 20:49:35 +00001249define gb_LinkTarget__use_cairo
Michael Stahlde142202012-11-20 22:05:36 +01001250$(call gb_LinkTarget_use_package,$(1),cairo)
1251$(call gb_LinkTarget_use_package,$(1),pixman)
David Tardon962771f2013-05-24 14:35:18 +02001252$(call gb_LinkTarget_use_external,$(1),freetype_headers)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001253$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001254 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1255 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
Matúš Kukan2cb7ba12012-11-10 22:14:42 +01001256 $$(INCLUDE) \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001257)
Michael Stahld89f48b2013-10-23 21:27:05 +02001258$(call gb_LinkTarget_add_libs,$(1),\
1259 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
Matúš Kukan2cb7ba12012-11-10 22:14:42 +01001260 $(if $(filter-out MACOSX WNT,$(OS)), \
Michael Stahld89f48b2013-10-23 21:27:05 +02001261 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
Matúš Kukan2cb7ba12012-11-10 22:14:42 +01001262 ) \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001263)
Caolán McNamara5bb76f62011-07-25 21:50:34 +01001264
Michael Stahlc74af0d2011-04-01 20:49:35 +00001265endef
1266
1267endif # SYSTEM_CAIRO
1268
Caolán McNamarafb7d4ba2015-11-16 13:40:22 +00001269else ifeq ($(OS),ANDROID)
1270
1271define gb_LinkTarget__use_cairo
1272$(call gb_LinkTarget_use_package,$(1),cairo)
1273$(call gb_LinkTarget_use_package,$(1),pixman)
1274$(call gb_LinkTarget_use_external,$(1),freetype_headers)
1275$(call gb_LinkTarget_set_include,$(1),\
1276 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1277 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1278 $$(INCLUDE) \
1279)
1280$(call gb_LinkTarget_add_libs,$(1),\
1281 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1282 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1283)
1284
1285endef
1286
Michael Stahl32a617d2014-02-17 11:23:19 +01001287endif # CAIRO
1288
Michael Stahl379f9782014-02-11 16:49:19 +01001289ifneq ($(SYSTEM_FREETYPE),)
David Tardon962771f2013-05-24 14:35:18 +02001290
1291define gb_LinkTarget__use_freetype_headers
Caolán McNamarab41ae462011-07-25 22:24:27 +01001292$(call gb_LinkTarget_set_include,$(1),\
1293 $$(INCLUDE) \
1294 $(FREETYPE_CFLAGS) \
1295)
Tor Lillqvist0d1c24e2012-04-19 21:10:00 +03001296
David Tardon962771f2013-05-24 14:35:18 +02001297endef
1298
Michael Stahle568d2a2013-09-30 14:10:22 +02001299gb_ExternalProject__use_freetype :=
1300
Caolán McNamara6cb661f2016-12-19 08:59:02 +00001301else
David Tardon962771f2013-05-24 14:35:18 +02001302
1303define gb_LinkTarget__use_freetype_headers
Michael Stahlb242cee82013-10-24 12:08:50 +02001304$(call gb_LinkTarget_use_external_project,$(1),freetype)
David Tardon962771f2013-05-24 14:35:18 +02001305$(call gb_LinkTarget_set_include,$(1),\
David Tardone0603172017-02-02 13:31:13 +01001306 $(FREETYPE_CFLAGS) \
David Tardon962771f2013-05-24 14:35:18 +02001307 $$(INCLUDE) \
1308)
1309
David Tardon61695f12013-05-24 17:15:20 +02001310endef
1311
Michael Stahle568d2a2013-09-30 14:10:22 +02001312define gb_ExternalProject__use_freetype
Michael Stahlb242cee82013-10-24 12:08:50 +02001313$(call gb_ExternalProject_use_external_project,$(1),freetype)
Michael Stahle568d2a2013-09-30 14:10:22 +02001314
1315endef
1316
David Tardon962771f2013-05-24 14:35:18 +02001317endif # SYSTEM_FREETYPE
1318
David Tardone0603172017-02-02 13:31:13 +01001319define gb_LinkTarget__use_freetype
1320$(call gb_LinkTarget_use_external,$(1),freetype_headers)
1321$(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1322
1323endef
1324
Michael Stahl04ff5352014-02-11 16:21:04 +01001325ifneq ($(SYSTEM_FONTCONFIG),)
David Tardon4eb68422013-05-24 14:16:03 +02001326
Caolán McNamarab41ae462011-07-25 22:24:27 +01001327define gb_LinkTarget__use_fontconfig
1328$(call gb_LinkTarget_set_include,$(1),\
1329 $$(INCLUDE) \
1330 $(FONTCONFIG_CFLAGS) \
1331)
Tor Lillqvist0d1c24e2012-04-19 21:10:00 +03001332
Caolán McNamarab41ae462011-07-25 22:24:27 +01001333$(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1334
1335endef
Michael Stahlc74af0d2011-04-01 20:49:35 +00001336
Caolán McNamara6cb661f2016-12-19 08:59:02 +00001337else
David Tardon4eb68422013-05-24 14:16:03 +02001338
David Tardon4eb68422013-05-24 14:16:03 +02001339define gb_LinkTarget__use_fontconfig
Michael Stahl76596b32013-10-24 11:01:41 +02001340$(call gb_LinkTarget_use_external_project,$(1),fontconfig)
David Tardon4eb68422013-05-24 14:16:03 +02001341$(call gb_LinkTarget_set_include,$(1),\
1342 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1343 $$(INCLUDE) \
1344)
1345
Caolán McNamara1ad871c2016-12-20 11:37:13 +00001346$(call gb_LinkTarget_add_libs,$(1),\
1347 -L$(call gb_UnpackedTarball_get_dir,fontconfig)/src/.libs -lfontconfig \
1348)
Caolán McNamara6cb661f2016-12-19 08:59:02 +00001349
David Tardon4eb68422013-05-24 14:16:03 +02001350endef
1351
1352endif # SYSTEM_FONTCONFIG
1353
Michael Stahle3abec32014-02-11 15:57:18 +01001354ifneq ($(SYSTEM_GRAPHITE),)
Michael Stahl87e44332011-04-13 16:11:39 +00001355
Michael Stahl87e44332011-04-13 16:11:39 +00001356define gb_LinkTarget__use_graphite
Michael Stahl87e44332011-04-13 16:11:39 +00001357$(call gb_LinkTarget_set_include,$(1),\
1358 $$(INCLUDE) \
1359 $(GRAPHITE_CFLAGS) \
1360)
1361$(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +01001362
Michael Stahl87e44332011-04-13 16:11:39 +00001363endef
1364
Khaled Hosny9de76cb2016-09-23 18:34:09 +02001365gb_ExternalProject__use_graphite:=
1366
Michael Stahle3abec32014-02-11 15:57:18 +01001367else # !SYSTEM_GRAPHITE
Michael Stahl87e44332011-04-13 16:11:39 +00001368
Michael Stahl87e44332011-04-13 16:11:39 +00001369define gb_LinkTarget__use_graphite
Matúš Kukan7a030392012-10-29 23:29:37 +01001370$(call gb_LinkTarget_use_unpacked,$(1),graphite)
Matúš Kukan1ceb47d2012-10-25 09:55:13 +02001371$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001372 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
Matúš Kukan1ceb47d2012-10-25 09:55:13 +02001373 $$(INCLUDE) \
1374)
Michael Stahlc923f7d2012-04-07 23:22:08 +02001375$(call gb_LinkTarget_use_static_libraries,$(1),\
Matúš Kukan1ceb47d2012-10-25 09:55:13 +02001376 graphite \
Michael Stahl87e44332011-04-13 16:11:39 +00001377)
Caolán McNamara6bccd202011-07-25 22:10:33 +01001378
Michael Stahl87e44332011-04-13 16:11:39 +00001379endef
1380
Khaled Hosny9de76cb2016-09-23 18:34:09 +02001381define gb_ExternalProject__use_graphite
David Tardonb5c566f2016-11-03 17:23:56 +01001382$(call gb_ExternalProject_use_static_libraries,$(1),\
1383 graphite \
1384)
Khaled Hosny9de76cb2016-09-23 18:34:09 +02001385
1386endef
Michael Stahl87e44332011-04-13 16:11:39 +00001387endif # SYSTEM_GRAPHITE
1388
Michael Stahl187194b2014-02-11 19:17:42 +01001389ifneq ($(SYSTEM_ICU),)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001390
Peter Foleyb92a0d92012-12-25 17:39:43 -05001391gb_LinkTarget__use_icu_headers:=
Fridrich Štrba8e9675d2013-01-25 10:55:04 +01001392gb_ExternalProject__use_icu:=
Peter Foleyb92a0d92012-12-25 17:39:43 -05001393
Matúš Kukan6fad1752011-08-11 12:42:39 +02001394define gb_LinkTarget__use_icudata
1395$(call gb_LinkTarget_add_libs,$(1),-licudata)
1396
1397endef
David Tardon1a852392011-07-26 09:58:54 +02001398define gb_LinkTarget__use_icui18n
1399$(call gb_LinkTarget_add_libs,$(1),-licui18n)
Matúš Kukan6fad1752011-08-11 12:42:39 +02001400
David Tardon1a852392011-07-26 09:58:54 +02001401endef
Michael Stahlc74af0d2011-04-01 20:49:35 +00001402define gb_LinkTarget__use_icuuc
1403$(call gb_LinkTarget_add_libs,$(1),-licuuc)
Caolán McNamara6bccd202011-07-25 22:10:33 +01001404
Michael Stahlc74af0d2011-04-01 20:49:35 +00001405endef
1406
1407else # !SYSTEM_ICU
1408
Michael Stahl057613c2014-07-24 00:22:51 +02001409$(eval $(call gb_Helper_register_packages_for_install,ure, \
1410 icu_ure \
1411))
1412
Michael Stahle7592692014-03-14 11:23:52 +01001413$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1414 icu \
1415))
1416
Tor Lillqvist084db5f2012-09-24 10:37:25 +03001417ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
Tor Lillqvist8a3ea752011-11-21 14:25:37 +02001418gb_ICU_suffix:=lo
1419else
1420gb_ICU_suffix:=
1421endif
1422
Peter Foleyb92a0d92012-12-25 17:39:43 -05001423define gb_LinkTarget__use_icu_headers
Peter Foleyce9bf0f2013-03-23 12:32:31 -04001424$(call gb_LinkTarget_use_unpacked,$(1),icu)
Peter Foleyb92a0d92012-12-25 17:39:43 -05001425$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001426 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1427 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1428 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
Peter Foleyb92a0d92012-12-25 17:39:43 -05001429 $$(INCLUDE) \
1430)
1431
1432endef
1433
Fridrich Štrba8e9675d2013-01-25 10:55:04 +01001434define gb_ExternalProject__use_icu
1435$(call gb_ExternalProject_use_package,$(1),icu)
Fridrich Štrba851ca9c2013-01-25 10:29:59 +01001436
1437endef
1438
Peter Foleyf7452122012-11-04 08:46:44 -05001439# icudata and icui18n is called icudt and icuin when built with MSVC :-/
Michael Stahla92f80f2013-10-23 15:00:29 +02001440define gb_LinkTarget__use_icudata
Stephan Bergmann475e4b42016-10-25 16:46:35 +02001441$(call gb_LinkTarget_use_package,$(1),icu_ure)
Michael Stahla92f80f2013-10-23 15:00:29 +02001442
1443ifeq ($(OS),WNT)
1444$(call gb_LinkTarget_add_libs,$(1),\
1445 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
Matúš Kukan6fad1752011-08-11 12:42:39 +02001446)
Michael Stahla92f80f2013-10-23 15:00:29 +02001447else
1448$(call gb_LinkTarget_add_libs,$(1),\
1449 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1450)
1451endif
Matúš Kukan6fad1752011-08-11 12:42:39 +02001452
1453endef
Michael Stahla92f80f2013-10-23 15:00:29 +02001454
1455define gb_LinkTarget__use_icui18n
1456$(call gb_LinkTarget_use_package,$(1),icu)
1457
1458ifeq ($(OS),WNT)
1459$(call gb_LinkTarget_add_libs,$(1),\
1460 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1461)
1462else
1463$(call gb_LinkTarget_add_libs,$(1),\
1464 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1465)
1466endif
1467
1468endef
1469
Michael Stahlc74af0d2011-04-01 20:49:35 +00001470define gb_LinkTarget__use_icuuc
Stephan Bergmann475e4b42016-10-25 16:46:35 +02001471$(call gb_LinkTarget_use_package,$(1),icu_ure)
Michael Stahla92f80f2013-10-23 15:00:29 +02001472
1473ifeq ($(OS),WNT)
1474$(call gb_LinkTarget_add_libs,$(1),\
1475 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001476)
Michael Stahla92f80f2013-10-23 15:00:29 +02001477else
1478$(call gb_LinkTarget_add_libs,$(1),\
1479 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1480)
1481endif
Caolán McNamara6bccd202011-07-25 22:10:33 +01001482
Michael Stahlc74af0d2011-04-01 20:49:35 +00001483endef
1484
1485endif # SYSTEM_ICU
1486
Michael Stahle3abec32014-02-11 15:57:18 +01001487ifneq ($(SYSTEM_HARFBUZZ),)
Khaled Hosny7e389f42013-04-20 13:00:56 +02001488
1489define gb_LinkTarget__use_harfbuzz
1490$(call gb_LinkTarget_set_include,$(1),\
1491 $$(INCLUDE) \
1492 $(HARFBUZZ_CFLAGS) \
1493)
1494$(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1495
1496endef
1497
David Tardoncc96f0c2017-02-01 12:32:35 +01001498gb_ExternalProject__use_harfbuzz :=
1499
Michael Stahle3abec32014-02-11 15:57:18 +01001500else # SYSTEM_HARFBUZZ != TRUE
Khaled Hosny7e389f42013-04-20 13:00:56 +02001501
Khaled Hosny7e389f42013-04-20 13:00:56 +02001502define gb_LinkTarget__use_harfbuzz
Michael Stahl8db02752013-05-07 23:28:45 +02001503$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl2f6261f2013-09-19 19:28:36 +02001504 $(HARFBUZZ_CFLAGS) \
Michael Stahl8db02752013-05-07 23:28:45 +02001505 $$(INCLUDE) \
1506)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001507$(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
Stephan Bergmann0a554242018-09-22 17:30:36 +02001508$(call gb_LinkTarget_use_external,$(1),icuuc)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001509$(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
Khaled Hosny7e389f42013-04-20 13:00:56 +02001510
1511endef
1512
David Tardoncc96f0c2017-02-01 12:32:35 +01001513define gb_ExternalProject__use_harfbuzz
1514$(call gb_ExternalProject_use_external_project,$(1),harfbuzz)
1515
1516endef
1517
Khaled Hosny7e389f42013-04-20 13:00:56 +02001518endif # SYSTEM_HARFBUZZ
Michael Stahl4a8919f2011-04-18 11:13:57 +00001519
Norbert Thiebaudbf6d1f72013-08-31 18:55:53 -05001520ifeq ($(DISABLE_OPENSSL),TRUE)
Andres Gomeze3f607e2013-04-11 10:24:25 +03001521
1522gb_ExternalProject__use_openssl:=
1523gb_LinkTarget__use_openssl_headers:=
1524gb_LinkTarget__use_openssl:=
1525
1526else # !DISABLE_OPENSSL
1527
Michael Stahle3abec32014-02-11 15:57:18 +01001528ifneq ($(SYSTEM_OPENSSL),)
Michael Stahl4a8919f2011-04-18 11:13:57 +00001529
Peter Foley9ddba662012-12-28 11:19:06 -05001530gb_LinkTarget__use_openssl_headers:=
1531gb_ExternalProject__use_openssl:=
1532
Michael Stahl4a8919f2011-04-18 11:13:57 +00001533define gb_LinkTarget__use_openssl
1534$(call gb_LinkTarget_set_include,$(1),\
1535 $$(INCLUDE) \
1536 $(OPENSSL_CFLAGS) \
1537)
1538$(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +01001539
Michael Stahl4a8919f2011-04-18 11:13:57 +00001540endef
1541
1542else # !SYSTEM_OPENSSL
1543
Michael Stahlf921e262014-03-13 19:36:48 +01001544$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1545 openssl \
1546))
1547
Peter Foley9ddba662012-12-28 11:19:06 -05001548define gb_ExternalProject__use_openssl
1549$(call gb_ExternalProject_use_package,$(1),openssl)
1550
1551endef
1552
1553define gb_LinkTarget__use_openssl_headers
Michael Stahlc7ca0712016-03-07 21:18:23 +01001554$(call gb_LinkTarget_use_external_project,$(1),openssl)
Peter Foley9ddba662012-12-28 11:19:06 -05001555$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001556 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
Peter Foley9ddba662012-12-28 11:19:06 -05001557 $$(INCLUDE) \
1558)
1559
1560endef
1561
Michael Stahl4a8919f2011-04-18 11:13:57 +00001562define gb_LinkTarget__use_openssl
Peter Foley9ddba662012-12-28 11:19:06 -05001563$(call gb_LinkTarget_use_package,$(1),openssl)
Michael Stahl4a8919f2011-04-18 11:13:57 +00001564ifeq ($(OS),WNT)
Michael Stahl5b906622013-10-24 00:22:20 +02001565$(call gb_LinkTarget_add_libs,$(1),\
1566 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/ssleay32.lib \
1567 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/libeay32.lib \
Michael Stahl4a8919f2011-04-18 11:13:57 +00001568)
1569else
Michael Stahl2f6261f2013-09-19 19:28:36 +02001570$(call gb_LinkTarget_add_libs,$(1),\
1571 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1572 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
Michael Stahl4a8919f2011-04-18 11:13:57 +00001573)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001574$(call gb_LinkTarget_use_external_project,$(1),openssl)
Michael Stahl4a8919f2011-04-18 11:13:57 +00001575ifeq ($(OS),SOLARIS)
Michael Stahl80374352012-09-28 12:25:50 +02001576$(call gb_LinkTarget_add_libs,$(1),\
1577 -lnsl \
1578 -lsocket \
Michael Stahl4a8919f2011-04-18 11:13:57 +00001579)
1580endif
1581endif
Caolán McNamara6bccd202011-07-25 22:10:33 +01001582
Michael Stahl4a8919f2011-04-18 11:13:57 +00001583endef
1584
1585endif # SYSTEM_OPENSSL
Andres Gomeze3f607e2013-04-11 10:24:25 +03001586endif # DISABLE_OPENSSL
Michael Stahl4a8919f2011-04-18 11:13:57 +00001587
Matúš Kukanc4560482011-07-28 01:03:23 +02001588
Norbert Thiebaudbf6d1f72013-08-31 18:55:53 -05001589ifeq ($(DISABLE_OPENSSL),TRUE)
Andres Gomez48d49752013-04-11 10:32:54 +03001590
1591define gb_LinkTarget__use_gnutls
1592$(call gb_LinkTarget_set_include,$(1),\
1593 $$(INCLUDE) \
1594 $(GNUTLS_CFLAGS) \
1595)
1596
1597$(call gb_LinkTarget_add_defs,$(1),\
1598 -DDISABLE_OPENSSL \
1599)
1600
1601$(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1602
1603endef
1604
1605define gb_LinkTarget__use_libgcrypt
1606$(call gb_LinkTarget_set_include,$(1),\
1607 $$(INCLUDE) \
1608 $(LIBGCRYPT_CFLAGS) \
1609)
1610
1611$(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1612
1613endef
1614
1615else # !DISABLE_OPENSSL
1616
1617gb_LinkTarget__use_gnutls:=
1618gb_LinkTarget__use_libgcrypt:=
1619
1620endif # DISABLE_OPENSSL
1621
1622
Michael Stahle3abec32014-02-11 15:57:18 +01001623ifneq ($(SYSTEM_CDR),)
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001624
1625define gb_LinkTarget__use_cdr
1626$(call gb_LinkTarget_set_include,$(1),\
1627 $$(INCLUDE) \
1628 $(CDR_CFLAGS) \
1629)
1630$(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1631
1632endef
1633
Bjoern Michaelsenfb455e52013-02-19 11:22:02 +01001634else # !SYSTEM_CDR
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001635
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001636define gb_LinkTarget__use_cdr
David Tardonf16f3662013-05-24 13:48:03 +02001637$(call gb_LinkTarget_set_include,$(1),\
1638 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1639 $$(INCLUDE) \
1640)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001641$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001642 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrbab8f39c52012-10-05 13:32:14 +02001643)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001644$(call gb_LinkTarget_use_external_project,$(1),libcdr)
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001645endef
1646
Bjoern Michaelsenfb455e52013-02-19 11:22:02 +01001647endif # SYSTEM_CDR
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001648
1649
Michael Stahle3abec32014-02-11 15:57:18 +01001650ifneq ($(SYSTEM_EBOOK),)
David Tardon316be1b2013-11-09 15:52:36 +01001651
1652define gb_LinkTarget__use_ebook
1653$(call gb_LinkTarget_set_include,$(1),\
1654 $$(INCLUDE) \
1655 $(EBOOK_CFLAGS) \
1656)
1657$(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1658
1659endef
1660
1661gb_ExternalProject__use_ebook :=
1662
1663else # !SYSTEM_EBOOK
1664
1665define gb_LinkTarget__use_ebook
1666$(call gb_LinkTarget_set_include,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001667 -I${WORKDIR}/UnpackedTarball/libebook/inc \
David Tardon316be1b2013-11-09 15:52:36 +01001668 $$(INCLUDE) \
1669)
1670$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001671 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
David Tardon316be1b2013-11-09 15:52:36 +01001672)
1673$(call gb_LinkTarget_use_external_project,$(1),libebook)
1674
1675endef
1676
1677define gb_ExternalProject__use_ebook
1678$(call gb_ExternalProject_use_external_project,$(1),libebook)
1679
1680endef
1681
1682endif # SYSTEM_EBOOK
1683
1684
Michael Stahle3abec32014-02-11 15:57:18 +01001685ifneq ($(SYSTEM_ETONYEK),)
David Tardon08ca3e42013-10-24 16:46:49 +02001686
1687define gb_LinkTarget__use_etonyek
1688$(call gb_LinkTarget_set_include,$(1),\
1689 $$(INCLUDE) \
1690 $(ETONYEK_CFLAGS) \
1691)
1692$(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1693
1694endef
1695
1696gb_ExternalProject__use_etonyek :=
1697
1698else # !SYSTEM_ETONYEK
1699
David Tardon78deb812015-05-19 16:12:08 +02001700ifeq ($(COM),MSC)
1701
1702$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1703 etonyek \
1704))
1705
David Tardon08ca3e42013-10-24 16:46:49 +02001706define gb_LinkTarget__use_etonyek
1707$(call gb_LinkTarget_set_include,$(1),\
David Tardon78deb812015-05-19 16:12:08 +02001708 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1709 $$(INCLUDE) \
1710)
1711$(call gb_LinkTarget_use_libraries,$(1),\
1712 etonyek \
1713)
1714
1715endef
1716
1717else # !MSC
1718
1719$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1720 libetonyek \
1721))
1722
1723define gb_LinkTarget__use_etonyek
1724$(call gb_LinkTarget_use_package,$(1),libetonyek)
1725
1726$(call gb_LinkTarget_set_include,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001727 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
David Tardon78deb812015-05-19 16:12:08 +02001728 -DLIBETONYEK_VISIBILITY \
David Tardon08ca3e42013-10-24 16:46:49 +02001729 $$(INCLUDE) \
1730)
1731$(call gb_LinkTarget_add_libs,$(1),\
David Tardon78deb812015-05-19 16:12:08 +02001732 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
David Tardon08ca3e42013-10-24 16:46:49 +02001733)
1734$(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1735
1736endef
1737
1738define gb_ExternalProject__use_etonyek
1739$(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1740
1741endef
1742
David Tardon78deb812015-05-19 16:12:08 +02001743endif
1744
David Tardon08ca3e42013-10-24 16:46:49 +02001745endif # SYSTEM_ETONYEK
1746
1747
Michael Stahle3abec32014-02-11 15:57:18 +01001748ifneq ($(SYSTEM_FREEHAND),)
Fridrich Štrba67153d72013-10-31 12:42:50 +01001749
1750define gb_LinkTarget__use_freehand
1751$(call gb_LinkTarget_set_include,$(1),\
1752 $$(INCLUDE) \
1753 $(FREEHAND_CFLAGS) \
1754)
1755$(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1756
1757endef
1758
1759gb_ExternalProject__use_freehand :=
1760
1761else # !SYSTEM_FREEHAND
1762
1763define gb_LinkTarget__use_freehand
1764$(call gb_LinkTarget_set_include,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001765 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
Fridrich Štrba67153d72013-10-31 12:42:50 +01001766 $$(INCLUDE) \
1767)
1768$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001769 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba67153d72013-10-31 12:42:50 +01001770)
1771$(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1772
1773endef
1774
1775define gb_ExternalProject__use_freehand
1776$(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1777
1778endef
1779
1780endif # SYSTEM_FREEHAND
1781
1782
Michael Stahle3abec32014-02-11 15:57:18 +01001783ifneq ($(SYSTEM_ODFGEN),)
Fridrich Štrba93848e12013-05-02 20:25:51 +02001784
1785define gb_LinkTarget__use_odfgen
1786$(call gb_LinkTarget_set_include,$(1),\
1787 $$(INCLUDE) \
1788 $(ODFGEN_CFLAGS) \
1789)
1790$(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1791
1792endef
1793
1794else # !SYSTEM_ODFGEN
1795
David Tardon36c3f912014-05-24 09:13:33 +02001796ifeq ($(COM),MSC)
1797
1798$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1799 odfgen \
1800))
1801
Fridrich Štrba93848e12013-05-02 20:25:51 +02001802define gb_LinkTarget__use_odfgen
David Tardon0f8a90c2013-05-24 13:49:11 +02001803$(call gb_LinkTarget_set_include,$(1),\
1804 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1805 $$(INCLUDE) \
1806)
David Tardon36c3f912014-05-24 09:13:33 +02001807$(call gb_LinkTarget_use_libraries,$(1),\
1808 odfgen \
Fridrich Štrba93848e12013-05-02 20:25:51 +02001809)
Fridrich Štrba93848e12013-05-02 20:25:51 +02001810
1811endef
1812
David Tardon36c3f912014-05-24 09:13:33 +02001813else # !MSC
1814
1815$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1816 libodfgen \
1817))
1818
1819define gb_LinkTarget__use_odfgen
1820$(call gb_LinkTarget_use_package,$(1),libodfgen)
1821
1822$(call gb_LinkTarget_set_include,$(1),\
1823 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
Stephan Bergmannb6ee5cf2015-01-26 15:09:13 +01001824 -DLIBODFGEN_VISIBILITY \
David Tardon36c3f912014-05-24 09:13:33 +02001825 $$(INCLUDE) \
1826)
1827$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001828 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
David Tardon36c3f912014-05-24 09:13:33 +02001829)
1830
1831endef
1832
1833endif
1834
Fridrich Štrba93848e12013-05-02 20:25:51 +02001835endif # SYSTEM_ODFGEN
1836
Miklos Vajna3f163062017-08-02 16:29:48 +02001837ifneq ($(SYSTEM_EPUBGEN),)
1838
1839define gb_LinkTarget__use_epubgen
1840$(call gb_LinkTarget_set_include,$(1),\
1841 $$(INCLUDE) \
1842 $(EPUBGEN_CFLAGS) \
1843)
1844$(call gb_LinkTarget_add_libs,$(1),$(EPUBGEN_LIBS))
1845
1846endef
1847gb_ExternalProject__use_epubgen :=
1848
1849else # !SYSTEM_EPUBGEN
1850
1851define gb_LinkTarget__use_epubgen
1852$(call gb_LinkTarget_set_include,$(1),\
1853 -I$(call gb_UnpackedTarball_get_dir,libepubgen)/inc \
1854 $$(INCLUDE) \
1855)
1856$(call gb_LinkTarget_add_libs,$(1),\
Miklos Vajnab2b1debf2017-12-13 10:54:27 +01001857 $(call gb_UnpackedTarball_get_dir,libepubgen)/src/lib/.libs/libepubgen-0.1$(gb_StaticLibrary_PLAINEXT) \
Miklos Vajna3f163062017-08-02 16:29:48 +02001858)
1859$(call gb_LinkTarget_use_external_project,$(1),libepubgen)
1860
1861endef
1862define gb_ExternalProject__use_epubgen
1863$(call gb_ExternalProject_use_external_project,$(1),libepubgen)
1864
1865endef
1866
1867endif # SYSTEM_EPUBGEN
Fridrich Štrba93848e12013-05-02 20:25:51 +02001868
David Tardonb421ce72014-05-24 08:39:54 +02001869ifneq ($(SYSTEM_REVENGE),)
1870
1871define gb_LinkTarget__use_revenge
1872$(call gb_LinkTarget_set_include,$(1),\
1873 $$(INCLUDE) \
1874 $(REVENGE_CFLAGS) \
1875)
1876$(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1877
1878endef
1879
David Tardon7c9c7792014-05-25 13:06:57 +02001880gb_ExternalProject__use_revenge :=
1881
David Tardonb421ce72014-05-24 08:39:54 +02001882else # !SYSTEM_REVENGE
1883
1884ifeq ($(COM),MSC)
1885
1886$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1887 revenge \
1888))
1889
1890define gb_LinkTarget__use_revenge
1891$(call gb_LinkTarget_set_include,$(1),\
David Tardon0b7d0a82014-05-25 13:19:31 +02001892 $(REVENGE_CFLAGS) \
David Tardonb421ce72014-05-24 08:39:54 +02001893 $$(INCLUDE) \
1894)
1895$(call gb_LinkTarget_use_libraries,$(1),\
1896 revenge \
1897)
1898
1899endef
1900
David Tardon7c9c7792014-05-25 13:06:57 +02001901define gb_ExternalProject__use_revenge
1902$(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1903
1904endef
1905
David Tardonb421ce72014-05-24 08:39:54 +02001906else # !MSC
1907
1908$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1909 librevenge \
1910))
1911
1912define gb_LinkTarget__use_revenge
1913$(call gb_LinkTarget_use_package,$(1),librevenge)
1914
1915$(call gb_LinkTarget_set_include,$(1),\
David Tardon0b7d0a82014-05-25 13:19:31 +02001916 $(REVENGE_CFLAGS) \
Stephan Bergmannb6ee5cf2015-01-26 15:09:13 +01001917 -DLIBREVENGE_VISIBILITY \
David Tardonb421ce72014-05-24 08:39:54 +02001918 $$(INCLUDE) \
1919)
1920$(call gb_LinkTarget_add_libs,$(1),\
David Tardon0b7d0a82014-05-25 13:19:31 +02001921 $(REVENGE_LIBS) \
David Tardonb421ce72014-05-24 08:39:54 +02001922)
1923endef
1924
David Tardon7c9c7792014-05-25 13:06:57 +02001925define gb_ExternalProject__use_revenge
1926$(call gb_ExternalProject_use_package,$(1),librevenge)
1927
1928endef
1929
David Tardonb421ce72014-05-24 08:39:54 +02001930endif # MSC
1931
1932endif # SYSTEM_REVENGE
1933
1934
Michael Stahle3abec32014-02-11 15:57:18 +01001935ifneq ($(SYSTEM_ABW),)
Fridrich Štrba10eaaac2014-01-13 17:01:32 +01001936
1937define gb_LinkTarget__use_abw
1938$(call gb_LinkTarget_set_include,$(1),\
1939 $$(INCLUDE) \
1940 $(ABW_CFLAGS) \
1941)
1942$(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1943
1944endef
1945gb_ExternalProject__use_abw :=
1946
1947else # !SYSTEM_ABW
1948
1949define gb_LinkTarget__use_abw
1950$(call gb_LinkTarget_set_include,$(1),\
1951 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1952 $$(INCLUDE) \
1953)
1954$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001955 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba10eaaac2014-01-13 17:01:32 +01001956)
1957$(call gb_LinkTarget_use_external_project,$(1),libabw)
1958
1959endef
1960define gb_ExternalProject__use_abw
1961$(call gb_ExternalProject_use_external_project,$(1),libabw)
1962
1963endef
1964
1965endif # SYSTEM_ABW
1966
1967
Michael Stahle3abec32014-02-11 15:57:18 +01001968ifneq ($(SYSTEM_MSPUB),)
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001969
1970define gb_LinkTarget__use_mspub
1971$(call gb_LinkTarget_set_include,$(1),\
1972 $$(INCLUDE) \
1973 $(MSPUB_CFLAGS) \
1974)
1975$(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
1976
1977endef
1978
Bjoern Michaelsena4c80752013-02-19 11:22:51 +01001979else # !SYSTEM_MSPUB
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001980
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001981define gb_LinkTarget__use_mspub
Michael Stahl35ac39e2013-05-16 13:09:11 +02001982$(call gb_LinkTarget_set_include,$(1),\
1983 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
1984 $$(INCLUDE) \
1985)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001986$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001987 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba093a5c92013-01-28 10:13:50 +01001988)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001989$(call gb_LinkTarget_use_external_project,$(1),libmspub)
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001990
1991endef
1992
Bjoern Michaelsena4c80752013-02-19 11:22:51 +01001993endif # SYSTEM_MSPUB
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001994
1995
David Tardon516fb342014-06-26 21:26:11 +02001996ifneq ($(SYSTEM_PAGEMAKER),)
1997
1998define gb_LinkTarget__use_pagemaker
1999$(call gb_LinkTarget_set_include,$(1),\
2000 $$(INCLUDE) \
2001 $(PAGEMAKER_CFLAGS) \
2002)
2003$(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
2004
2005endef
2006gb_ExternalProject__use_pagemaker :=
2007
2008else # !SYSTEM_PAGEMAKER
2009
2010define gb_LinkTarget__use_pagemaker
2011$(call gb_LinkTarget_set_include,$(1),\
2012 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
2013 $$(INCLUDE) \
2014)
2015$(call gb_LinkTarget_add_libs,$(1),\
2016 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
2017)
2018$(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
2019
2020endef
2021define gb_ExternalProject__use_pagemaker
2022$(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
2023
2024endef
2025
2026endif # SYSTEM_PAGEMAKER
2027
2028
Aleksas Pantechovskise59b5b12017-08-27 22:10:14 +03002029ifneq ($(SYSTEM_QXP),)
2030
2031define gb_LinkTarget__use_qxp
2032$(call gb_LinkTarget_set_include,$(1),\
2033 $$(INCLUDE) \
2034 $(QXP_CFLAGS) \
2035)
2036$(call gb_LinkTarget_add_libs,$(1),$(QXP_LIBS))
2037
2038endef
2039gb_ExternalProject__use_qxp :=
2040
2041else # !SYSTEM_QXP
2042
2043define gb_LinkTarget__use_qxp
2044$(call gb_LinkTarget_set_include,$(1),\
2045 -I$(call gb_UnpackedTarball_get_dir,libqxp)/inc \
2046 $$(INCLUDE) \
2047)
2048$(call gb_LinkTarget_add_libs,$(1),\
2049 $(call gb_UnpackedTarball_get_dir,libqxp)/src/lib/.libs/libqxp-0.0$(gb_StaticLibrary_PLAINEXT) \
2050)
2051$(call gb_LinkTarget_use_external_project,$(1),libqxp)
2052
2053endef
2054define gb_ExternalProject__use_qxp
2055$(call gb_ExternalProject_use_external_project,$(1),libqxp)
2056
2057endef
2058
2059endif # SYSTEM_QXP
2060
2061
Aleksas Pantechovskisaaed6fe2016-06-22 19:02:29 +03002062ifneq ($(SYSTEM_ZMF),)
2063
2064define gb_LinkTarget__use_zmf
2065$(call gb_LinkTarget_set_include,$(1),\
2066 $$(INCLUDE) \
2067 $(ZMF_CFLAGS) \
2068)
2069$(call gb_LinkTarget_add_libs,$(1),$(ZMF_LIBS))
2070
2071endef
2072gb_ExternalProject__use_zmf :=
2073
2074else # !SYSTEM_ZMF
2075
2076define gb_LinkTarget__use_zmf
2077$(call gb_LinkTarget_set_include,$(1),\
2078 -I$(call gb_UnpackedTarball_get_dir,libzmf)/inc \
2079 $$(INCLUDE) \
2080)
2081$(call gb_LinkTarget_add_libs,$(1),\
2082 $(call gb_UnpackedTarball_get_dir,libzmf)/src/lib/.libs/libzmf-0.0$(gb_StaticLibrary_PLAINEXT) \
2083)
2084$(call gb_LinkTarget_use_external_project,$(1),libzmf)
2085
2086endef
2087define gb_ExternalProject__use_zmf
2088$(call gb_ExternalProject_use_external_project,$(1),libzmf)
2089
2090endef
2091
2092endif # SYSTEM_ZMF
2093
2094
Michael Stahle3abec32014-02-11 15:57:18 +01002095ifneq ($(SYSTEM_VISIO),)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002096
2097define gb_LinkTarget__use_visio
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002098$(call gb_LinkTarget_set_include,$(1),\
2099 $$(INCLUDE) \
Fridrich Štrbae531e8a2011-10-05 10:21:08 +02002100 $(VISIO_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002101)
Fridrich Štrbae531e8a2011-10-05 10:21:08 +02002102$(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02002103
2104endef
2105
Bjoern Michaelsenfe8bcfa2013-02-19 11:14:46 +01002106else # !SYSTEM_VISIO
Matúš Kukanc6a63952011-07-28 17:29:44 +02002107
Matúš Kukanc6a63952011-07-28 17:29:44 +02002108define gb_LinkTarget__use_visio
Michael Stahlacc7f612013-05-16 13:14:37 +02002109$(call gb_LinkTarget_set_include,$(1),\
2110 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2111 $$(INCLUDE) \
2112)
Michael Stahl2f6261f2013-09-19 19:28:36 +02002113$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02002114 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba64ab6112012-11-05 11:43:55 +01002115)
Michael Stahl2f6261f2013-09-19 19:28:36 +02002116$(call gb_LinkTarget_use_external_project,$(1),libvisio)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002117
2118endef
2119
Bjoern Michaelsenfe8bcfa2013-02-19 11:14:46 +01002120endif # SYSTEM_VISIO
Matúš Kukanc6a63952011-07-28 17:29:44 +02002121
2122
Michael Stahle3abec32014-02-11 15:57:18 +01002123ifneq ($(SYSTEM_WPD),)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002124
2125define gb_LinkTarget__use_wpd
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002126$(call gb_LinkTarget_set_include,$(1),\
2127 $$(INCLUDE) \
Fridrich Štrba8703f3e2011-10-05 10:04:04 +02002128 $(WPD_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002129)
Fridrich Štrba8703f3e2011-10-05 10:04:04 +02002130$(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02002131
2132endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02002133gb_ExternalProject__use_wpd :=
Matúš Kukanc6a63952011-07-28 17:29:44 +02002134
Bjoern Michaelsen5de206a2013-02-19 11:20:31 +01002135else # !SYSTEM_WPD
Matúš Kukanc6a63952011-07-28 17:29:44 +02002136
David Tardonc868a0c2014-12-23 18:37:54 +01002137ifeq ($(COM),MSC)
2138
2139$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2140 wpd \
2141))
2142
Fridrich Štrba4425db62012-09-24 13:17:45 +02002143define gb_LinkTarget__use_wpd
Michael Stahldb5c8c52013-05-16 13:28:14 +02002144$(call gb_LinkTarget_set_include,$(1),\
2145 $(WPD_CFLAGS) \
2146 $$(INCLUDE) \
2147)
David Tardonc868a0c2014-12-23 18:37:54 +01002148$(call gb_LinkTarget_use_libraries,$(1),\
2149 wpd \
Michael Stahl34295432012-09-24 22:25:28 +02002150)
Fridrich Štrba4425db62012-09-24 13:17:45 +02002151
2152endef
David Tardonc868a0c2014-12-23 18:37:54 +01002153
Michael Stahl2b7536a2012-10-05 21:17:25 +02002154define gb_ExternalProject__use_wpd
David Tardonc868a0c2014-12-23 18:37:54 +01002155$(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
Michael Stahl2b7536a2012-10-05 21:17:25 +02002156
2157endef
Fridrich Štrba4425db62012-09-24 13:17:45 +02002158
David Tardonc868a0c2014-12-23 18:37:54 +01002159else # !MSC
2160
2161$(eval $(call gb_Helper_register_packages_for_install,ooo, \
2162 libwpd \
2163))
2164
2165define gb_LinkTarget__use_wpd
2166$(call gb_LinkTarget_use_package,$(1),libwpd)
2167
2168$(call gb_LinkTarget_set_include,$(1),\
2169 $(WPD_CFLAGS) \
2170 $$(INCLUDE) \
2171)
2172$(call gb_LinkTarget_add_libs,$(1),\
2173 $(WPD_LIBS) \
2174)
2175
2176endef
2177
2178define gb_ExternalProject__use_wpd
2179$(call gb_ExternalProject_use_package,$(1),libwpd)
2180
2181endef
2182
2183endif # MSC
2184
Bjoern Michaelsen5de206a2013-02-19 11:20:31 +01002185endif # SYSTEM_WPD
Matúš Kukanc6a63952011-07-28 17:29:44 +02002186
2187
Michael Stahle3abec32014-02-11 15:57:18 +01002188ifneq ($(SYSTEM_WPG),)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002189
2190define gb_LinkTarget__use_wpg
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002191$(call gb_LinkTarget_set_include,$(1),\
2192 $$(INCLUDE) \
Fridrich Štrba62c43b42011-10-05 10:15:40 +02002193 $(WPG_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002194)
Fridrich Štrba62c43b42011-10-05 10:15:40 +02002195$(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02002196
2197endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02002198gb_ExternalProject__use_wpg :=
Matúš Kukanc6a63952011-07-28 17:29:44 +02002199
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01002200else # !SYSTEM_WPG
Matúš Kukanc6a63952011-07-28 17:29:44 +02002201
David Tardonc868a0c2014-12-23 18:37:54 +01002202ifeq ($(COM),MSC)
2203
2204$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2205 wpg \
2206))
2207
Matúš Kukanc6a63952011-07-28 17:29:44 +02002208define gb_LinkTarget__use_wpg
David Tardonc51a2542013-05-24 14:53:37 +02002209$(call gb_LinkTarget_set_include,$(1),\
2210 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2211 $$(INCLUDE) \
2212)
David Tardonc868a0c2014-12-23 18:37:54 +01002213$(call gb_LinkTarget_use_libraries,$(1),\
2214 wpg \
Michael Stahl53b7bdc2012-10-05 17:19:47 +02002215)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002216
2217endef
David Tardonc868a0c2014-12-23 18:37:54 +01002218
2219else # !MSC
2220
2221$(eval $(call gb_Helper_register_packages_for_install,ooo, \
2222 libwpg \
2223))
2224
2225define gb_LinkTarget__use_wpg
2226$(call gb_LinkTarget_use_package,$(1),libwpg)
2227
2228$(call gb_LinkTarget_set_include,$(1),\
2229 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2230 $$(INCLUDE) \
2231)
2232$(call gb_LinkTarget_add_libs,$(1),\
2233 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2234)
Michael Stahl2b7536a2012-10-05 21:17:25 +02002235
2236endef
Matúš Kukanc6a63952011-07-28 17:29:44 +02002237
David Tardonc868a0c2014-12-23 18:37:54 +01002238endif # MSC
2239
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01002240endif # SYSTEM_WPG
Matúš Kukanc6a63952011-07-28 17:29:44 +02002241
2242
Michael Stahle3abec32014-02-11 15:57:18 +01002243ifneq ($(SYSTEM_WPS),)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002244
2245define gb_LinkTarget__use_wps
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002246$(call gb_LinkTarget_set_include,$(1),\
2247 $$(INCLUDE) \
Fridrich Štrbae991bba2011-10-05 10:18:53 +02002248 $(WPS_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002249)
Fridrich Štrbae991bba2011-10-05 10:18:53 +02002250$(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02002251
2252endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02002253gb_ExternalProject__use_wps :=
Matúš Kukanc6a63952011-07-28 17:29:44 +02002254
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01002255else # !SYSTEM_WPS
Matúš Kukanc6a63952011-07-28 17:29:44 +02002256
David Tardonf85d10f2014-05-30 15:35:48 +02002257ifeq ($(COM),MSC)
2258
2259$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2260 wps \
2261))
2262
Matúš Kukanc6a63952011-07-28 17:29:44 +02002263define gb_LinkTarget__use_wps
David Tardon6f9d8212013-05-24 14:58:31 +02002264$(call gb_LinkTarget_set_include,$(1),\
2265 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2266 $$(INCLUDE) \
2267)
David Tardonf85d10f2014-05-30 15:35:48 +02002268
2269$(call gb_LinkTarget_use_libraries,$(1),\
2270 wps \
Fridrich Štrba8c07bd32013-04-19 12:06:58 +02002271)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002272
2273endef
David Tardonf85d10f2014-05-30 15:35:48 +02002274
2275else # !MSC
2276
2277$(eval $(call gb_Helper_register_packages_for_install,ooo, \
2278 libwps \
2279))
2280
2281define gb_LinkTarget__use_wps
2282$(call gb_LinkTarget_use_package,$(1),libwps)
2283
2284$(call gb_LinkTarget_set_include,$(1),\
2285 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2286 $$(INCLUDE) \
2287)
2288$(call gb_LinkTarget_add_libs,$(1),\
osnolaf9568332015-05-18 10:21:10 +02002289 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
David Tardonf85d10f2014-05-30 15:35:48 +02002290)
Michael Stahl2b7536a2012-10-05 21:17:25 +02002291
2292endef
Matúš Kukanc6a63952011-07-28 17:29:44 +02002293
David Tardonf85d10f2014-05-30 15:35:48 +02002294endif # MSC
2295
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01002296endif # SYSTEM_WPS
Matúš Kukanc6a63952011-07-28 17:29:44 +02002297
2298
Michael Stahle3abec32014-02-11 15:57:18 +01002299ifneq ($(SYSTEM_MWAW),)
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002300
2301define gb_LinkTarget__use_mwaw
2302$(call gb_LinkTarget_set_include,$(1),\
2303 $$(INCLUDE) \
2304 $(MWAW_CFLAGS) \
2305)
2306$(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2307
2308endef
2309
2310else # !SYSTEM_MWAW
2311
David Tardon79211c12014-05-30 13:55:20 +02002312ifeq ($(COM),MSC)
2313
2314$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2315 mwaw \
2316))
2317
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002318define gb_LinkTarget__use_mwaw
Michael Stahlff718952013-05-16 13:11:36 +02002319$(call gb_LinkTarget_set_include,$(1),\
2320 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2321 $$(INCLUDE) \
2322)
David Tardon79211c12014-05-30 13:55:20 +02002323
2324$(call gb_LinkTarget_use_libraries,$(1),\
2325 mwaw \
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002326)
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002327
2328endef
2329
David Tardon79211c12014-05-30 13:55:20 +02002330else # !MSC
2331
2332$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2333 libmwaw \
2334))
2335
2336define gb_LinkTarget__use_mwaw
2337$(call gb_LinkTarget_use_package,$(1),libmwaw)
2338
2339$(call gb_LinkTarget_set_include,$(1),\
2340 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2341 $$(INCLUDE) \
2342)
2343$(call gb_LinkTarget_add_libs,$(1),\
2344 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2345)
2346
2347endef
2348
2349endif # MSC
2350
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002351endif # SYSTEM_MWAW
2352
osnola1faae1f2016-08-10 12:43:56 +02002353ifneq ($(SYSTEM_STAROFFICE),)
2354
2355define gb_LinkTarget__use_staroffice
2356$(call gb_LinkTarget_set_include,$(1),\
2357 $$(INCLUDE) \
2358 $(STAROFFICE_CFLAGS) \
2359)
2360$(call gb_LinkTarget_add_libs,$(1),$(STAROFFICE_LIBS))
2361
2362endef
2363
2364else # !SYSTEM_STAROFFICE
2365
2366ifeq ($(COM),MSC)
2367
2368$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2369 staroffice \
2370))
2371
2372define gb_LinkTarget__use_staroffice
2373$(call gb_LinkTarget_set_include,$(1),\
2374 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2375 $$(INCLUDE) \
2376)
2377
2378$(call gb_LinkTarget_use_libraries,$(1),\
2379 staroffice \
2380)
2381
2382endef
2383
2384else # !MSC
2385
2386$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2387 libstaroffice \
2388))
2389
2390define gb_LinkTarget__use_staroffice
2391$(call gb_LinkTarget_use_package,$(1),libstaroffice)
2392
2393$(call gb_LinkTarget_set_include,$(1),\
2394 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2395 $$(INCLUDE) \
2396)
2397$(call gb_LinkTarget_add_libs,$(1),\
2398 -L$(call gb_UnpackedTarball_get_dir,libstaroffice)/src/lib/.libs -lstaroffice-0.0 \
2399)
2400
2401endef
2402
2403endif # MSC
2404
2405endif # SYSTEM_STAROFFICE
2406
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002407
Michael Stahle3abec32014-02-11 15:57:18 +01002408ifneq ($(SYSTEM_LCMS2),)
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002409
2410define gb_LinkTarget__use_lcms2
2411$(call gb_LinkTarget_set_include,$(1),\
2412 $$(INCLUDE) \
Peter Foleyf7452122012-11-04 08:46:44 -05002413 $(LCMS2_CFLAGS) \
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002414)
2415$(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2416
2417endef
2418
Peter Foley8905c0e2012-11-08 21:00:30 -05002419gb_ExternalProject__use_lcms2 :=
2420
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002421else # !SYSTEM_LCMS2
2422
Michael Stahl32a617d2014-02-17 11:23:19 +01002423$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2424 lcms2 \
2425))
2426
Peter Foley8905c0e2012-11-08 21:00:30 -05002427define gb_ExternalProject__use_lcms2
2428$(call gb_ExternalProject_use_package,$(1),lcms2)
2429
2430endef
2431
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03002432ifeq ($(OS),ANDROID)
2433
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03002434define gb_LinkTarget__use_lcms2
Christian Lohmaier3dee92e2012-11-13 19:44:44 +01002435$(call gb_LinkTarget_use_package,$(1),lcms2)
Matúš Kukan3790e842012-09-04 22:00:15 +02002436$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002437 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
Matúš Kukan3790e842012-09-04 22:00:15 +02002438 $$(INCLUDE) \
2439)
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03002440
2441endef
2442
2443else
2444
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002445define gb_LinkTarget__use_lcms2
Christian Lohmaier3dee92e2012-11-13 19:44:44 +01002446$(call gb_LinkTarget_use_package,$(1),lcms2)
Matúš Kukan3790e842012-09-04 22:00:15 +02002447$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002448 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
Matúš Kukan3790e842012-09-04 22:00:15 +02002449 $$(INCLUDE) \
2450)
Michael Stahl25f65f22013-10-23 22:04:36 +02002451$(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002452
2453endef
2454
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03002455endif # ANDROID
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002456endif # SYSTEM_LCMS2
2457
Matúš Kukan8dc394d2014-03-31 19:36:41 +02002458ifneq ($(ENABLE_LPSOLVE),)
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002459
Michael Stahlab586f12014-02-11 19:25:30 +01002460ifneq ($(SYSTEM_LPSOLVE),)
Matúš Kukanc4560482011-07-28 01:03:23 +02002461
Peter Foley085346f2012-11-03 19:19:30 -04002462define gb_LinkTarget__use_lpsolve
Matúš Kukanc4560482011-07-28 01:03:23 +02002463$(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
Peter Foley085346f2012-11-03 19:19:30 -04002464$(call gb_LinkTarget_add_defs,$(1),\
2465 -DSYSTEM_LPSOLVE \
Peter Foley29d5e292012-11-07 18:18:08 -05002466)
Matúš Kukanc4560482011-07-28 01:03:23 +02002467
2468endef
2469
2470else # !SYSTEM_LPSOLVE
2471
Peter Foley085346f2012-11-03 19:19:30 -04002472define gb_LinkTarget__use_lpsolve
Michael Stahlf4732872016-12-09 17:23:11 +01002473$(call gb_LinkTarget_use_external_project,$(1),lpsolve)
Michael Stahlb7d8ca82013-10-24 01:25:59 +02002474ifeq ($(COM),MSC)
2475$(call gb_LinkTarget_add_libs,$(1),\
2476 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2477)
2478else
Michael Stahlb177b302013-10-23 21:33:51 +02002479$(call gb_LinkTarget_add_libs,$(1),\
2480 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
Matúš Kukanc4560482011-07-28 01:03:23 +02002481)
Michael Stahlb7d8ca82013-10-24 01:25:59 +02002482endif
Peter Foley085346f2012-11-03 19:19:30 -04002483$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002484 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
Peter Foley085346f2012-11-03 19:19:30 -04002485 $$(INCLUDE) \
2486)
Matúš Kukanc4560482011-07-28 01:03:23 +02002487
2488endef
2489
Matúš Kukan083fa762014-02-27 17:08:09 +01002490$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2491 lpsolve \
2492))
2493
Matúš Kukanc4560482011-07-28 01:03:23 +02002494endif # SYSTEM_LPSOLVE
Matúš Kukan4f7b9682014-02-28 10:39:19 +01002495
Matúš Kukan077bdc72014-03-27 14:51:46 +01002496else
2497
2498gb_LinkTarget__use_lpsolve :=
2499
Matúš Kukan8dc394d2014-03-31 19:36:41 +02002500endif # ENABLE_LPSOLVE
2501
2502ifneq ($(ENABLE_COINMP),)
Matúš Kukan4f7b9682014-02-28 10:39:19 +01002503
Rene Engelhardd85f5132014-08-06 00:03:21 +02002504ifneq ($(SYSTEM_COINMP),TRUE)
2505
Matúš Kukan4f7b9682014-02-28 10:39:19 +01002506define gb_LinkTarget__use_coinmp
2507$(call gb_LinkTarget_use_package,$(1),coinmp)
2508ifeq ($(COM),MSC)
2509$(call gb_LinkTarget_add_libs,$(1),\
David Ostrovsky152e2a22014-11-30 18:26:01 +01002510 $(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 +01002511)
2512else
2513$(call gb_LinkTarget_add_libs,$(1),\
2514 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2515 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2516 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2517 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2518 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2519 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2520 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2521)
2522endif
2523$(call gb_LinkTarget_set_include,$(1),\
2524 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
Caolán McNamara67b4b342014-06-06 14:32:09 +01002525 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
Matúš Kukan4f7b9682014-02-28 10:39:19 +01002526 $$(INCLUDE) \
2527)
2528
2529endef
2530
2531$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2532 coinmp \
2533))
2534
Rene Engelhardd85f5132014-08-06 00:03:21 +02002535else # SYSTEM_COINMP
2536
2537define gb_LinkTarget__use_coinmp
2538$(call gb_LinkTarget_set_include,$(1),\
2539 $$(INCLUDE) \
2540 $(COINMP_CFLAGS) \
2541)
2542$(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2543
2544endef
2545
2546endif
2547
Matúš Kukan077bdc72014-03-27 14:51:46 +01002548else
2549
2550gb_LinkTarget__use_coinmp :=
2551
Matúš Kukan8dc394d2014-03-31 19:36:41 +02002552endif # ENABLE_COINMP
Matúš Kukanc4560482011-07-28 01:03:23 +02002553
Michael Stahl9ec0e6d2015-11-27 23:54:40 +01002554ifneq (,$(filter MDNSRESPONDER,$(BUILD_TYPE)))
2555
2556define gb_LinkTarget__use_mDNSResponder
2557$(call gb_LinkTarget_set_include,$(1),\
2558 -I$(call gb_UnpackedTarball_get_dir,mDNSResponder)/mDNSShared \
2559 $$(INCLUDE) \
2560)
2561$(call gb_LinkTarget_use_static_libraries,$(1),mDNSResponder)
2562endef
2563
2564endif # MDNSRESPONDER
2565
Caolán McNamaraaabc73d2012-08-30 13:58:15 +01002566ifeq ($(ENABLE_GIO),TRUE)
Matúš Kukanc4560482011-07-28 01:03:23 +02002567
Matúš Kukan464b4332012-01-15 02:12:49 +01002568define gb_LinkTarget__use_gio
2569$(call gb_LinkTarget_set_include,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +01002570 $$(INCLUDE) \
Caolán McNamara1ac9ccf2012-01-16 08:57:38 +00002571 $(GIO_CFLAGS) \
Matúš Kukan464b4332012-01-15 02:12:49 +01002572)
2573
2574$(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2575
2576endef
2577
Caolán McNamaraaabc73d2012-08-30 13:58:15 +01002578else # ENABLE_GIO
2579
2580define gb_LinkTarget__use_gio
Caolán McNamara1e98bb42012-11-06 20:09:57 +00002581
Caolán McNamaraaabc73d2012-08-30 13:58:15 +01002582endef
2583
2584endif # ENABLE_GIO
2585
Siqid0419802013-07-24 11:16:31 +02002586ifeq ($(ENABLE_AVAHI),TRUE)
2587
2588define gb_LinkTarget__use_avahi
2589$(call gb_LinkTarget_set_include,$(1),\
2590 $$(INCLUDE) \
2591 $(AVAHI_CFLAGS) \
2592)
2593
2594$(call gb_LinkTarget_add_defs,$(1),\
2595 -DENABLE_AVAHI \
2596)
2597
2598$(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2599
2600endef
2601
2602else # ENABLE_AVAHI
2603
David Tardon9ce38ef2013-11-05 07:03:08 +01002604gb_LinkTarget__use_avahi :=
Siqid0419802013-07-24 11:16:31 +02002605
2606endif # ENABLE_AVAHI
2607
2608
Bjoern Michaelsene7cc9e02011-07-26 14:51:35 +02002609define gb_LinkTarget__use_gtk
2610$(call gb_LinkTarget_set_include,$(1),\
2611 $$(INCLUDE) \
2612 $(GTK_CFLAGS) \
2613)
2614
2615$(call gb_LinkTarget_add_libs,$(1),$(GTK_LIBS))
2616
David Tardonadb11052011-12-01 13:39:09 +01002617ifeq ($(ENABLE_GTK_PRINT),TRUE)
2618
2619$(call gb_LinkTarget_add_defs,$(1),-DENABLE_GTK_PRINT)
2620
2621$(call gb_LinkTarget_set_include,$(1),\
2622 $$(INCLUDE) \
2623 $(GTK_PRINT_CFLAGS) \
2624)
2625
2626$(call gb_LinkTarget_add_libs,$(1),$(GTK_PRINT_LIBS))
2627
2628endif
2629
Bjoern Michaelsene7cc9e02011-07-26 14:51:35 +02002630endef
Michael Stahl4a8919f2011-04-18 11:13:57 +00002631
Bjoern Michaelsen54dd3072011-07-26 15:15:41 +02002632define gb_LinkTarget__use_gthread
Rene Engelhardac3c7ba2012-11-06 20:38:47 +01002633$(call gb_LinkTarget_add_libs,$(1),$(GTHREAD_LIBS))
Bjoern Michaelsen54dd3072011-07-26 15:15:41 +02002634endef
2635
Caolán McNamara68ffb332012-09-14 11:31:50 +01002636ifeq ($(ENABLE_CUPS),TRUE)
2637
2638define gb_LinkTarget__use_cups
2639$(call gb_LinkTarget_add_defs,$(1),\
2640 -DENABLE_CUPS \
2641)
2642
2643$(call gb_LinkTarget_add_libs,$(1),\
2644 -lcups \
2645)
2646
2647endef
2648
2649else # ENABLE_CUPS
2650
2651define gb_LinkTarget__use_cups
2652
2653endef
2654
Arkadiy Illarionov02addb32018-07-08 16:33:32 +03002655endif # ENABLE_CUPS
David Tardon1b717ce2011-11-02 13:00:48 +01002656
Caolán McNamara9ec0a3e2012-08-30 13:44:53 +01002657ifeq ($(ENABLE_DBUS),TRUE)
David Tardon1b717ce2011-11-02 13:00:48 +01002658
2659define gb_LinkTarget__use_dbus
2660$(call gb_LinkTarget_set_include,$(1),\
2661 $$(INCLUDE) \
2662 $(DBUS_CFLAGS) \
2663)
2664
David Tardon1b717ce2011-11-02 13:00:48 +01002665$(call gb_LinkTarget_add_libs,$(1),\
2666 $(DBUS_LIBS) \
2667)
2668
2669endef
2670
2671else # ENABLE_DBUS
2672
2673define gb_LinkTarget__use_dbus
2674
2675endef
2676
2677endif # ENABLE_DBUS
2678
2679
Michael Stahle3abec32014-02-11 15:57:18 +01002680ifneq ($(SYSTEM_LIBPNG),)
David Tardon6df9c472011-09-15 14:44:34 +02002681
Michael Stahlb0e0ee42017-09-14 14:12:40 +02002682define gb_LinkTarget__use_libpng
David Tardon6df9c472011-09-15 14:44:34 +02002683$(call gb_LinkTarget_set_include,$(1),\
2684 $$(INCLUDE) \
2685 $(LIBPNG_CFLAGS) \
2686)
2687
2688$(call gb_LinkTarget_add_libs,$(1),\
2689 $(LIBPNG_LIBS) \
2690)
2691
2692endef
2693
Michael Stahlb0e0ee42017-09-14 14:12:40 +02002694gb_ExternalProject__use_libpng :=
David Tardon5955e7b2016-11-03 13:58:29 +01002695
David Tardon6df9c472011-09-15 14:44:34 +02002696else # !SYSTEM_LIBPNG
2697
Michael Stahlb0e0ee42017-09-14 14:12:40 +02002698define gb_LinkTarget__use_libpng
Michael Stahl416b3212013-05-08 17:22:22 +02002699$(call gb_LinkTarget_set_include,$(1),\
2700 $(LIBPNG_CFLAGS) \
2701 $$(INCLUDE) \
2702)
Matúš Kukanf96d58b2012-09-08 18:13:20 +02002703$(call gb_LinkTarget_use_static_libraries,$(1),\
Michael Stahlb0e0ee42017-09-14 14:12:40 +02002704 libpng \
David Tardon6df9c472011-09-15 14:44:34 +02002705)
Michael Stahl398ce442012-09-28 21:47:29 +02002706$(call gb_LinkTarget__use_zlib,$(1))
David Tardon6df9c472011-09-15 14:44:34 +02002707
2708endef
2709
Michael Stahlb0e0ee42017-09-14 14:12:40 +02002710define gb_ExternalProject__use_libpng
David Tardon5955e7b2016-11-03 13:58:29 +01002711$(call gb_ExternalProject_use_static_libraries,$(1),\
Michael Stahlb0e0ee42017-09-14 14:12:40 +02002712 libpng \
David Tardon5955e7b2016-11-03 13:58:29 +01002713)
2714
2715endef
2716
David Tardon6df9c472011-09-15 14:44:34 +02002717endif # !SYSTEM_LIBPNG
2718
Michael Stahl50471a82011-12-06 19:17:52 +01002719
Michael Stahle3abec32014-02-11 15:57:18 +01002720ifneq ($(SYSTEM_CURL),)
Michael Stahl50471a82011-12-06 19:17:52 +01002721
2722define gb_LinkTarget__use_curl
Cédric Bosdonnat89361fa2014-07-16 17:02:01 +02002723$(call gb_LinkTarget_add_defs,$(1),\
2724 -DSYSTEM_CURL \
2725)
Michael Stahl50471a82011-12-06 19:17:52 +01002726$(call gb_LinkTarget_set_include,$(1),\
2727 $$(INCLUDE) \
2728 $(CURL_CFLAGS) \
2729)
2730$(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2731
2732endef
2733
2734else # !SYSTEM_CURL
2735
Michael Stahl32a617d2014-02-17 11:23:19 +01002736$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2737 curl \
2738))
2739
Michael Stahl50471a82011-12-06 19:17:52 +01002740define gb_LinkTarget__use_curl
Christian Lohmaier3dee92e2012-11-13 19:44:44 +01002741$(call gb_LinkTarget_use_package,$(1),curl)
Matúš Kukan9f3a3ab2012-10-29 22:57:34 +01002742$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002743 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
Matúš Kukan9f3a3ab2012-10-29 22:57:34 +01002744 $$(INCLUDE) \
2745)
Michael Stahl936a1a92013-10-23 22:37:11 +02002746
2747ifeq ($(COM),MSC)
Michael Stahl714b93b2013-10-24 00:32:04 +02002748$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahl89b08e22017-10-23 17:43:21 +02002749 $(call gb_UnpackedTarball_get_dir,curl)/builds/libcurl-vc12-$(if $(filter X86_64,$(CPUNAME)),x64,x86)-$(if $(MSVC_USE_DEBUG_RUNTIME),debug,release)-dll-ipv6-sspi-winssl/lib/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).lib \
Michael Stahl50471a82011-12-06 19:17:52 +01002750)
Michael Stahl936a1a92013-10-23 22:37:11 +02002751else
2752$(call gb_LinkTarget_add_libs,$(1),\
2753 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2754)
2755endif
Michael Stahl50471a82011-12-06 19:17:52 +01002756
2757endef
2758
2759endif # SYSTEM_CURL
2760
Stephan Bergmann49313b02012-11-27 15:35:02 +01002761ifeq ($(ENABLE_VALGRIND),TRUE)
David Tardon3446cda2011-12-23 12:21:19 +01002762
2763define gb_LinkTarget__use_valgrind
2764$(call gb_LinkTarget_add_defs,$(1),\
Stephan Bergmann49313b02012-11-27 15:35:02 +01002765 -DHAVE_VALGRIND_HEADERS \
David Tardon3446cda2011-12-23 12:21:19 +01002766)
2767
2768$(call gb_LinkTarget_set_include,$(1),\
2769 $$(INCLUDE) \
2770 $(VALGRIND_CFLAGS) \
2771)
2772
2773endef
2774
Stephan Bergmann49313b02012-11-27 15:35:02 +01002775else # !ENABLE_VALGRIND
David Tardon3446cda2011-12-23 12:21:19 +01002776
2777define gb_LinkTarget__use_valgrind
2778
2779endef
2780
Stephan Bergmann49313b02012-11-27 15:35:02 +01002781endif # ENABLE_VALGRIND
David Tardon3446cda2011-12-23 12:21:19 +01002782
Ashod Nakashian296389e2019-03-06 22:06:35 -05002783ifeq ($(ENABLE_POPPLER),TRUE)
2784
Michael Stahl32db4992014-02-11 19:35:22 +01002785ifneq ($(SYSTEM_POPPLER),)
David Tardondba2d322012-02-18 18:54:35 +01002786
2787define gb_LinkTarget__use_poppler
David Tardondba2d322012-02-18 18:54:35 +01002788$(call gb_LinkTarget_set_include,$(1),\
2789 $(POPPLER_CFLAGS) \
2790 $$(INCLUDE) \
2791)
2792
2793$(call gb_LinkTarget_add_libs,$(1),\
2794 $(POPPLER_LIBS) \
2795)
2796
2797endef
2798
2799else # !SYSTEM_POPPLER
2800
David Tardondba2d322012-02-18 18:54:35 +01002801define gb_LinkTarget__use_poppler
David Tardoncad68c62015-09-29 18:09:16 +02002802$(call gb_LinkTarget_use_external_project,$(1),poppler,full)
Peter Foleyfb1d11d2013-02-17 09:26:01 -05002803
David Tardon548b61a2012-02-21 06:58:02 +01002804$(call gb_LinkTarget_set_include,$(1),\
Fridrich Štrbaeb276d12013-07-08 14:01:17 +02002805 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2806 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2807 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
David Tardon548b61a2012-02-21 06:58:02 +01002808 $$(INCLUDE) \
David Tardondba2d322012-02-18 18:54:35 +01002809)
2810
Michael Stahl67e53552018-06-20 16:10:44 +02002811$(call gb_LinkTarget_use_static_libraries,$(1),poppler)
David Tardon548b61a2012-02-21 06:58:02 +01002812
Michael Stahl77d297f2017-09-13 22:50:14 +02002813$(call gb_LinkTarget_use_external,$(1),libjpeg)
Michael Stahl43532a02016-11-03 15:58:08 +01002814
David Tardon548b61a2012-02-21 06:58:02 +01002815ifeq ($(OS),MACOSX)
Michael Stahl967986b2012-09-28 00:54:49 +02002816$(call gb_LinkTarget_add_libs,$(1),\
2817 -lobjc \
David Tardon548b61a2012-02-21 06:58:02 +01002818)
Caolán McNamara0d5cc8c2014-08-30 15:12:53 +01002819else ifeq ($(OS),LINUX)
2820$(call gb_LinkTarget_add_libs,$(1),\
2821 -pthread \
2822)
David Tardon548b61a2012-02-21 06:58:02 +01002823else ifeq ($(OS),WNT)
Michael Stahldc397aae2012-09-28 15:31:46 +02002824$(call gb_LinkTarget_use_system_win32_libs,$(1),\
David Tardon548b61a2012-02-21 06:58:02 +01002825 advapi32 \
2826 gdi32 \
2827)
2828endif
2829
David Tardondba2d322012-02-18 18:54:35 +01002830endef
2831
2832endif # SYSTEM_POPPLER
2833
Ashod Nakashian296389e2019-03-06 22:06:35 -05002834endif # ENABLE_POPPLER
2835
David Tardon3446cda2011-12-23 12:21:19 +01002836
Michael Stahl46648152014-02-11 16:33:18 +01002837ifneq ($(SYSTEM_CLUCENE),)
David Tardon22c60cb2012-04-07 15:50:47 +02002838
2839define gb_LinkTarget__use_clucene
2840$(call gb_LinkTarget_add_defs,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02002841 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
David Tardon22c60cb2012-04-07 15:50:47 +02002842)
2843
2844$(call gb_LinkTarget_set_include,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02002845 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
David Tardon22c60cb2012-04-07 15:50:47 +02002846 $$(INCLUDE) \
2847)
2848
2849$(call gb_LinkTarget_add_libs,$(1),\
2850 $(CLUCENE_LIBS) \
2851)
2852
2853endef
2854
2855else # !SYSTEM_CLUCENE
2856
2857define gb_LinkTarget__use_clucene
Michael Stahl28cde0c2013-05-07 23:47:27 +02002858$(call gb_LinkTarget_set_include,$(1),\
2859 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2860 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2861 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2862 $$(INCLUDE) \
2863)
2864
Michael Stahlc923f7d2012-04-07 23:22:08 +02002865$(call gb_LinkTarget_use_libraries,$(1),\
David Tardon22c60cb2012-04-07 15:50:47 +02002866 clucene \
2867)
2868
2869endef
2870
Marcos Paulo de Souzaf70343b2014-02-12 06:53:02 -02002871$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
David Tardon22c60cb2012-04-07 15:50:47 +02002872 clucene \
2873))
2874
2875endif # SYSTEM_CLUCENE
2876
Peter Foley64402842011-12-22 16:34:35 -05002877define gb_LinkTarget__use_gobject
Rene Engelhardac3c7ba2012-11-06 20:38:47 +01002878$(call gb_LinkTarget_add_libs,$(1),\
2879 $(GOBJECT_LIBS) \
2880)
2881
2882$(call gb_LinkTarget_set_include,$(1),\
2883 $$(INCLUDE) \
2884 $(GOBJECT_CFLAGS) \
2885)
Peter Foley64402842011-12-22 16:34:35 -05002886endef
2887
Sophia Schröderf4fc28a2018-04-11 15:39:57 +01002888ifneq ($(SYSTEM_HSQLDB),)
2889
2890define gb_LinkTarget__use_hsqldb
2891
2892$(call gb_LinkTarget_add_defs,$(1),\
2893 -DSYSTEM_HSQLDB \
2894 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2895)
2896
2897endef
2898
2899else # !SYSTEM_HSQLDB
2900
2901define gb_LinkTarget__use_hsqldb
2902
2903endef
2904
2905endif # SYSTEM_HSQLDB
2906
2907
Michael Stahl5378dea2014-02-11 19:11:47 +01002908ifneq ($(SYSTEM_OPENLDAP),)
Michael Stahle0ee0d42012-07-16 19:00:07 +02002909
2910define gb_LinkTarget__use_openldap
2911
2912$(call gb_LinkTarget_add_libs,$(1),\
2913 -lldap \
2914 -llber \
2915)
2916
2917endef
2918
Michael Stahl2f6261f2013-09-19 19:28:36 +02002919gb_ExternalProject__use_openldap :=
2920
Michael Stahl5378dea2014-02-11 19:11:47 +01002921else # !SYSTEM_OPENLDAP
Michael Stahle0ee0d42012-07-16 19:00:07 +02002922
Michael Stahle0ee0d42012-07-16 19:00:07 +02002923define gb_LinkTarget__use_openldap
Matúš Kukan7a030392012-10-29 23:29:37 +01002924$(call gb_LinkTarget_use_unpacked,$(1),openldap)
Michael Stahle0ee0d42012-07-16 19:00:07 +02002925$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002926 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
Michael Stahle0ee0d42012-07-16 19:00:07 +02002927 $$(INCLUDE) \
2928)
Stephan Bergmann6b4c4352015-10-09 09:21:48 +02002929$(call gb_LinkTarget_use_external_project,$(1),openldap,full)
Michael Stahl2f6261f2013-09-19 19:28:36 +02002930$(call gb_LinkTarget_add_libs,$(1), \
2931 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2932 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
Michael Stahle0ee0d42012-07-16 19:00:07 +02002933)
2934
2935endef
2936
Michael Stahl2f6261f2013-09-19 19:28:36 +02002937define gb_ExternalProject__use_openldap
2938$(call gb_ExternalProject_use_external_project,$(1),openldap)
2939
2940endef
2941
Michael Stahle0ee0d42012-07-16 19:00:07 +02002942endif # SYSTEM_OPENLDAP
2943
Wastack45f42682016-07-28 17:16:19 +02002944ifneq ($(SYSTEM_LIBTOMMATH),)
2945
2946define gb_LinkTarget__use_libtommath
2947$(call gb_LinkTarget_set_include,$(1),\
2948 $(LIBTOMMATH_CFLAGS) \
2949 $$(INCLUDE) \
2950)
2951$(call gb_LinkTarget_add_libs,$(1),$(LIBTOMMATH_LIBS))
2952
2953endef
2954
2955else # !SYSTEM_LIBTOMMATH
2956define gb_LinkTarget__use_libtommath
2957$(call gb_LinkTarget_set_include,$(1),\
2958 -I${WORKDIR}/UnpackedTarball/libtommath \
2959 $$(INCLUDE) \
2960)
2961$(call gb_LinkTarget_add_libs,$(1),\
2962 $(call gb_UnpackedTarball_get_dir,libtommath)/libtommath$(gb_StaticLibrary_PLAINEXT) \
2963)
2964$(call gb_LinkTarget_use_external_project,$(1),libtommath)
2965
2966endef
2967
2968endif # SYSTEM_LIBTOMMATH
2969
2970define gb_ExternalProject__use_libtommath
2971$(call gb_ExternalProject_use_external_project,$(1),libtommath)
2972
2973endef
Michael Stahle0ee0d42012-07-16 19:00:07 +02002974
Javier Fernandezf53228c2013-05-10 18:21:30 +00002975ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2976
Michael Stahl23647592014-02-11 19:04:20 +01002977ifneq ($(SYSTEM_FIREBIRD),)
Javier Fernandezf53228c2013-05-10 18:21:30 +00002978
Rene Engelhard0b68d702013-07-16 21:50:14 +02002979define gb_LinkTarget__use_libfbembed
Javier Fernandezf53228c2013-05-10 18:21:30 +00002980$(call gb_LinkTarget_set_include,$(1),\
2981 $(FIREBIRD_CFLAGS) \
2982 $$(INCLUDE) \
2983)
2984$(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
2985
2986endef
2987
Javier Fernandezf53228c2013-05-10 18:21:30 +00002988else # !SYSTEM_FIREBIRD
2989
Michael Stahl2c78d492017-01-09 14:45:11 +01002990$(eval $(call gb_Helper_register_packages_for_install,firebirdsdbc,\
2991 firebird \
2992))
2993
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +01002994#$(call gb_LinkTarget__use_libatomic_ops,$(1))
Wastack45f42682016-07-28 17:16:19 +02002995#$(call gb_LinkTarget__use_libtommath,$(1))
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +01002996
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +01002997define gb_LinkTarget__use_libfbembed
2998$(call gb_LinkTarget_use_package,$(1),firebird)
Javier Fernandezf53228c2013-05-10 18:21:30 +00002999$(call gb_LinkTarget_set_include,$(1),\
Stephan Bergmann416c5522016-10-17 08:39:09 +02003000 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/include \
Javier Fernandezf53228c2013-05-10 18:21:30 +00003001 $$(INCLUDE) \
3002)
Michael Stahl37563db2013-10-22 22:22:49 +02003003ifeq ($(COM),MSC)
3004$(call gb_LinkTarget_add_libs,$(1),\
Stephan Bergmann416c5522016-10-17 08:39:09 +02003005 $(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/bin/ifbclient.lib \
Javier Fernandezf53228c2013-05-10 18:21:30 +00003006)
Michael Stahl37563db2013-10-22 22:22:49 +02003007else
3008$(call gb_LinkTarget_add_libs,$(1),\
Stephan Bergmann416c5522016-10-17 08:39:09 +02003009 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib -lfbclient \
Michael Stahl37563db2013-10-22 22:22:49 +02003010)
3011endif
Javier Fernandezf53228c2013-05-10 18:21:30 +00003012
3013endef
3014
Javier Fernandezf53228c2013-05-10 18:21:30 +00003015
3016# endef
3017
3018endif # SYSTEM_FIREBIRD
3019
3020else # !ENABLE_FIREBIRD_SDBC
Michael Stahl6fa0b372014-02-12 17:01:35 +01003021
Javier Fernandezf53228c2013-05-10 18:21:30 +00003022gb_LinkTarget__use_firebird :=
3023# gb_LinkTarget__use_atomic_ops :=
Wastack45f42682016-07-28 17:16:19 +02003024# gb_LinkTarget__use_libtommath :=
Javier Fernandezf53228c2013-05-10 18:21:30 +00003025
3026endif # ENABLE_FIREBIRD_SDBC
3027
3028
Michael Stahl5866b332014-02-11 18:56:33 +01003029ifneq ($(SYSTEM_POSTGRESQL),)
David Tardon8bc7afb2012-04-05 10:53:08 +02003030
3031define gb_LinkTarget__use_postgresql
3032
David Tardon8bc7afb2012-04-05 10:53:08 +02003033$(call gb_LinkTarget_set_include,$(1),\
3034 $(POSTGRESQL_INC) \
3035 $$(INCLUDE) \
3036)
3037
3038$(call gb_LinkTarget_add_libs,$(1),\
3039 -lpq \
3040)
3041
3042$(call gb_LinkTarget_add_ldflags,$(1),\
3043 $(POSTGRESQL_LIB) \
3044)
3045
3046endef
3047
3048else # !SYSTEM_POSTGRESQL
3049
3050define gb_LinkTarget__use_postgresql
3051
Michael Stahl2f6261f2013-09-19 19:28:36 +02003052$(call gb_LinkTarget_use_external_project,$(1),postgresql)
David Tardoncb9823b2012-10-22 06:33:00 +02003053
David Tardon8bc7afb2012-04-05 10:53:08 +02003054$(call gb_LinkTarget_set_include,$(1),\
Michael Stahlee8323e2013-05-08 00:19:40 +02003055 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
3056 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
David Tardon8bc7afb2012-04-05 10:53:08 +02003057 $$(INCLUDE) \
3058)
3059
Michael Stahl2f6261f2013-09-19 19:28:36 +02003060$(call gb_LinkTarget_add_libs,$(1),\
3061 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
David Tardon8bc7afb2012-04-05 10:53:08 +02003062)
3063
Stephan Bergmann8646ab92017-02-10 14:05:21 +01003064ifeq ($(OS),WNT)
Matúš Kukan5e32d152012-05-27 00:21:12 +02003065$(call gb_LinkTarget_use_external,$(1),openssl)
3066
Michael Stahldc397aae2012-09-28 15:31:46 +02003067$(call gb_LinkTarget_use_system_win32_libs,$(1),\
David Tardon8bc7afb2012-04-05 10:53:08 +02003068 secur32 \
3069 ws2_32 \
David Tardon8bc7afb2012-04-05 10:53:08 +02003070)
David Tardon8af6aa62012-05-30 12:06:42 +02003071
David Tardon8bc7afb2012-04-05 10:53:08 +02003072endif
3073
3074endef
3075
David Tardon8bc7afb2012-04-05 10:53:08 +02003076endif # SYSTEM_POSTGRESQL
3077
David Tardond4efa8b2012-04-28 20:48:14 +02003078ifeq ($(ENABLE_KDE4),TRUE)
3079
3080define gb_LinkTarget__use_kde4
3081$(call gb_LinkTarget_set_include,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02003082 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS)))) \
David Tardond4efa8b2012-04-28 20:48:14 +02003083 $$(INCLUDE) \
3084)
3085
3086$(call gb_LinkTarget_add_defs,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02003087 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS))) \
David Tardond4efa8b2012-04-28 20:48:14 +02003088)
3089
3090$(call gb_LinkTarget_add_libs,$(1),\
3091 $(KDE4_LIBS) \
3092)
3093
David Tardond4efa8b2012-04-28 20:48:14 +02003094endef
3095
3096else # !ENABLE_KDE4
3097
3098define gb_LinkTarget__use_kde4
3099
3100endef
3101
3102endif # ENABLE_KDE4
3103
Milian Wolff4d78cf92018-01-10 16:26:10 +01003104
3105ifeq ($(ENABLE_KDE5),TRUE)
3106
3107define gb_LinkTarget__use_kde5
3108$(call gb_LinkTarget_set_include,$(1),\
3109 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS)))) \
3110 $$(INCLUDE) \
3111)
3112
3113$(call gb_LinkTarget_add_defs,$(1),\
3114 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS))) \
3115)
3116
3117$(call gb_LinkTarget_add_libs,$(1),\
3118 $(KF5_LIBS) \
3119)
3120
3121ifeq ($(COM),GCC)
3122$(call gb_LinkTarget_add_cxxflags,$(1),\
3123 -Wno-shadow \
3124)
3125endif
3126
3127endef
3128
3129else # !ENABLE_KDE5
3130
3131define gb_LinkTarget__use_kde5
3132
3133endef
3134
3135endif # ENABLE_KDE5
3136
3137
3138
Jan-Marek Glogowski2ffb83d2017-10-30 18:45:46 +01003139ifeq ($(ENABLE_QT5),TRUE)
Jan-Marek Glogowski93359452017-10-21 13:50:30 +00003140
Jan-Marek Glogowski2ffb83d2017-10-30 18:45:46 +01003141define gb_LinkTarget__use_qt5
Jan-Marek Glogowski93359452017-10-21 13:50:30 +00003142$(call gb_LinkTarget_set_include,$(1),\
Jan-Marek Glogowski2ffb83d2017-10-30 18:45:46 +01003143 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS)))) \
3144 $$(INCLUDE) \
Jan-Marek Glogowski93359452017-10-21 13:50:30 +00003145)
3146
3147$(call gb_LinkTarget_add_defs,$(1),\
Jan-Marek Glogowski2ffb83d2017-10-30 18:45:46 +01003148 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS))) \
Jan-Marek Glogowski93359452017-10-21 13:50:30 +00003149)
3150
3151$(call gb_LinkTarget_add_libs,$(1),\
Jan-Marek Glogowski2ffb83d2017-10-30 18:45:46 +01003152 $(QT5_LIBS) \
Jan-Marek Glogowski93359452017-10-21 13:50:30 +00003153)
3154
3155ifeq ($(COM),GCC)
3156$(call gb_LinkTarget_add_cxxflags,$(1),\
3157 -Wno-shadow \
3158)
3159endif
3160
3161endef
3162
Jan-Marek Glogowski2ffb83d2017-10-30 18:45:46 +01003163else # !ENABLE_QT5
Jan-Marek Glogowski93359452017-10-21 13:50:30 +00003164
Jan-Marek Glogowski2ffb83d2017-10-30 18:45:46 +01003165define gb_LinkTarget__use_qt5
Jan-Marek Glogowski93359452017-10-21 13:50:30 +00003166
3167endef
3168
Jan-Marek Glogowski2ffb83d2017-10-30 18:45:46 +01003169endif # ENABLE_QT5
David Tardond4efa8b2012-04-28 20:48:14 +02003170
David Ostrovskye16ac692012-05-27 22:50:41 +02003171# PYTHON
Michael Stahl91926332012-11-27 15:50:53 +01003172# extra python_headers external because pyuno wrapper must not link python
Michael Stahl0443d0a2014-02-11 16:57:35 +01003173ifneq ($(SYSTEM_PYTHON),)
David Ostrovskye16ac692012-05-27 22:50:41 +02003174
Michael Stahl91926332012-11-27 15:50:53 +01003175define gb_LinkTarget__use_python_headers
David Ostrovskye16ac692012-05-27 22:50:41 +02003176$(call gb_LinkTarget_add_defs,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02003177 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYHTON_CFLAGS)))) \
David Ostrovskye16ac692012-05-27 22:50:41 +02003178)
3179
3180$(call gb_LinkTarget_set_include,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02003181 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
David Ostrovskye16ac692012-05-27 22:50:41 +02003182 $$(INCLUDE) \
3183)
3184
Michael Stahl91926332012-11-27 15:50:53 +01003185endef
3186
3187define gb_LinkTarget__use_python
3188$(call gb_LinkTarget__use_python_headers,$(1))
3189
David Ostrovskye16ac692012-05-27 22:50:41 +02003190$(call gb_LinkTarget_add_libs,$(1),\
3191 $(PYTHON_LIBS) \
3192)
3193
3194endef
3195
3196else # !SYSTEM_PYTHON
3197
Michael Stahl720ca8e2014-03-18 18:24:15 +01003198$(eval $(call gb_Helper_register_packages_for_install,python,\
3199 python3 \
3200))
3201
Michael Stahl91926332012-11-27 15:50:53 +01003202define gb_LinkTarget__use_python_headers
David Tardoncad68c62015-09-29 18:09:16 +02003203$(call gb_LinkTarget_use_external_project,$(1),python3,full)
Michael Stahl91926332012-11-27 15:50:53 +01003204$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02003205 -I$(call gb_UnpackedTarball_get_dir,python3) \
3206 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3207 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
Michael Stahl91926332012-11-27 15:50:53 +01003208 $$(INCLUDE) \
3209)
3210
3211endef
3212
David Ostrovskye16ac692012-05-27 22:50:41 +02003213define gb_LinkTarget__use_python
Michael Stahl91926332012-11-27 15:50:53 +01003214$(call gb_LinkTarget__use_python_headers,$(1))
Michael Stahld9162d22015-07-29 12:17:03 +02003215ifeq ($(OS),MACOSX)
3216$(call gb_LinkTarget_use_generated_package,$(1),python3)
3217else
Michael Stahl57dd4d02015-07-29 10:56:57 +02003218$(call gb_LinkTarget_use_package,$(1),python3)
Michael Stahld9162d22015-07-29 12:17:03 +02003219endif
David Ostrovskye16ac692012-05-27 22:50:41 +02003220
3221ifeq ($(OS),WNT)
3222$(call gb_LinkTarget_add_libs,$(1),\
David Ostrovskyde030cd2017-03-04 14:36:08 +01003223 $(call gb_UnpackedTarball_get_dir,python3)/PCbuild/$(if $(filter X86_64,$(CPUNAME)),amd64,win32)/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).lib \
David Ostrovskye16ac692012-05-27 22:50:41 +02003224)
3225else ifeq ($(OS),MACOSX)
3226$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahl9d921ba2012-11-27 15:32:36 +01003227 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
David Ostrovskye16ac692012-05-27 22:50:41 +02003228)
3229else
Michael Stahlb6bcbb62013-04-21 14:34:50 +02003230$(call gb_LinkTarget_add_libs,$(1),\
3231 -L$(call gb_UnpackedTarball_get_dir,python3) \
3232 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
David Ostrovskye16ac692012-05-27 22:50:41 +02003233)
3234endif
3235
David Ostrovskye16ac692012-05-27 22:50:41 +02003236endef
3237
David Ostrovskye16ac692012-05-27 22:50:41 +02003238endif # SYSTEM_PYTHON
3239
Kohei Yoshida49b0b692012-09-04 15:05:35 -04003240# ORCUS
Michael Stahle3abec32014-02-11 15:57:18 +01003241ifneq ($(SYSTEM_LIBORCUS),)
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003242
3243define gb_LinkTarget__use_orcus
3244$(call gb_LinkTarget_set_include,$(1),\
3245 $$(INCLUDE) \
Matúš Kukana2d63fe2012-09-09 16:29:10 +02003246 $(ORCUS_CFLAGS) \
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003247)
Rene Engelhard26b80fc2013-04-13 19:29:33 +02003248$(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
Rene Engelhardfb360f52013-04-13 16:17:29 +02003249endef
3250
3251define gb_LinkTarget__use_orcus-parser
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003252
3253endef
3254
Kohei Yoshida31f589b2012-08-30 23:26:59 -04003255else # !SYSTEM_LIBORCUS
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003256
David Tardonedb38d72015-06-04 16:09:48 +02003257ifeq ($(COM),MSC)
3258
3259$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3260 orcus \
3261 orcus-parser \
3262))
3263
Kohei Yoshidac8b7e982012-08-31 10:11:32 -04003264define gb_LinkTarget__use_orcus
Matúš Kukan1ee76032012-09-09 15:29:43 +02003265$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl10fc13c2013-05-06 23:35:13 +02003266 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
Matúš Kukan1ee76032012-09-09 15:29:43 +02003267 $$(INCLUDE) \
3268)
David Tardonf1035c12012-11-23 06:49:21 +01003269
David Tardonedb38d72015-06-04 16:09:48 +02003270$(call gb_LinkTarget_use_libraries,$(1),\
3271 orcus \
Stephan Bergmann3743cdb2013-02-17 22:58:21 +01003272)
David Tardonf1035c12012-11-23 06:49:21 +01003273
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003274endef
3275
Kohei Yoshida4d9c2fb2013-04-11 23:11:21 -04003276define gb_LinkTarget__use_orcus-parser
Kohei Yoshidaecc884e2013-12-17 21:18:46 -05003277$(call gb_LinkTarget_set_include,$(1),\
3278 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3279 $$(INCLUDE) \
3280)
David Tardonedb38d72015-06-04 16:09:48 +02003281
3282$(call gb_LinkTarget_use_libraries,$(1),\
3283 orcus-parser \
Kohei Yoshida4d9c2fb2013-04-11 23:11:21 -04003284)
3285
3286endef
3287
David Tardonedb38d72015-06-04 16:09:48 +02003288else # !MSC
3289
3290$(eval $(call gb_Helper_register_packages_for_install,ooo,\
3291 liborcus \
3292))
3293
3294define gb_LinkTarget__use_orcus
3295$(call gb_LinkTarget_use_package,$(1),liborcus)
3296
3297$(call gb_LinkTarget_set_include,$(1),\
3298 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3299 $$(INCLUDE) \
3300)
3301
3302$(call gb_LinkTarget_add_libs,$(1),\
Kohei Yoshida1d0727a2018-08-27 11:06:17 -04003303 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.14 \
David Tardonedb38d72015-06-04 16:09:48 +02003304)
3305
3306$(if $(SYSTEM_BOOST), \
3307 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3308 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3309)
3310
3311endef
3312
3313define gb_LinkTarget__use_orcus-parser
3314$(call gb_LinkTarget_use_package,$(1),liborcus)
3315
3316$(call gb_LinkTarget_set_include,$(1),\
3317 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3318 $$(INCLUDE) \
3319)
3320
3321$(call gb_LinkTarget_add_libs,$(1),\
Kohei Yoshida1d0727a2018-08-27 11:06:17 -04003322 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.14 \
David Tardonedb38d72015-06-04 16:09:48 +02003323)
3324
3325endef
3326
3327endif # MSC
3328
Kohei Yoshida31f589b2012-08-30 23:26:59 -04003329endif # SYSTEM_LIBORCUS
David Ostrovskye16ac692012-05-27 22:50:41 +02003330
David Tardon49a4d362013-11-12 16:44:40 +01003331ifeq ($(ENABLE_EOT),TRUE)
3332
Michael Stahle3abec32014-02-11 15:57:18 +01003333ifneq ($(SYSTEM_LIBEOT),)
David Tardon49a4d362013-11-12 16:44:40 +01003334
3335define gb_LinkTarget__use_libeot
3336$(call gb_LinkTarget_set_include,$(1),\
3337 $$(INCLUDE) \
3338 $(LIBEOT_CFLAGS) \
3339)
3340$(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3341
3342endef
3343
3344gb_ExternalProject__use_libeot :=
3345
3346else # !SYSTEM_LIBEOT
3347
3348define gb_LinkTarget__use_libeot
3349$(call gb_LinkTarget_set_include,$(1),\
3350 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3351 $$(INCLUDE) \
3352)
3353$(call gb_LinkTarget_add_libs,$(1),\
3354 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3355)
3356$(call gb_LinkTarget_use_external_project,$(1),libeot)
3357
3358endef
3359
3360define gb_ExternalProject__use_libeot
3361$(call gb_ExternalProject_use_external_project,$(1),libeot)
3362
3363endef
3364
3365endif # SYSTEM_LIBEOT
3366
3367else # !ENABLE_EOT
3368
3369gb_LinkTarget__use_libeot :=
3370gb_ExternalProject__use_libeot :=
3371
3372endif # ENABLE_EOT
3373
Michael Stahl78b59b82012-09-27 21:45:47 +02003374### X11 stuff ###
3375
Samuel Mehrbrodtc29ea222015-09-18 14:12:08 +02003376ifeq ($(USING_X11), TRUE)
Michael Stahl78b59b82012-09-27 21:45:47 +02003377
Michael Stahl78b59b82012-09-27 21:45:47 +02003378define gb_LinkTarget__use_Xrandr
Michael Stahl78b59b82012-09-27 21:45:47 +02003379$(call gb_LinkTarget_set_include,$(1),\
3380 $$(INCLUDE) \
3381 $(XRANDR_CFLAGS) \
3382)
3383
3384$(call gb_LinkTarget_add_libs,$(1),\
3385 $(XRANDR_LIBS) \
3386)
3387endef
3388
Michael Stahl78b59b82012-09-27 21:45:47 +02003389define gb_LinkTarget__use_Xrender
Michael Stahl78b59b82012-09-27 21:45:47 +02003390$(call gb_LinkTarget_set_include,$(1),\
3391 $$(INCLUDE) \
3392 $(XRENDER_CFLAGS) \
3393)
3394
3395$(call gb_LinkTarget_add_libs,$(1),\
3396 $(XRENDER_LIBS) \
3397)
3398endef
3399
Samuel Mehrbrodtc29ea222015-09-18 14:12:08 +02003400endif # USING_X11
Michael Stahl78b59b82012-09-27 21:45:47 +02003401
Tor Lillqvist35491072011-08-02 21:22:35 +03003402
Michael Meeksb440cfc2013-02-28 12:05:07 +00003403gb_ExternalProject__use_nss3:=
3404
Tor Lillqvist9dc7f052012-08-13 09:19:35 +03003405
Michael Stahle3abec32014-02-11 15:57:18 +01003406ifneq ($(SYSTEM_NSS),)
David Tardonb6aa4842011-08-11 13:10:14 +02003407
David Tardon2b9dbc82012-08-13 06:57:51 +02003408define gb_LinkTarget__use_nss3
3409$(call gb_LinkTarget_add_defs,$(1),\
Stephan Bergmannea641222012-11-19 16:40:33 +01003410 -DSYSTEM_NSS \
David Tardon2b9dbc82012-08-13 06:57:51 +02003411)
3412
David Tardonb6aa4842011-08-11 13:10:14 +02003413$(call gb_LinkTarget_set_include,$(1),\
3414 $$(INCLUDE) \
Tomas Chvatal75f77e62011-11-02 21:16:53 +01003415 $(NSS_CFLAGS) \
David Tardonb6aa4842011-08-11 13:10:14 +02003416)
3417
3418$(call gb_LinkTarget_add_libs,$(1),\
Tomas Chvatal75f77e62011-11-02 21:16:53 +01003419 $(NSS_LIBS) \
David Tardonb6aa4842011-08-11 13:10:14 +02003420)
Caolán McNamara24ae3ab2011-08-11 12:47:00 +01003421
David Tardonb6aa4842011-08-11 13:10:14 +02003422endef
3423
David Tardon2b9dbc82012-08-13 06:57:51 +02003424define gb_LinkTarget__use_plc4
3425$(call gb_LinkTarget__use_nss3,$(1))
3426
3427endef
3428
David Tardon6ef46562013-02-04 10:04:07 +01003429define gb_LinkTarget__use_ssl3
3430$(call gb_LinkTarget__use_nss3,$(1))
3431
3432endef
3433
Michael Stahle3abec32014-02-11 15:57:18 +01003434else # !SYSTEM_NSS
David Tardonb6aa4842011-08-11 13:10:14 +02003435
Michael Stahlffae67c2014-03-13 19:51:19 +01003436$(eval $(call gb_Helper_register_packages_for_install,ooo, \
3437 nss \
3438))
3439
David Tardon2b9dbc82012-08-13 06:57:51 +02003440define gb_LinkTarget__use_nss3
Peter Foleyc003d252013-01-01 09:39:36 -05003441$(call gb_LinkTarget_use_package,$(1),nss)
David Tardon2b9dbc82012-08-13 06:57:51 +02003442$(call gb_LinkTarget_set_include,$(1),\
3443 $$(INCLUDE) \
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003444 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3445 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
David Tardon2b9dbc82012-08-13 06:57:51 +02003446)
3447
Michael Stahld2f62c32013-10-23 00:14:01 +02003448ifeq ($(COM),MSC)
3449$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003450 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3451 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3452 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
David Tardon2b9dbc82012-08-13 06:57:51 +02003453)
Michael Stahld2f62c32013-10-23 00:14:01 +02003454else
3455$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003456 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
Michael Stahld2f62c32013-10-23 00:14:01 +02003457 -lnspr4 \
3458 -lnss3 \
3459 -lsmime3 \
3460)
3461endif
David Tardon2b9dbc82012-08-13 06:57:51 +02003462
3463endef
3464
Caolán McNamara24ae3ab2011-08-11 12:47:00 +01003465define gb_LinkTarget__use_plc4
Peter Foleyc003d252013-01-01 09:39:36 -05003466$(call gb_LinkTarget_use_package,$(1),nss)
Michael Stahld2f62c32013-10-23 00:14:01 +02003467ifeq ($(COM),MSC)
3468$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003469 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
David Tardonb6aa4842011-08-11 13:10:14 +02003470)
Michael Stahld2f62c32013-10-23 00:14:01 +02003471else
3472$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003473 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
Michael Stahld2f62c32013-10-23 00:14:01 +02003474)
3475endif
Caolán McNamara24ae3ab2011-08-11 12:47:00 +01003476
David Tardonb6aa4842011-08-11 13:10:14 +02003477endef
3478
David Tardon6ef46562013-02-04 10:04:07 +01003479define gb_LinkTarget__use_ssl3
3480$(call gb_LinkTarget_use_package,$(1),nss)
Michael Stahld2f62c32013-10-23 00:14:01 +02003481ifeq ($(COM),MSC)
3482$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003483 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
David Tardon6ef46562013-02-04 10:04:07 +01003484)
Michael Stahld2f62c32013-10-23 00:14:01 +02003485else
3486$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003487 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
Michael Stahld2f62c32013-10-23 00:14:01 +02003488)
3489endif
David Tardon6ef46562013-02-04 10:04:07 +01003490
3491endef
3492
Michael Meeksb440cfc2013-02-28 12:05:07 +00003493define gb_ExternalProject__use_nss3
3494$(call gb_ExternalProject_use_package,$(1),nss)
Michael Meeksb440cfc2013-02-28 12:05:07 +00003495
3496endef
3497
Michael Stahle3abec32014-02-11 15:57:18 +01003498endif # SYSTEM_NSS
3499
Markus Mohrharda46ef632015-11-15 04:39:24 +01003500ifeq ($(ENABLE_BREAKPAD),TRUE)
3501
Markus Mohrharda46ef632015-11-15 04:39:24 +01003502define gb_LinkTarget__use_breakpad
3503$(call gb_LinkTarget_set_include,$(1),\
3504 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3505 $$(INCLUDE) \
3506)
3507
3508ifeq ($(COM),MSC)
Markus Mohrhardff9b7d12016-03-31 00:00:03 +02003509$(call gb_LinkTarget_use_static_libraries,$(1),\
3510 breakpad \
Markus Mohrharda46ef632015-11-15 04:39:24 +01003511)
3512else
3513$(call gb_LinkTarget_add_libs,$(1),\
3514 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3515)
3516endif
3517
3518$(call gb_LinkTarget_use_external_project,$(1),breakpad)
3519
Michael Stahlb4d3a0d2016-02-23 15:08:47 +01003520endef
3521
Markus Mohrhard133a5d872016-02-27 14:50:13 +01003522endif # ENABLE_BREAKPAD
Markus Mohrharda46ef632015-11-15 04:39:24 +01003523
David Tardon7c77ff52017-11-24 10:44:42 +01003524ifeq ($(ENABLE_GPGMEPP),TRUE)
3525
Katarina Behrensaceba1e2017-02-10 16:30:51 +01003526ifneq ($(SYSTEM_GPGMEPP),)
Katarina Behrens595848c2017-01-30 15:50:55 +01003527
Katarina Behrensf41fa222017-02-23 12:57:42 +01003528gb_ExternalProject__use_gpgmepp:=
Thorsten Behrensdc003d592017-02-17 09:32:05 +01003529gb_ExternalProject__use_libassuan:=
3530gb_ExternalProject__use_libgpg-error:=
3531
Katarina Behrensf41fa222017-02-23 12:57:42 +01003532define gb_LinkTarget__use_gpgmepp
Katarina Behrens595848c2017-01-30 15:50:55 +01003533$(call gb_LinkTarget_set_include,$(1),\
3534 $$(INCLUDE) \
Katarina Behrensaceba1e2017-02-10 16:30:51 +01003535 $$(GPGMEPP_CFLAGS) \
Katarina Behrens595848c2017-01-30 15:50:55 +01003536)
3537
3538$(call gb_LinkTarget_add_libs,$(1),\
Katarina Behrensaceba1e2017-02-10 16:30:51 +01003539 $(GPGMEPP_LIBS) \
Katarina Behrens595848c2017-01-30 15:50:55 +01003540)
3541
3542endef
3543
Thorsten Behrensa27f2622017-11-23 18:06:59 +01003544else ifneq ($(filter GPGMEPP,$(BUILD_TYPE)),) # NON-SYSTEM_GPGME
Katarina Behrens55519a12017-02-15 16:00:16 +01003545
Katarina Behrensf41fa222017-02-23 12:57:42 +01003546define gb_ExternalProject__use_gpgmepp
Thorsten Behrens50a55d82017-11-15 21:31:07 +01003547$(call gb_ExternalProject_use_external_project,$(1),gpgmepp)
Thorsten Behrensdc003d592017-02-17 09:32:05 +01003548
3549endef
3550define gb_ExternalProject__use_libassuan
3551$(call gb_ExternalProject_use_external_project,$(1),libassuan)
3552
3553endef
3554define gb_ExternalProject__use_libgpg-error
3555$(call gb_ExternalProject_use_external_project,$(1),libgpg-error)
3556
3557endef
3558
Thorsten Behrens50a55d82017-11-15 21:31:07 +01003559ifneq ($(filter WNT,$(OS)),)
3560
3561define gb_LinkTarget__use_libgpg-error
3562$(call gb_LinkTarget_use_package,$(1),libgpg-error)
3563
3564$(call gb_LinkTarget_set_include,$(1),\
3565 $(GPG_ERROR_CFLAGS) \
3566 $$(INCLUDE) \
3567)
3568$(call gb_LinkTarget_add_libs,$(1),\
3569 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libgpg-error)/src/.libs libgpg-error.lib \
3570)
3571
3572endef
3573
3574define gb_LinkTarget__use_libassuan
3575$(call gb_LinkTarget_use_package,$(1),libassuan)
3576
3577$(call gb_LinkTarget_set_include,$(1),\
3578 $(LIBASSUAN_CFLAGS) \
3579 $$(INCLUDE) \
3580)
3581$(call gb_LinkTarget_add_libs,$(1),\
3582 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libassuan)/src/.libs libassuan.lib \
3583)
3584
3585endef
3586
Katarina Behrensf41fa222017-02-23 12:57:42 +01003587define gb_LinkTarget__use_gpgmepp
Katarina Behrens55519a12017-02-15 16:00:16 +01003588$(call gb_LinkTarget_set_include,$(1),\
Thorsten Behrens50a55d82017-11-15 21:31:07 +01003589 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3590 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3591 $$(GPG_ERROR_CFLAGS) \
3592 $$(INCLUDE) \
3593)
3594$(call gb_LinkTarget_use_libraries,$(1),\
3595 gpgmepp \
3596)
3597
3598endef
3599
3600$(eval $(call gb_Helper_register_packages_for_install,ooo,\
3601 libassuan \
3602 libgpg-error \
3603))
3604
3605$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3606 gpgmepp \
3607))
3608
Thorsten Behrensdb2111d2017-11-23 10:02:09 +01003609$(eval $(call gb_Helper_register_executables_for_install,OOO,ooo, \
Thorsten Behrens0b202db2017-11-24 21:02:22 +01003610 gpgme-w32spawn \
Thorsten Behrensdb2111d2017-11-23 10:02:09 +01003611))
3612
Thorsten Behrens50a55d82017-11-15 21:31:07 +01003613endif
3614
3615ifneq ($(filter MACOSX LINUX,$(OS)),)
3616
3617define gb_LinkTarget__use_gpgmepp
3618$(call gb_LinkTarget_use_package,$(1),gpgmepp)
3619
3620$(call gb_LinkTarget_set_include,$(1),\
3621 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3622 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
Samuel Mehrbrodt65866962017-02-24 16:54:36 +01003623 $$(GPG_ERROR_CFLAGS) \
Katarina Behrens55519a12017-02-15 16:00:16 +01003624 $$(INCLUDE) \
3625)
3626$(call gb_LinkTarget_add_libs,$(1),\
Thorsten Behrens50a55d82017-11-15 21:31:07 +01003627 -L$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src/.libs/ -lgpgmepp \
Caolán McNamaraa58c4442017-12-08 09:48:09 +00003628 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L$(call gb_UnpackedTarball_get_dir,gpgmepp)/src/.libs/ -lgpgme) \
3629 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(GPG_ERROR_LIBS)) \
3630 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(LIBASSUAN_LIBS)) \
Katarina Behrens55519a12017-02-15 16:00:16 +01003631)
Katarina Behrens55519a12017-02-15 16:00:16 +01003632
3633endef
3634
Thorsten Behrenscc71c6a2017-03-25 01:28:07 +01003635$(eval $(call gb_Helper_register_packages_for_install,ooo,\
Thorsten Behrens50a55d82017-11-15 21:31:07 +01003636 gpgmepp \
Thorsten Behrenscc71c6a2017-03-25 01:28:07 +01003637 libassuan \
3638 libgpg-error \
3639))
3640
Katarina Behrens595848c2017-01-30 15:50:55 +01003641endif
3642
Thorsten Behrensa4034d52017-03-26 05:57:10 +02003643endif
3644
David Tardon7c77ff52017-11-24 10:44:42 +01003645else # !ENABLE_GPGMEPP
3646
3647gb_ExternalProject__use_gpgmepp :=
3648gb_ExternalProject__use_libassuan :=
3649gb_ExternalProject__use_libgpg-error :=
3650
3651gb_LinkTarget__use_gpgmepp :=
3652gb_LinkTarget__use_libassuan :=
3653gb_LinkTarget__use_libgpg-error :=
3654
3655endif # ENABLE_GPGMEPP
3656
Stephan Bergmannecc617e2015-07-08 11:20:19 +02003657define gb_LinkTarget__use_dconf
3658$(call gb_LinkTarget_add_defs,$(1),$(DCONF_CFLAGS))
3659$(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3660endef
3661
Michael Stahl2ee5f242011-09-15 14:01:27 +02003662### Jars ############################################################
3663
Sophia Schröderf4fc28a2018-04-11 15:39:57 +01003664ifneq ($(SYSTEM_HSQLDB),)
3665
3666define gb_Jar__use_hsqldb
3667$(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3668endef
3669define gb_JunitTest__use_hsqldb
3670$(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3671endef
3672
3673else # !SYSTEM_HSQLDB
3674
3675ifeq ($(ENABLE_JAVA),TRUE)
3676$(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3677 hsqldb \
3678))
3679endif
3680
3681define gb_Jar__use_hsqldb
3682$(call gb_Jar_use_jar,$(1),hsqldb)
3683endef
3684define gb_JunitTest__use_hsqldb
3685$(call gb_JunitTest_use_jar,$(1),hsqldb)
3686endef
3687
3688endif # SYSTEM_HSQLDB
3689
3690
Rene Engelhard40facc42014-05-23 07:43:19 +02003691ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3692
Michael Stahl7d2f7c62014-02-11 19:39:18 +01003693ifneq ($(SYSTEM_BSH),)
David Tardon3bcf9102011-10-04 09:44:48 +02003694
Michael Stahla4551262012-08-15 17:41:25 +02003695define gb_Jar__use_bsh
3696$(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
David Tardon3bcf9102011-10-04 09:44:48 +02003697endef
3698
3699else # !SYSTEM_BSH
3700
David Tardon2dec0672014-05-19 10:20:37 +02003701ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl8475eb92014-03-18 20:38:30 +01003702$(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003703 bsh \
3704))
David Tardon2dec0672014-05-19 10:20:37 +02003705endif
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003706
Michael Stahla4551262012-08-15 17:41:25 +02003707define gb_Jar__use_bsh
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003708$(call gb_Jar_use_jar,$(1),bsh)
David Tardon3bcf9102011-10-04 09:44:48 +02003709endef
3710
3711endif # SYSTEM_BSH
3712
Rene Engelhard40facc42014-05-23 07:43:19 +02003713endif
3714
3715ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
Michael Stahl2ee5f242011-09-15 14:01:27 +02003716
Michael Stahl49dde4c2014-02-11 19:42:28 +01003717ifneq ($(SYSTEM_RHINO),)
Tomas Chvatal32af02b2012-05-06 12:49:33 +02003718
Michael Stahla4551262012-08-15 17:41:25 +02003719define gb_Jar__use_rhino
3720$(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
Tomas Chvatal32af02b2012-05-06 12:49:33 +02003721endef
3722
3723else # !SYSTEM_RHINO
3724
David Tardon2dec0672014-05-19 10:20:37 +02003725ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl6474d1c2014-03-18 20:50:02 +01003726$(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003727 js \
3728))
David Tardon2dec0672014-05-19 10:20:37 +02003729endif
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003730
Michael Stahla4551262012-08-15 17:41:25 +02003731define gb_Jar__use_rhino
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003732$(call gb_Jar_use_jar,$(1),js)
Tomas Chvatal32af02b2012-05-06 12:49:33 +02003733endef
3734
3735endif # SYSTEM_RHINO
3736
Rene Engelhard40facc42014-05-23 07:43:19 +02003737endif
3738
Michael Stahl7d2f7c62014-02-11 19:39:18 +01003739ifneq ($(SYSTEM_APACHE_COMMONS),)
David Tardon9b530e12012-04-07 10:07:35 +02003740
Michael Stahla4551262012-08-15 17:41:25 +02003741define gb_Jar__use_commons-logging
3742$(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003743endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02003744gb_ExternalProject__use_commons-logging :=
David Tardon9b530e12012-04-07 10:07:35 +02003745
3746else # !SYSTEM_APACHE_COMMONS
3747
David Tardon2dec0672014-05-19 10:20:37 +02003748ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl2bec9f42014-03-18 21:54:33 +01003749$(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
rbujd8a7f722014-08-18 13:52:32 +02003750 commons-logging-$(COMMONS_LOGGING_VERSION) \
Michael Stahldb23d4b2013-10-24 23:10:27 +02003751))
David Tardon2dec0672014-05-19 10:20:37 +02003752endif
David Tardon9b530e12012-04-07 10:07:35 +02003753
Michael Stahla4551262012-08-15 17:41:25 +02003754define gb_Jar__use_commons-logging
Michael Stahl461d8302013-10-25 18:40:48 +02003755$(call gb_Jar_use_external_project,$(1),apache_commons_logging)
rbujd8a7f722014-08-18 13:52:32 +02003756$(call gb_Jar_use_jar,$(1),commons-logging-$(COMMONS_LOGGING_VERSION))
David Tardon9b530e12012-04-07 10:07:35 +02003757endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02003758define gb_ExternalProject__use_commons-logging
Michael Stahla60427e2013-10-26 20:17:52 +02003759$(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
Michael Stahl2b7536a2012-10-05 21:17:25 +02003760endef
David Tardon9b530e12012-04-07 10:07:35 +02003761
3762endif # SYSTEM_APACHE_COMMONS
3763
3764
Michael Stahl32db4992014-02-11 19:35:22 +01003765ifneq ($(SYSTEM_JFREEREPORT),)
David Tardon9b530e12012-04-07 10:07:35 +02003766
Michael Stahla4551262012-08-15 17:41:25 +02003767define gb_Jar__use_flow-engine
3768$(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003769endef
3770
Michael Stahla4551262012-08-15 17:41:25 +02003771define gb_Jar__use_flute
3772$(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003773endef
3774
Michael Stahla4551262012-08-15 17:41:25 +02003775define gb_Jar__use_libbase
3776$(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003777endef
3778
Michael Stahla4551262012-08-15 17:41:25 +02003779define gb_Jar__use_libfonts
3780$(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003781endef
3782
Michael Stahla4551262012-08-15 17:41:25 +02003783define gb_Jar__use_libformula
3784$(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003785endef
3786
Michael Stahla4551262012-08-15 17:41:25 +02003787define gb_Jar__use_liblayout
3788$(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003789endef
3790
Michael Stahla4551262012-08-15 17:41:25 +02003791define gb_Jar__use_libloader
3792$(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003793endef
3794
Michael Stahla4551262012-08-15 17:41:25 +02003795define gb_Jar__use_librepository
3796$(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003797endef
3798
Michael Stahla4551262012-08-15 17:41:25 +02003799define gb_Jar__use_libserializer
3800$(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003801endef
3802
Michael Stahla4551262012-08-15 17:41:25 +02003803define gb_Jar__use_libxml
3804$(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003805endef
3806
Michael Stahla4551262012-08-15 17:41:25 +02003807define gb_Jar__use_sac
3808$(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003809endef
3810
3811else # !SYSTEM_JFREEREPORT
3812
David Tardon2dec0672014-05-19 10:20:37 +02003813ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl4c3626af2014-03-18 22:03:00 +01003814$(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
Michael Stahl070ca1e2013-10-25 21:01:58 +02003815 flow-engine \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003816 flute-1.1.6 \
3817 libbase-1.1.6 \
3818 libfonts-1.1.6 \
3819 libformula-1.1.7 \
Michael Stahl070ca1e2013-10-25 21:01:58 +02003820 liblayout \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003821 libloader-1.1.6 \
3822 librepository-1.1.6 \
3823 libserializer-1.1.6 \
3824 libxml-1.1.7 \
3825 sac \
3826))
David Tardon2dec0672014-05-19 10:20:37 +02003827endif
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003828
Michael Stahla4551262012-08-15 17:41:25 +02003829define gb_Jar__use_flow-engine
Michael Stahl070ca1e2013-10-25 21:01:58 +02003830$(call gb_Jar_use_jar,$(1),flow-engine)
David Tardon9b530e12012-04-07 10:07:35 +02003831endef
3832
Michael Stahla4551262012-08-15 17:41:25 +02003833define gb_Jar__use_flute
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003834$(call gb_Jar_use_jar,$(1),flute-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003835endef
3836
Michael Stahla4551262012-08-15 17:41:25 +02003837define gb_Jar__use_libbase
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003838$(call gb_Jar_use_jar,$(1),libbase-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003839endef
3840
Michael Stahla4551262012-08-15 17:41:25 +02003841define gb_Jar__use_libfonts
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003842$(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003843endef
3844
Michael Stahla4551262012-08-15 17:41:25 +02003845define gb_Jar__use_libformula
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003846$(call gb_Jar_use_jar,$(1),libformula-1.1.7)
David Tardon9b530e12012-04-07 10:07:35 +02003847endef
3848
Michael Stahla4551262012-08-15 17:41:25 +02003849define gb_Jar__use_liblayout
Michael Stahl070ca1e2013-10-25 21:01:58 +02003850$(call gb_Jar_use_jar,$(1),liblayout)
David Tardon9b530e12012-04-07 10:07:35 +02003851endef
3852
Michael Stahla4551262012-08-15 17:41:25 +02003853define gb_Jar__use_libloader
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003854$(call gb_Jar_use_jar,$(1),libloader-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003855endef
3856
Michael Stahla4551262012-08-15 17:41:25 +02003857define gb_Jar__use_librepository
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003858$(call gb_Jar_use_jar,$(1),librepository-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003859endef
3860
Michael Stahla4551262012-08-15 17:41:25 +02003861define gb_Jar__use_libserializer
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003862$(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003863endef
3864
Michael Stahla4551262012-08-15 17:41:25 +02003865define gb_Jar__use_libxml
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003866$(call gb_Jar_use_jar,$(1),libxml-1.1.7)
David Tardon9b530e12012-04-07 10:07:35 +02003867endef
3868
Michael Stahla4551262012-08-15 17:41:25 +02003869define gb_Jar__use_sac
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003870$(call gb_Jar_use_jar,$(1),sac)
David Tardon9b530e12012-04-07 10:07:35 +02003871endef
3872
3873endif # SYSTEM_JFREEREPORT
3874
David Tardonc2eca352012-12-02 10:51:37 +01003875
3876# Executables
3877
David Tardonedf67302012-12-30 12:27:04 +01003878# FIXME: the library target should be for build too
3879define gb_Executable__register_bestreversemap
3880$(call gb_Executable_add_runtime_dependencies,bestreversemap,\
Caolán McNamara002a83f2016-12-15 10:15:59 +00003881 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
David Tardonedf67302012-12-30 12:27:04 +01003882)
3883endef
3884
David Tardonceb0d062012-12-30 13:11:43 +01003885# TODO depending on the whole URE might be overkill, but I do not have a
3886# Windows machine to debug it...
3887# FIXME: the library target should be for build too
3888define gb_Executable__register_climaker
3889$(call gb_Executable_add_runtime_dependencies,climaker,\
3890 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
Michael Stahl4e6b4fb2015-11-27 12:49:34 +01003891 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
Tor Lillqviste4c6fe52013-04-24 15:11:39 +03003892 $(call gb_UnoApi_get_target,udkapi) \
Michael Stahl4e6b4fb2015-11-27 12:49:34 +01003893 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
David Tardonceb0d062012-12-30 13:11:43 +01003894)
3895endef
3896
David Tardon6c1614a2014-01-08 13:49:46 +01003897define gb_Executable__register_cppumaker
3898$(call gb_Executable_add_runtime_dependencies,cppumaker,\
Caolán McNamara002a83f2016-12-15 10:15:59 +00003899 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
David Tardon6c1614a2014-01-08 13:49:46 +01003900)
3901endef
3902
Matúš Kukanbae52ee2013-05-16 09:17:57 +02003903# This is used to determine what we need for 'build' platform.
Michael Stahl4e6b4fb2015-11-27 12:49:34 +01003904# FIXME: the library target should be for build too
Matúš Kukan9555b5b2013-06-14 12:48:20 +02003905define gb_Executable__register_gengal
Matúš Kukan94b68822013-06-17 10:41:18 +02003906$(call gb_Executable_add_runtime_dependencies,gengal,\
David Tardon1546c292013-05-07 20:41:41 +02003907 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
David Tardone59420d2014-08-04 17:23:54 +02003908 $(call gb_Package_get_target_for_build,postprocess_images) \
Matúš Kukan8b162f22013-09-27 10:58:28 +02003909 $(call gb_Package_get_target_for_build,postprocess_registry) \
Matúš Kukan15614c82015-12-05 07:05:37 +01003910 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3911 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3912 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
Michael Stahl4e6b4fb2015-11-27 12:49:34 +01003913 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3914 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
David Tardon1546c292013-05-07 20:41:41 +02003915 $(call gb_UnoApi_get_target,offapi) \
3916 $(call gb_UnoApi_get_target,udkapi) \
3917)
3918endef
3919
Michael Stahl187194b2014-02-11 19:17:42 +01003920ifeq ($(SYSTEM_ICU),)
David Tardonedf67302012-12-30 12:27:04 +01003921
3922define gb_Executable__register_gendict
3923$(call gb_Executable_add_runtime_dependencies,gendict,\
3924 $(call gb_Package_get_target_for_build,icu) \
Stephan Bergmann475e4b42016-10-25 16:46:35 +02003925 $(call gb_Package_get_target_for_build,icu_ure) \
David Tardonedf67302012-12-30 12:27:04 +01003926)
3927endef
3928
3929endif
3930
David Tardonceb0d062012-12-30 13:11:43 +01003931define gb_Executable__register_idlc
3932$(call gb_Executable_add_runtime_dependencies,idlc,\
David Tardonce038cf2013-10-20 20:43:46 +02003933 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
David Tardonceb0d062012-12-30 13:11:43 +01003934)
3935endef
3936
David Tardonedf67302012-12-30 12:27:04 +01003937define gb_Executable__register_localize
3938$(call gb_Executable_add_runtime_dependencies,localize,\
Caolán McNamara00657ae2017-06-11 20:56:30 +01003939 $(foreach exec,cfgex helpex propex treex ulfex xrmex,\
David Tardonedf67302012-12-30 12:27:04 +01003940 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3941 ) \
3942)
3943endef
3944
Michael Stahl4c51feb2013-09-21 01:39:41 +02003945# FIXME ure/services.rdb needs cleanup
Stephan Bergmannab149c72013-04-24 10:42:40 +02003946# The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
David Tardonedf67302012-12-30 12:27:04 +01003947# due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3948# FIXME: the library target should be for build too
3949define gb_Executable__register_saxparser
3950$(call gb_Executable_add_runtime_dependencies,saxparser,\
3951 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
David Tardon92f66c52014-10-13 16:59:33 +02003952 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
Matúš Kukanb469cd22013-05-24 12:24:27 +02003953 $(call gb_Rdb_get_target_for_build,saxparser) \
Tor Lillqvistcb872392016-08-17 01:14:54 +03003954 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
Tor Lillqviste4c6fe52013-04-24 15:11:39 +03003955 $(call gb_UnoApi_get_target,udkapi) \
David Tardonedf67302012-12-30 12:27:04 +01003956)
3957endef
3958
Stephan Bergmannab149c72013-04-24 10:42:40 +02003959# NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
David Tardonedf67302012-12-30 12:27:04 +01003960# required due to the settings for URE_SERVICES and URE_TYPES in
3961# cppuhelper/source/unorc
3962# FIXME: the library target should be for build too
3963define gb_Executable__register_uno
3964$(call gb_Executable_add_runtime_dependencies,uno,\
3965 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
Michael Stahl4e6b4fb2015-11-27 12:49:34 +01003966 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
Tor Lillqviste4c6fe52013-04-24 15:11:39 +03003967 $(call gb_UnoApi_get_target,udkapi) \
David Tardonedf67302012-12-30 12:27:04 +01003968)
3969endef
3970
3971
3972# External executables
3973
Michael Stahl379f9782014-02-11 16:49:19 +01003974ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
David Tardonc2eca352012-12-02 10:51:37 +01003975
3976gb_ExternalExecutable__register_xmllint :=
3977
3978else # ! SYSTEM_LIBXML_FOR_BUILD
3979
3980define gb_ExternalExecutable__register_xmllint
Michael Stahl84b0f062017-09-14 14:54:07 +02003981$(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 +02003982$(call gb_ExternalExecutable_add_dependencies,xmllint,\
3983 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
Michael Stahl84b0f062017-09-14 14:54:07 +02003984 $(call gb_Package_get_target,libxml2) \
David Tardon5b660242014-07-28 10:38:49 +02003985)
David Tardonc2eca352012-12-02 10:51:37 +01003986
3987endef
3988
3989endif # SYSTEM_LIBXML_FOR_BUILD
3990
Michael Stahle3abec32014-02-11 15:57:18 +01003991ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
David Tardonc2eca352012-12-02 10:51:37 +01003992
3993gb_ExternalExecutable__register_xsltproc :=
3994
3995else # ! SYSTEM_LIBXSLT_FOR_BUILD
3996
3997define gb_ExternalExecutable__register_xsltproc
Michael Stahl15b973e2017-09-14 15:26:10 +02003998$(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 +02003999$(call gb_ExternalExecutable_add_dependencies,xsltproc,\
4000 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
Michael Stahl84b0f062017-09-14 14:54:07 +02004001 $(call gb_Package_get_target,libxml2) \
Michael Stahl15b973e2017-09-14 15:26:10 +02004002 $(call gb_Package_get_target,libxslt) \
David Tardon5b660242014-07-28 10:38:49 +02004003)
David Tardonc2eca352012-12-02 10:51:37 +01004004
4005endef
4006
4007endif # SYSTEM_LIBXSLT_FOR_BUILD
4008
David Tardonce038cf2013-10-20 20:43:46 +02004009ifneq (,$(SYSTEM_UCPP))
4010
4011gb_ExternalExecutable__register_ucpp :=
4012
4013else # ! SYSTEM_UCPP
4014
4015define gb_ExternalExecutable__register_ucpp
David Tardon489d2ea2013-10-21 08:17:32 +02004016$(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
David Tardonce038cf2013-10-20 20:43:46 +02004017
4018endef
4019
4020endif # SYSTEM_UCPP
4021
Matúš Kukane4826722013-03-05 22:03:38 +01004022ifeq (,$(PYTHON_FOR_BUILD))
David Tardonc2eca352012-12-02 10:51:37 +01004023
4024define gb_ExternalExecutable__register_python
Christian Lohmaier04032bd2013-03-19 17:27:01 +01004025ifeq ($(OS),MACOSX)
4026
4027# use set_external, to avoid having the command added as prerequisite for the
4028# targets that make use of it. (Otherwise make will choke as it doesn't have a
4029# matching rule to build that specific file)
4030$(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))
4031# the Zip ensures that internal python has been built (cannot use the Package
4032# target, as that is not used on Mac)
David Tardon45a5c262013-05-16 13:36:24 +02004033$(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
Christian Lohmaier04032bd2013-03-19 17:27:01 +01004034
4035else
4036
Tor Lillqvist4c63fd102013-09-22 19:59:37 +03004037$(call gb_ExternalExecutable_set_internal,python,$(INSTROOT)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
Stephan Bergmann233610f2014-03-19 11:24:13 +01004038$(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
Christian Lohmaier04032bd2013-03-19 17:27:01 +01004039$(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
4040
4041endif
David Tardonc2eca352012-12-02 10:51:37 +01004042
4043endef
4044
Matúš Kukane4826722013-03-05 22:03:38 +01004045else
4046
4047define gb_ExternalExecutable__register_python
4048$(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
Samuel Thibault84ef6d82018-02-21 15:51:11 +01004049$(call gb_ExternalExecutable_set_precommand,python,PYTHONPATH=$$$$PYTHONPATH$$$${PYTHONPATH:+$$$${PYPATH:+:}}$$$$PYPATH)
Matúš Kukane4826722013-03-05 22:03:38 +01004050
4051endef
4052
4053endif # PYTHON_FOR_BUILD
David Tardonc2eca352012-12-02 10:51:37 +01004054
David Tardon63069262012-12-29 12:56:24 +01004055ifneq ($(SYSTEM_GENBRK),)
4056
4057define gb_ExternalExecutable__register_genbrk
4058$(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
4059
4060endef
4061
4062else # ! SYSTEM_GENBRK
4063
4064define gb_ExternalExecutable__register_genbrk
David Tardondbac8f52014-04-18 18:34:40 +02004065$(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 +01004066$(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
David Tardon63069262012-12-29 12:56:24 +01004067$(call gb_ExternalExecutable_add_dependencies,genbrk,\
4068 $(call gb_Package_get_target_for_build,icu) \
Stephan Bergmann475e4b42016-10-25 16:46:35 +02004069 $(call gb_Package_get_target_for_build,icu_ure) \
David Tardon63069262012-12-29 12:56:24 +01004070)
4071
4072endef
4073
4074endif
4075
4076ifneq ($(SYSTEM_GENCCODE),)
4077
4078define gb_ExternalExecutable__register_genccode
4079$(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
4080
4081endef
4082
4083else # ! SYSTEM_GENCCODE
4084
4085define gb_ExternalExecutable__register_genccode
David Tardondbac8f52014-04-18 18:34:40 +02004086$(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 +01004087$(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
David Tardon63069262012-12-29 12:56:24 +01004088$(call gb_ExternalExecutable_add_dependencies,genccode,\
4089 $(call gb_Package_get_target_for_build,icu) \
Stephan Bergmann475e4b42016-10-25 16:46:35 +02004090 $(call gb_Package_get_target_for_build,icu_ure) \
David Tardon63069262012-12-29 12:56:24 +01004091)
4092
4093endef
4094
4095endif
4096
4097ifneq ($(SYSTEM_GENCMN),)
4098
4099define gb_ExternalExecutable__register_gencmn
4100$(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
4101
4102endef
4103
4104else # ! SYSTEM_GENCMN
4105
4106define gb_ExternalExecutable__register_gencmn
David Tardondbac8f52014-04-18 18:34:40 +02004107$(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 +01004108$(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
David Tardon63069262012-12-29 12:56:24 +01004109$(call gb_ExternalExecutable_add_dependencies,gencmn,\
4110 $(call gb_Package_get_target_for_build,icu) \
Stephan Bergmann475e4b42016-10-25 16:46:35 +02004111 $(call gb_Package_get_target_for_build,icu_ure) \
David Tardon63069262012-12-29 12:56:24 +01004112)
4113
4114endef
4115
4116endif
4117
Jacobo Aragunde Péreze6fe5082015-02-02 19:49:37 +00004118ifeq (OWNCLOUD_ANDROID_LIB,$(filter OWNCLOUD_ANDROID_LIB,$(BUILD_TYPE)))
4119
4120$(eval $(call gb_Helper_register_jars,OXT,\
4121 owncloud-android-library \
4122))
4123
4124define gb_Jar__use_owncloud_android_lib
4125$(call gb_Jar_use_external_project,$(1),owncloud-android-lib)
4126$(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,owncloud-android-lib)/bin/owncloud-android-library.jar)
4127endef
4128define gb_ExternalProject__use_owncloud_android_lib
4129$(call gb_ExternalProject_use_external_project,$(1),owncloud_android_lib)
4130endef
4131
4132endif
4133
Nathan Yee7eb863d2015-07-03 11:58:27 +02004134ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
4135ifneq ($(SYSTEM_BZIP2),)
4136
4137define gb_LinkTarget__use_bzip2
4138$(call gb_LinkTarget_set_include,$(1),\
4139 $(BZIP2_CFLAGS) \
4140 $$(INCLUDE) \
4141)
4142$(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
4143
4144endef
Jan Holesovsky025952f2015-07-03 13:46:38 +02004145
Nathan Yee7eb863d2015-07-03 11:58:27 +02004146gb_ExternalProject__use_bzip2 :=
4147
4148else # !SYSTEM_BZIP2
4149
4150define gb_LinkTarget__use_bzip2
Nathan Yee7eb863d2015-07-03 11:58:27 +02004151$(call gb_LinkTarget_set_include,$(1),\
4152 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
4153 $$(INCLUDE) \
4154)
Nathan Yeeb59955b2015-07-14 14:36:37 -07004155
4156ifeq ($(COM),MSC)
4157$(call gb_LinkTarget_add_libs,$(1),\
4158 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
4159)
4160else
Jan Holesovsky025952f2015-07-03 13:46:38 +02004161$(call gb_LinkTarget_add_libs,$(1),\
4162 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
4163)
Nathan Yeeb59955b2015-07-14 14:36:37 -07004164endif
4165
Jan Holesovskyec477172015-07-07 09:24:45 +02004166$(call gb_LinkTarget_use_external_project,$(1),bzip2)
Nathan Yee7eb863d2015-07-03 11:58:27 +02004167endef
4168
4169define gb_ExternalProject__use_bzip2
4170$(call gb_ExternalProject_use_external_project,$(1),bzip2)
4171endef
4172
4173endif
4174endif
4175
Stephan Bergmannec53ac62016-04-12 20:06:04 +02004176define gb_LinkTarget__use_clew
4177$(call gb_LinkTarget_set_include,$(1), \
4178 -I$(SRCDIR)/external/clew/source/include \
4179 $$(INCLUDE) \
4180)
4181$(call gb_LinkTarget_use_libraries,$(1),clew)
4182endef
4183
Rene Engelhardf05d8e32017-03-06 18:49:00 +01004184ifneq ($(ENABLE_PDFIUM),)
Miklos Vajnab6f9eeb2017-02-08 11:19:39 +01004185define gb_LinkTarget__use_pdfium
4186$(call gb_LinkTarget_set_include,$(1),\
4187 -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \
4188 $$(INCLUDE) \
4189)
4190$(call gb_LinkTarget_use_libraries,$(1),pdfium)
4191endef
4192$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
4193 pdfium \
4194))
Rene Engelhardf05d8e32017-03-06 18:49:00 +01004195endif
Miklos Vajnab6f9eeb2017-02-08 11:19:39 +01004196
Mike Kaganskib8424432018-04-15 23:24:42 +03004197$(eval $(call gb_Helper_register_packages_for_install,ucrt_binarytable,\
4198 $(if $(UCRT_REDISTDIR),ucrt) \
Mike Kaganski61b1d632017-12-13 00:04:03 +03004199))
4200
Michael Stahlc74af0d2011-04-01 20:49:35 +00004201# vim: set noet sw=4 ts=4: