blob: 135cd7f6355307be5806b56d9ef6beb1732ae738 [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),\
Khaled Hosnya62e7732013-11-04 18:33:52 +0200118 -I$(SRCDIR)/external/$(if $(filter WNT,$(OS)),twain,sane)/inc \
Michael Stahl72279ea2013-05-06 20:14:35 +0200119 $$(INCLUDE) \
David Tardoneafaec92012-12-21 14:08:27 +0100120)
121
122endef
123
124else
125
126gb_LinkTarget__use_sane_headers :=
127
128endif
129
Michael Stahl8555b372014-02-11 19:28:33 +0100130ifneq ($(SYSTEM_BLUEZ),)
David Tardon8fa06c82013-11-05 06:53:49 +0100131
132gb_LinkTarget__use_bluez_bluetooth_headers :=
133
134else # !SYSTEM_BLUEZ
135
136define gb_LinkTarget__use_bluez_bluetooth_headers
137$(call gb_LinkTarget_set_include,$(1),\
138 -I$(SRCDIR)/external/bluez_bluetooth/inc \
139 $$(INCLUDE) \
140)
141
142endef
143
144endif # SYSTEM_BLUEZ
145
Matúš Kukan8e535df2012-04-07 13:59:33 +0200146# External libraries
147
Michael Stahle3abec32014-02-11 15:57:18 +0100148ifneq ($(SYSTEM_CPPUNIT),)
David Tardon785e1d92011-07-25 10:34:22 +0200149
150define gb_LinkTarget__use_cppunit
151$(call gb_LinkTarget_set_include,$(1),\
152 $$(INCLUDE) \
153 $(CPPUNIT_CFLAGS) \
154)
155
156$(call gb_LinkTarget_add_libs,$(1),\
157 $(CPPUNIT_LIBS) \
158)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100159
David Tardon785e1d92011-07-25 10:34:22 +0200160endef
161
Michael Stahle3abec32014-02-11 15:57:18 +0100162else # !SYSTEM_CPPUNIT
David Tardon785e1d92011-07-25 10:34:22 +0200163
David Tardon785e1d92011-07-25 10:34:22 +0200164define gb_LinkTarget__use_cppunit
Markus Mohrhardd63a9402016-02-23 11:28:31 +0100165$(call gb_LinkTarget_use_external_project,$(1),cppunit, full)
Peter Foley143835b2012-11-25 16:37:40 -0500166
Peter Foley143835b2012-11-25 16:37:40 -0500167$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200168 -I$(call gb_UnpackedTarball_get_dir,cppunit/include)\
Peter Foley143835b2012-11-25 16:37:40 -0500169 $$(INCLUDE) \
170)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100171
Michael Stahl77fe50b2013-10-23 23:35:16 +0200172ifeq ($(COM),MSC)
173$(call gb_LinkTarget_add_libs,$(1),\
174 $(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll/cppunitd_dll.lib,ReleaseDll/cppunit_dll.lib) \
175)
176else
177$(call gb_LinkTarget_add_libs,$(1),\
178 -L$(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/.libs -lcppunit \
179)
180endif
181
David Tardon785e1d92011-07-25 10:34:22 +0200182endef
183
Michael Stahle3abec32014-02-11 15:57:18 +0100184endif # SYSTEM_CPPUNIT
Michael Stahlc74af0d2011-04-01 20:49:35 +0000185
Michael Stahl1fe53fe2016-03-30 12:24:02 +0200186ifneq ($(ENABLE_OPENGL)$(if $(filter ANDROID,$(OS)),TRUE),)
Tor Lillqvist65b27f82014-04-08 13:36:30 +0300187ifneq ($(SYSTEM_GLEW),)
David Tardon864f7752014-02-09 21:19:07 +0100188
189define gb_LinkTarget__use_glew
190$(call gb_LinkTarget_set_include,$(1),\
191 $$(INCLUDE) \
192 $(GLEW_CFLAGS) \
193)
194$(call gb_LinkTarget_add_libs,$(1),$(GLEW_LIBS))
195
196endef
197
Zolnai Tamás6403f2b2014-06-25 15:19:41 +0200198gb_ExternalProject__use_glew :=
199
Michael Stahle3abec32014-02-11 15:57:18 +0100200else # !SYSTEM_GLEW
David Tardon864f7752014-02-09 21:19:07 +0100201
Michael Stahl0c94f232014-03-18 17:17:04 +0100202$(eval $(call gb_Helper_register_packages_for_install,ooo,\
203 glew \
204))
205
David Tardon864f7752014-02-09 21:19:07 +0100206define gb_LinkTarget__use_glew
Matúš Kukan532e8cc2014-04-08 10:30:47 +0200207$(call gb_LinkTarget_use_package,$(1),glew)
David Tardon864f7752014-02-09 21:19:07 +0100208$(call gb_LinkTarget_set_include,$(1),\
209 -I$(call gb_UnpackedTarball_get_dir,glew/include) \
Stephan Bergmannfa50ede2015-03-02 20:22:42 +0100210 -DGLEW_NO_GLU \
David Tardon864f7752014-02-09 21:19:07 +0100211 $$(INCLUDE) \
212)
213
214ifeq ($(COM),MSC)
215$(call gb_LinkTarget_add_libs,$(1),\
David Ostrovsky152e2a22014-11-30 18:26:01 +0100216 $(call gb_UnpackedTarball_get_dir,glew)/lib/$(if $(MSVC_USE_DEBUG_RUNTIME),Debug/$(wnt_arch_subdir_mandatory)/glew32d.lib,Release/$(wnt_arch_subdir_mandatory)/glew32.lib) \
David Tardon864f7752014-02-09 21:19:07 +0100217)
218else
219$(call gb_LinkTarget_add_libs,$(1),\
220 -L$(call gb_UnpackedTarball_get_dir,glew)/lib/ -lGLEW \
221)
222endif
223
224endef
225
Zolnai Tamás6403f2b2014-06-25 15:19:41 +0200226define gb_ExternalProject__use_glew
227$(call gb_ExternalProject_use_external_project,$(1),glew)
228
229endef
230
Michael Stahle3abec32014-02-11 15:57:18 +0100231endif # SYSTEM_GLEW
Oliver Specht96c1ae12016-03-23 13:40:13 +0100232endif # ENABLE_OPENGL
David Tardon864f7752014-02-09 21:19:07 +0100233
Tor Lillqvist4817f7f2015-11-02 18:14:10 +0200234ifneq ($(SYSTEM_GLYPHY),)
Markus Mohrhard8311c6e2015-10-14 15:06:55 +0200235
Tor Lillqviste461f7e2015-11-19 14:54:55 +0200236define gb_LinkTarget__use_glyphy
237$(call gb_LinkTarget_set_include,$(1),\
238 $$(INCLUDE) \
239 $(GLYPHY_CFLAGS) \
240)
241$(call gb_LinkTarget_add_libs,$(1),$(GLYPHY_LIBS))
242
243endef
Markus Mohrhard8311c6e2015-10-14 15:06:55 +0200244else # !SYSTEM_GLYPHY
245
Tor Lillqvistfdab1a62015-11-19 16:10:45 +0200246$(eval $(call gb_Helper_optional,GLYPHY,$(call gb_Helper_register_packages_for_install,ooo,\
Tor Lillqvist4817f7f2015-11-02 18:14:10 +0200247 glyphy \
Tor Lillqvistc4db7aa2015-11-19 16:06:49 +0200248)))
Tor Lillqvist4817f7f2015-11-02 18:14:10 +0200249
Markus Mohrhard8311c6e2015-10-14 15:06:55 +0200250define gb_LinkTarget__use_glyphy
251$(call gb_LinkTarget_use_package,$(1),glyphy)
252
253$(call gb_LinkTarget_set_include,$(1),\
Tor Lillqvist24beafd2015-11-16 20:16:32 +0200254 -I$(call gb_UnpackedTarball_get_dir,glyphy/src) \
Markus Mohrhard8311c6e2015-10-14 15:06:55 +0200255 $$(INCLUDE) \
256)
257
Tor Lillqvistc33a6352015-11-16 20:16:32 +0200258ifeq ($(COM),MSC)
259$(call gb_LinkTarget_add_libs,$(1),\
260 $(call gb_UnpackedTarball_get_dir,glyphy)/src/.libs/libglyphy.lib \
261)
262else
Markus Mohrhard8311c6e2015-10-14 15:06:55 +0200263$(call gb_LinkTarget_add_libs,$(1),\
264 -L$(call gb_UnpackedTarball_get_dir,glyphy)/src/.libs -lglyphy \
265)
Tor Lillqvistc33a6352015-11-16 20:16:32 +0200266endif
Markus Mohrhard8311c6e2015-10-14 15:06:55 +0200267endef
268
Tor Lillqvist4817f7f2015-11-02 18:14:10 +0200269endif # SYSTEM_GLYPHY
Markus Mohrhard8311c6e2015-10-14 15:06:55 +0200270
Tor Lillqvist40900fb2013-01-03 12:48:14 +0200271define gb_LinkTarget__use_iconv
272$(call gb_LinkTarget_add_libs,$(1),-liconv)
273
274endef
275
Michael Stahl379f9782014-02-11 16:49:19 +0100276ifneq ($(SYSTEM_MARIADB),)
Peter Foleyc322d502013-01-23 16:29:08 -0500277
David Tardon217eae42013-11-05 06:49:33 +0100278define gb_LinkTarget__use_mariadb
279$(call gb_LinkTarget_set_include,$(1),\
280 $$(INCLUDE) \
281 $(MARIADB_CFLAGS) \
282)
283$(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS))
284
285endef
286gb_ExternalProject__use_mariadb :=
287
288else # !SYSTEM_MARIADB
289
290define gb_LinkTarget__use_mariadb
291$(call gb_LinkTarget_set_include,$(1),\
292 $$(INCLUDE) \
293 $(MARIADB_CFLAGS) \
294)
295$(call gb_LinkTarget_use_static_libraries,$(1),\
296 mariadblib \
297)
298
299endef
300define gb_ExternalProject__use_mariadb
301$(call gb_ExternalProject_use_static_libraries,$(1),mariadblib)
302
303endef
304
305endif # SYSTEM_MARIADB
306
307
Michael Stahl379f9782014-02-11 16:49:19 +0100308ifneq ($(SYSTEM_MARIADB),)
David Tardon217eae42013-11-05 06:49:33 +0100309
Peter Foleyc322d502013-01-23 16:29:08 -0500310define gb_LinkTarget__use_mysql
311
312$(call gb_LinkTarget_add_defs,$(1),\
Fridrich Štrba1bf43062013-03-06 11:45:50 +0100313 -DSYSTEM_MARIADB \
Peter Foleyc322d502013-01-23 16:29:08 -0500314)
315
316$(call gb_LinkTarget_add_libs,$(1),\
Fridrich Štrbacad422a2013-03-06 16:33:07 +0100317 $(MARIADB_LIBS) \
Peter Foleyc322d502013-01-23 16:29:08 -0500318)
319
320$(call gb_LinkTarget_set_include,$(1),\
Fridrich Štrbacad422a2013-03-06 16:33:07 +0100321 $(MARIADB_CFLAGS) \
Peter Foleyc322d502013-01-23 16:29:08 -0500322 $$(INCLUDE) \
323)
324endef
325
326else
327
328define gb_LinkTarget__use_mysql
329
330$(call gb_LinkTarget_set_include,$(1),\
Peter Foleyc322d502013-01-23 16:29:08 -0500331 $$(INCLUDE) \
332)
333
334endef
335
336endif
337
Michael Stahl0443d0a2014-02-11 16:57:35 +0100338ifneq ($(SYSTEM_MYSQL_CPPCONN),)
Peter Foleyc322d502013-01-23 16:29:08 -0500339
340define gb_LinkTarget__use_mysqlcppconn
341$(call gb_LinkTarget_add_libs,$(1),\
342 -lmysqlcppconn \
343)
344
345$(call gb_LinkTarget_add_defs,$(1),\
Peter Foleyb02d7992013-01-24 15:43:52 -0500346 -DSYSTEM_MYSQL_CPPCONN \
Peter Foleyc322d502013-01-23 16:29:08 -0500347)
348endef
349
350else
351
Stephan Bergmann5afa25c2015-06-12 16:26:25 +0200352$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OXT,\
Peter Foleyc322d502013-01-23 16:29:08 -0500353 mysqlcppconn \
354))
355
Michael Stahl5f356bd2013-01-28 23:53:30 +0100356# note: this does not link mysqlcppconn, it is loaded via osl_loadModuleRelative
Peter Foleyc322d502013-01-23 16:29:08 -0500357define gb_LinkTarget__use_mysqlcppconn
358
Michael Stahl5f356bd2013-01-28 23:53:30 +0100359$(call gb_LinkTarget_use_unpacked,$(1),mysqlcppconn)
360
Peter Foleyb02d7992013-01-24 15:43:52 -0500361$(call gb_LinkTarget_add_defs,$(1),\
362 -DCPPCONN_LIB_BUILD \
363)
364
Peter Foleyc322d502013-01-23 16:29:08 -0500365$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200366 -I$(call gb_UnpackedTarball_get_dir,mysqlcppconn) \
367 -I$(call gb_UnpackedTarball_get_dir,mysqlcppconn)/cppconn \
Peter Foleyc322d502013-01-23 16:29:08 -0500368 $$(INCLUDE) \
369)
370
371endef
372
373endif
374
Michael Stahl04ff5352014-02-11 16:21:04 +0100375ifneq ($(SYSTEM_ZLIB),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000376
377define gb_LinkTarget__use_zlib
Michael Stahla88ef232011-04-13 16:11:41 +0000378$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000379 -DSYSTEM_ZLIB \
380)
381$(call gb_LinkTarget_add_libs,$(1),-lz)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100382
Michael Stahlc74af0d2011-04-01 20:49:35 +0000383endef
384
David Tardoncb276232012-10-26 15:33:26 +0200385# nothing on system
386define gb_LinkTarget__use_zlib_x64
387
388endef
389
Fridrich Štrba2f4d1602013-03-14 12:45:24 +0100390gb_ExternalProject__use_zlib :=
391
Michael Stahlc74af0d2011-04-01 20:49:35 +0000392else # !SYSTEM_ZLIB
393
David Tardoncb276232012-10-26 15:33:26 +0200394define gb_LinkTarget__use_zlib_multiarch
395$(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
396
Matúš Kukanf5ff45b2012-09-08 16:29:05 +0200397$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl3c38b772013-05-08 15:47:24 +0200398 $(ZLIB_CFLAGS) \
Matúš Kukanf5ff45b2012-09-08 16:29:05 +0200399 $$(INCLUDE) \
400)
David Tardoncb276232012-10-26 15:33:26 +0200401
Michael Stahlc923f7d2012-04-07 23:22:08 +0200402$(call gb_LinkTarget_use_static_libraries,$(1),\
David Tardoncb276232012-10-26 15:33:26 +0200403 $(2) \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000404)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100405
Michael Stahlc74af0d2011-04-01 20:49:35 +0000406endef
407
David Tardoncb276232012-10-26 15:33:26 +0200408define gb_LinkTarget__use_zlib
409$(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
410
411endef
412
413define gb_LinkTarget__use_zlib_x64
414$(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
415
416endef
417
Fridrich Štrba2f4d1602013-03-14 12:45:24 +0100418define gb_ExternalProject__use_zlib
Fridrich Štrba2f4d1602013-03-14 12:45:24 +0100419$(call gb_ExternalProject_use_static_libraries,$(1),zlib)
420
421endef
422
Michael Stahlc74af0d2011-04-01 20:49:35 +0000423endif # SYSTEM_ZLIB
424
425
Michael Stahl46648152014-02-11 16:33:18 +0100426ifneq ($(SYSTEM_JPEG),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000427
428define gb_LinkTarget__use_jpeg
429$(call gb_LinkTarget_add_libs,$(1),-ljpeg)
430$(call gb_LinkTarget_set_ldflags,$(1),\
Michael Stahl73d2fe92011-04-13 16:11:39 +0000431 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000432)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100433
Michael Stahlc74af0d2011-04-01 20:49:35 +0000434endef
435
Stephan Bergmann2d6ee4e2014-12-03 08:26:17 +0100436else ifneq ($(filter JPEG_TURBO,$(BUILD_TYPE)),)
Matúš Kukan71fae5d2014-11-17 09:16:34 +0100437
438define gb_LinkTarget__use_jpeg
439$(call gb_LinkTarget_set_include,$(1),\
440 -I$(call gb_UnpackedTarball_get_dir,jpeg-turbo) \
441 $$(INCLUDE) \
442)
443$(call gb_LinkTarget_add_libs,$(1),\
444 $(call gb_UnpackedTarball_get_dir,jpeg-turbo)/.libs/libjpeg$(gb_StaticLibrary_PLAINEXT) \
445)
Stephan Bergmann8d34d362016-02-18 12:51:41 +0100446$(call gb_LinkTarget_use_external_project,$(1),jpeg-turbo,full)
Matúš Kukan71fae5d2014-11-17 09:16:34 +0100447
448endef
449
Michael Stahlc74af0d2011-04-01 20:49:35 +0000450else # !SYSTEM_JPEG
451
Michael Stahlc74af0d2011-04-01 20:49:35 +0000452define gb_LinkTarget__use_jpeg
Matúš Kukane8a28be2012-01-21 00:46:29 +0100453$(call gb_LinkTarget_set_include,$(1),\
Michael Stahlb65859c2013-05-08 17:30:40 +0200454 -I$(call gb_UnpackedTarball_get_dir,jpeg) \
Matúš Kukane8a28be2012-01-21 00:46:29 +0100455 $$(INCLUDE) \
Matúš Kukane8a28be2012-01-21 00:46:29 +0100456)
457
Michael Stahlc923f7d2012-04-07 23:22:08 +0200458$(call gb_LinkTarget_use_static_libraries,$(1),\
David Tardon4ed91fd2012-10-12 09:32:02 +0200459 jpeg \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000460)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100461
Michael Stahlc74af0d2011-04-01 20:49:35 +0000462endef
463
464endif # SYSTEM_JPEG
465
Michael Stahlab586f12014-02-11 19:25:30 +0100466ifneq ($(SYSTEM_MYTHES),)
Peter Foley1d1bab42012-10-28 12:00:06 -0400467
468define gb_LinkTarget__use_mythes
Rene Engelhard99ef1f52012-10-28 23:00:03 +0100469$(call gb_LinkTarget_set_include,$(1),\
470 $$(INCLUDE) \
471 $(MYTHES_CFLAGS) \
472)
473$(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
474
Peter Foley1d1bab42012-10-28 12:00:06 -0400475endef
476
477else # !SYSTEM_MYTHES
478
Peter Foley1d1bab42012-10-28 12:00:06 -0400479define gb_LinkTarget__use_mythes
Michael Stahl90ad80e32013-05-07 23:59:00 +0200480$(call gb_LinkTarget_set_include,$(1),\
481 -I$(call gb_UnpackedTarball_get_dir,mythes) \
482 $$(INCLUDE) \
483)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200484
485ifeq ($(COM),MSC)
Matúš Kukan327db9f2012-10-28 22:40:30 +0100486$(call gb_LinkTarget_use_static_libraries,$(1),\
487 mythes \
Peter Foley1d1bab42012-10-28 12:00:06 -0400488)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200489else
490$(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
491$(call gb_LinkTarget_use_external_project,$(1),mythes)
492endif
Matúš Kukan327db9f2012-10-28 22:40:30 +0100493
Peter Foley1d1bab42012-10-28 12:00:06 -0400494endef
495
496endif # SYSTEM_MYTHES
497
Michael Stahlc74af0d2011-04-01 20:49:35 +0000498
Michael Stahl46648152014-02-11 16:33:18 +0100499ifneq ($(SYSTEM_EXPAT),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000500
David Tardon51149802013-04-09 09:22:20 +0200501define gb_LinkTarget__use_expat_impl
502$(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
Michael Stahlc74af0d2011-04-01 20:49:35 +0000503
Michael Stahla88ef232011-04-13 16:11:41 +0000504$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000505 -DSYSTEM_EXPAT \
506)
507
508$(call gb_LinkTarget_add_libs,$(1),-lexpat)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100509
Michael Stahlc74af0d2011-04-01 20:49:35 +0000510endef
511
Michael Stahl77289672012-11-17 00:36:29 +0100512gb_ExternalProject__use_expat :=
513
Michael Stahlc74af0d2011-04-01 20:49:35 +0000514else # !SYSTEM_EXPAT
515
David Tardon51149802013-04-09 09:22:20 +0200516define gb_LinkTarget__use_expat_impl
517$(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
Michael Stahlc74af0d2011-04-01 20:49:35 +0000518
David Ostrovsky2ffde7b2012-10-12 12:28:11 -0700519$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl5e037bb2013-05-07 21:47:18 +0200520 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
David Ostrovsky2ffde7b2012-10-12 12:28:11 -0700521 $$(INCLUDE) \
522)
523
Michael Stahlc923f7d2012-04-07 23:22:08 +0200524$(call gb_LinkTarget_use_static_libraries,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000525 $(2) \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000526)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100527
Michael Stahlc74af0d2011-04-01 20:49:35 +0000528endef
529
Michael Stahl77289672012-11-17 00:36:29 +0100530define gb_ExternalProject__use_expat
Michael Stahl77289672012-11-17 00:36:29 +0100531$(call gb_ExternalProject_use_static_libraries,$(1),expat)
532
533endef
534
Michael Stahlc74af0d2011-04-01 20:49:35 +0000535endif # SYSTEM_EXPAT
536
David Tardon51149802013-04-09 09:22:20 +0200537define gb_LinkTarget__use_expat
538$(call gb_LinkTarget__use_expat_impl,$(1),expat)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100539
Michael Stahlc74af0d2011-04-01 20:49:35 +0000540endef
541
David Tardon51149802013-04-09 09:22:20 +0200542define gb_LinkTarget__use_expat_x64
543$(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100544
Michael Stahlc74af0d2011-04-01 20:49:35 +0000545endef
546
Michael Stahl9fc9e9c2014-02-11 19:21:36 +0100547ifneq ($(SYSTEM_HYPH),)
Peter Foleydd584cb2012-11-03 13:54:46 -0400548
549define gb_LinkTarget__use_hyphen
550$(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
551
552endef
553
554else # !SYSTEM_HYPH
555
Peter Foleydd584cb2012-11-03 13:54:46 -0400556define gb_LinkTarget__use_hyphen
557$(call gb_LinkTarget_use_unpacked,$(1),hyphen)
558$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200559 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
Peter Foleydd584cb2012-11-03 13:54:46 -0400560 $$(INCLUDE) \
561)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200562
563ifeq ($(COM),MSC)
Peter Foleydd584cb2012-11-03 13:54:46 -0400564$(call gb_LinkTarget_use_static_libraries,$(1),\
565 hyphen \
566)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200567else
568$(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
569$(call gb_LinkTarget_use_external_project,$(1),hyphen)
570endif
Peter Foleydd584cb2012-11-03 13:54:46 -0400571
572endef
573
574endif # SYSTEM_HYPH
575
Michael Stahl9fc9e9c2014-02-11 19:21:36 +0100576ifneq ($(SYSTEM_HUNSPELL),)
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100577
578define gb_LinkTarget__use_hunspell
579$(call gb_LinkTarget_set_include,$(1),\
580 $$(INCLUDE) \
581 $(HUNSPELL_CFLAGS) \
582)
583$(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
584
585endef
586
Michael Stahl2f6261f2013-09-19 19:28:36 +0200587gb_ExternalProject__use_hunspell :=
588
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100589else # !SYSTEM_HUNSPELL
590
591define gb_LinkTarget__use_hunspell
592$(call gb_LinkTarget_add_defs,$(1),\
593 -DHUNSPELL_STATIC \
594)
Matúš Kukan7a030392012-10-29 23:29:37 +0100595$(call gb_LinkTarget_use_unpacked,$(1),hunspell)
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100596$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200597 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
Matúš Kukan7a030392012-10-29 23:29:37 +0100598 $$(INCLUDE) \
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100599)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200600
601ifeq ($(COM),MSC)
Michael Stahlc923f7d2012-04-07 23:22:08 +0200602$(call gb_LinkTarget_use_static_libraries,$(1),\
Matúš Kukan327db9f2012-10-28 22:40:30 +0100603 hunspell \
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100604)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200605else
606$(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
607$(call gb_LinkTarget_use_external_project,$(1),hunspell)
608endif
609
610endef
611
612define gb_ExternalProject__use_hunspell
613$(call gb_ExternalProject_use_external_project,$(1),hunspell)
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100614
615endef
616
617endif # SYSTEM_HUNSPELL
618
619
Michael Stahladddbbc2014-02-11 18:40:09 +0100620ifneq ($(SYSTEM_BOOST),)
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200621
David Tardon57c439a2016-03-08 06:06:36 +0100622define gb_LinkTarget__use_boost_lib
David Tardon0f6919c2012-06-06 17:04:01 +0200623$(call gb_LinkTarget_set_include,$(1),\
624 $$(INCLUDE) \
625 $(BOOST_CPPFLAGS) \
626)
627
628$(call gb_LinkTarget_add_ldflags,$(1),\
629 $(BOOST_LDFLAGS) \
630)
631
David Tardon57c439a2016-03-08 06:06:36 +0100632$(call gb_LinkTarget_add_libs,$(1),$(2))
633
634endef
635
David Tardon23d2e0e2016-03-08 08:35:59 +0100636define gb_LinkTarget__use_boost_date_time
David Tardon57c439a2016-03-08 06:06:36 +0100637$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
David Tardon0f6919c2012-06-06 17:04:01 +0200638
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200639endef
640
David Tardonb4339fa2016-03-08 06:08:36 +0100641define gb_LinkTarget__use_boost_filesystem
642$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_FILESYSTEM_LIB))
643
644endef
645
646gb_ExternalProject__use_boost_filesystem :=
647
Markus Mohrhard36788e92014-01-08 13:17:28 +0100648define gb_LinkTarget__use_boost_iostreams
David Tardon57c439a2016-03-08 06:06:36 +0100649$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
Markus Mohrhard36788e92014-01-08 13:17:28 +0100650
651endef
652
David Tardon6d9de6b2014-03-03 20:39:13 +0100653gb_ExternalProject__use_boost_iostreams :=
654
Markus Mohrhard36788e92014-01-08 13:17:28 +0100655define gb_LinkTarget__use_boost_system
David Tardon57c439a2016-03-08 06:06:36 +0100656$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB))
Tor Lillqvist503b2482013-05-22 19:50:22 +0300657
658endef
659
Markus Mohrhard36788e92014-01-08 13:17:28 +0100660gb_ExternalProject__use_boost_system :=
Tor Lillqvist503b2482013-05-22 19:50:22 +0300661
Stephan Bergmann93208022013-02-16 22:56:19 +0100662define gb_LinkTarget__use_boost_headers
663$(call gb_LinkTarget_set_include,$(1),\
664 $$(INCLUDE) \
665 $(BOOST_CPPFLAGS) \
666)
667
668endef
669
Peter Foleycdb6eca2012-11-10 08:56:12 -0500670gb_ExternalProject__use_boost_headers:=
671
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200672else # !SYSTEM_BOOST
673
David Tardon57c439a2016-03-08 06:06:36 +0100674define gb_LinkTarget__use_boost_lib
Michael Stahl7f2e1682012-09-06 20:22:11 +0200675$(call gb_LinkTarget_add_defs,$(1),\
676 -DBOOST_ALL_NO_LIB \
677)
678
David Tardon57c439a2016-03-08 06:06:36 +0100679$(call gb_LinkTarget_use_static_libraries,$(1),$(2))
680
681endef
682
David Tardon23d2e0e2016-03-08 08:35:59 +0100683define gb_LinkTarget__use_boost_date_time
684$(call gb_LinkTarget__use_boost_lib,$(1),boost_date_time)
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200685
686endef
687
David Tardond72a33c2016-03-08 05:57:40 +0100688define gb_LinkTarget__use_boost_filesystem
David Tardon57c439a2016-03-08 06:06:36 +0100689$(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem)
David Tardond72a33c2016-03-08 05:57:40 +0100690
691endef
692
693define gb_ExternalProject__use_boost_filesystem
694$(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
695endef
696
Markus Mohrhard36788e92014-01-08 13:17:28 +0100697define gb_LinkTarget__use_boost_iostreams
David Tardon57c439a2016-03-08 06:06:36 +0100698$(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams)
Tor Lillqvist503b2482013-05-22 19:50:22 +0300699
700endef
701
Markus Mohrhard36788e92014-01-08 13:17:28 +0100702define gb_ExternalProject__use_boost_iostreams
703$(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
704endef
705
706define gb_LinkTarget__use_boost_system
David Tardon57c439a2016-03-08 06:06:36 +0100707$(call gb_LinkTarget__use_boost_lib,$(1),boost_system)
Markus Mohrhard36788e92014-01-08 13:17:28 +0100708
709endef
710
711define gb_ExternalProject__use_boost_system
712$(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
Tor Lillqvist503b2482013-05-22 19:50:22 +0300713endef
714
Peter Foleye1f742a2012-11-12 18:37:10 -0500715define gb_LinkTarget__use_boost_headers
Christian Lohmaier1654a1e72012-11-14 18:11:30 +0100716$(call gb_LinkTarget_use_unpacked,$(1),boost)
Michael Stahla53586f2013-01-26 21:19:13 +0100717$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200718 -I$(call gb_UnpackedTarball_get_dir,boost) \
Michael Stahla53586f2013-01-26 21:19:13 +0100719 $$(INCLUDE) \
720)
Peter Foleye1f742a2012-11-12 18:37:10 -0500721
722endef
723
Peter Foleycdb6eca2012-11-10 08:56:12 -0500724define gb_ExternalProject__use_boost_headers
David Tardon682e3592015-06-24 15:11:40 +0200725$(call gb_ExternalProject_use_unpacked,$(1),boost)
Peter Foleycdb6eca2012-11-10 08:56:12 -0500726
727endef
David Tardond72a33c2016-03-08 05:57:40 +0100728
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200729endif # SYSTEM_BOOST
730
731
Michael Stahle3abec32014-02-11 15:57:18 +0100732ifneq ($(SYSTEM_CMIS),)
Matúš Kukan464b4332012-01-15 02:12:49 +0100733
734define gb_LinkTarget__use_cmis
735$(call gb_LinkTarget_set_include,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +0100736 $$(INCLUDE) \
Matúš Kukan707194e2012-09-06 18:19:34 +0200737 $(CMIS_CFLAGS) \
Matúš Kukan464b4332012-01-15 02:12:49 +0100738)
Matúš Kukan707194e2012-09-06 18:19:34 +0200739$(call gb_LinkTarget_add_libs,$(1),$(CMIS_LIBS))
Matúš Kukan464b4332012-01-15 02:12:49 +0100740
741endef
742
Bjoern Michaelsen88ed6d12013-02-19 11:10:16 +0100743else # !SYSTEM_CMIS
Matúš Kukan464b4332012-01-15 02:12:49 +0100744
Matúš Kukan464b4332012-01-15 02:12:49 +0100745define gb_LinkTarget__use_cmis
Michael Stahl759d02b2013-05-08 00:55:21 +0200746$(call gb_LinkTarget_set_include,$(1),\
747 -I$(call gb_UnpackedTarball_get_dir,cmis)/src \
748 $$(INCLUDE) \
749)
Michael Stahlc923f7d2012-04-07 23:22:08 +0200750$(call gb_LinkTarget_use_static_libraries,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +0100751 cmislib \
752)
753
754endef
755
Bjoern Michaelsen88ed6d12013-02-19 11:10:16 +0100756endif # SYSTEM_CMIS
Matúš Kukan464b4332012-01-15 02:12:49 +0100757
David Tardon32cd12c2014-04-26 19:46:40 +0200758ifeq ($(ENABLE_JAVA),TRUE)
David Tardon2a71e152014-04-26 16:08:07 +0200759
Peter Foleye5ccda42012-12-25 11:23:58 -0500760ifeq ($(OS)$(COM),WNTGCC)
761
762define gb_LinkTarget__use_jawt
David Tardon943dedc2014-04-26 15:50:10 +0200763$(call gb_LinkTarget_use_custom_headers,$(1),external/jawt)
764
765$(call gb_LinkTarget_add_ldflags,$(1),\
766 -L$(call gb_CustomTarget_get_workdir,external/jawt) \
767)
768
769$(call gb_LinkTarget_add_libs,$(1),\
David Tardon2a71e152014-04-26 16:08:07 +0200770 $(JAWTLIB) \
Peter Foleye5ccda42012-12-25 11:23:58 -0500771)
772
773endef
774
775else # $(OS)$(COM) != WNTGCC
776
David Tardon2a71e152014-04-26 16:08:07 +0200777define gb_LinkTarget__use_jawt
778$(call gb_LinkTarget_add_libs,$(1),\
779 $(JAWTLIB) \
780)
781
782endef
Peter Foleye5ccda42012-12-25 11:23:58 -0500783
784endif # $(OS)$(COM) = WNTGCC
785
David Tardon2a71e152014-04-26 16:08:07 +0200786else # !ENABLE_JAVA
787
788gb_LinkTarget__use_jawt :=
789
790endif # ENABLE_JAVA
Matúš Kukan464b4332012-01-15 02:12:49 +0100791
Michael Stahl23647592014-02-11 19:04:20 +0100792ifneq ($(SYSTEM_LIBATOMIC_OPS),)
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100793
794define gb_LinkTarget__use_libatomic_ops
795$(call gb_LinkTarget_set_include,$(1),\
796 $$(INCLUDE) \
797 $(LIBATOMIC_OPS_CFLAGS) \
798)
799$(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
800
801endef
802gb_ExternalProject__use_libatomic_ops :=
803
804else # !SYSTEM_LIBATOMIC_OPS
805
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100806define gb_LinkTarget__use_libatomic_ops
807$(call gb_LinkTarget_set_include,$(1),\
808$(LIBATOMIC_OPS_CFLAGS) \
809 $$(INCLUDE) \
810 $(LIBATOMIC_OPS_CFLAGS) \
811)
Michael Stahlb3085262013-10-24 12:22:58 +0200812$(call gb_LinkTarget_use_external_project,$(1),\
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100813 libatomic_ops \
814)
Andrzej J.R. Huntf479f622013-09-05 16:27:50 +0100815
Michael Stahlb3085262013-10-24 12:22:58 +0200816$(call gb_LinkTarget_add_libs,$(1),\
Andrzej J.R. Huntf479f622013-09-05 16:27:50 +0100817 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100818)
819
820endef
821
822define gb_ExternalProject__use_libatomic_ops
Michael Stahlb3085262013-10-24 12:22:58 +0200823$(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100824
825endef
826
827endif # SYSTEM_LIBATOMIC_OPS
828
829
Michael Stahle3abec32014-02-11 15:57:18 +0100830ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
Matúš Kukanbd030302011-12-03 15:06:52 +0100831
832define gb_LinkTarget__use_libexttextcat
833$(call gb_LinkTarget_set_include,$(1),\
834 $$(INCLUDE) \
835 $(LIBEXTTEXTCAT_CFLAGS) \
836)
Peter Foley31219f02012-11-09 17:25:56 -0500837$(call gb_LinkTarget_add_defs,$(1),\
838 -DSYSTEM_LIBEXTTEXTCAT \
839)
Matúš Kukanbd030302011-12-03 15:06:52 +0100840$(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
841
842endef
843
844else # !SYSTEM_LIBEXTTEXTCAT
845
Matúš Kukanbd030302011-12-03 15:06:52 +0100846define gb_LinkTarget__use_libexttextcat
Peter Foley31219f02012-11-09 17:25:56 -0500847$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200848 -I$(call gb_UnpackedTarball_get_dir,exttextcat/src) \
Peter Foley31219f02012-11-09 17:25:56 -0500849 $$(INCLUDE) \
850)
Matúš Kukanbd030302011-12-03 15:06:52 +0100851
Michael Stahl2f6261f2013-09-19 19:28:36 +0200852ifeq ($(COM),MSC)
853$(call gb_LinkTarget_use_static_libraries,$(1),\
854 exttextcat \
855)
856else
857$(call gb_LinkTarget_add_libs,$(1),\
858 $(call gb_UnpackedTarball_get_dir,exttextcat)/src/.libs/libexttextcat-2.0.a\
859)
David Tardon523a3042013-10-12 18:22:55 +0200860$(call gb_LinkTarget_use_external_project,$(1),exttextcat)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200861endif
862
863
Matúš Kukanbd030302011-12-03 15:06:52 +0100864endef
865
866endif # SYSTEM_LIBEXTTEXTCAT
867
868
Michael Stahl379f9782014-02-11 16:49:19 +0100869ifneq ($(SYSTEM_LIBXML),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000870
871define gb_LinkTarget__use_libxml2
Michael Stahla88ef232011-04-13 16:11:41 +0000872$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000873 -DSYSTEM_LIBXML \
874)
875$(call gb_LinkTarget_set_include,$(1),\
876 $$(INCLUDE) \
877 $(LIBXML_CFLAGS) \
878)
879$(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +0100880
Michael Stahlc74af0d2011-04-01 20:49:35 +0000881endef
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500882gb_ExternalProject__use_libxml2:=
Michael Stahlc74af0d2011-04-01 20:49:35 +0000883
884else # !SYSTEM_LIBXML
885
Michael Stahl64ea9942014-03-14 11:48:24 +0100886$(eval $(call gb_Helper_register_packages_for_install,ure,\
887 xml2 \
888))
889
Michael Stahlc74af0d2011-04-01 20:49:35 +0000890define gb_LinkTarget__use_libxml2
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500891$(call gb_LinkTarget_use_package,$(1),xml2)
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500892$(call gb_LinkTarget_set_include,$(1),\
893 $$(INCLUDE) \
David Tardon7515b1a2014-07-17 17:27:05 +0200894 $(LIBXML_CFLAGS) \
895)
896
897$(call gb_LinkTarget_add_libs,$(1),\
898 $(LIBXML_LIBS) \
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500899)
900
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200901ifeq ($(COM),MSC)
David Tardon7515b1a2014-07-17 17:27:05 +0200902$(call gb_LinkTarget_use_external,$(1),icu_headers)
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200903endif
904
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500905endef
906define gb_ExternalProject__use_libxml2
907$(call gb_ExternalProject_use_package,$(1),xml2)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100908
David Tardon7515b1a2014-07-17 17:27:05 +0200909ifeq ($(COM),MSC)
910$(call gb_ExternalProject_use_external_project,$(1),icu)
911endif
912
Michael Stahlc74af0d2011-04-01 20:49:35 +0000913endef
914
915endif # SYSTEM_LIBXML
916
917
Michael Stahle3abec32014-02-11 15:57:18 +0100918ifneq ($(SYSTEM_LIBXSLT),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000919
920define gb_LinkTarget__use_libxslt
921$(call gb_LinkTarget_set_include,$(1),\
922 $$(INCLUDE) \
923 $(LIBXSLT_CFLAGS) \
924)
925$(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +0100926
Michael Stahlc74af0d2011-04-01 20:49:35 +0000927endef
928
David Tardonab03e872012-08-15 07:20:13 +0200929define gb_LinkTarget__use_libexslt
930$(call gb_LinkTarget_set_include,$(1),\
931 $$(INCLUDE) \
932 $(LIBEXSLT_CFLAGS) \
933)
934
935$(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
936
937endef
938
Michael Stahlc74af0d2011-04-01 20:49:35 +0000939else # !SYSTEM_LIBXSLT
940
Michael Stahl32a617d2014-02-17 11:23:19 +0100941$(eval $(call gb_Helper_register_packages_for_install,ooo,\
942 xslt \
943))
944
Michael Stahlc74af0d2011-04-01 20:49:35 +0000945define gb_LinkTarget__use_libxslt
Peter Foley856c0752013-02-02 15:44:30 -0500946$(call gb_LinkTarget_use_package,$(1),xslt)
947$(call gb_LinkTarget_set_include,$(1),\
948 $$(INCLUDE) \
Michael Stahl70fcfee2013-04-01 12:47:16 +0200949 -I$(call gb_UnpackedTarball_get_dir,xslt) \
Peter Foley856c0752013-02-02 15:44:30 -0500950)
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200951
952ifeq ($(COM),MSC)
953$(call gb_LinkTarget_add_libs,$(1),\
954 $(call gb_UnpackedTarball_get_dir,xslt)/win32/bin.msvc/libxslt.lib \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000955)
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200956else
957$(call gb_LinkTarget_add_libs,$(1),\
958 -L$(call gb_UnpackedTarball_get_dir,xslt)/libxslt/.libs -lxslt \
959)
960endif
Caolán McNamara6bccd202011-07-25 22:10:33 +0100961
Michael Stahlc74af0d2011-04-01 20:49:35 +0000962endef
963
David Tardonab03e872012-08-15 07:20:13 +0200964define gb_LinkTarget__use_libexslt
Peter Foley856c0752013-02-02 15:44:30 -0500965$(call gb_LinkTarget_use_package,$(1),xslt)
966$(call gb_LinkTarget_set_include,$(1),\
967 $$(INCLUDE) \
Michael Stahl70fcfee2013-04-01 12:47:16 +0200968 -I$(call gb_UnpackedTarball_get_dir,xslt) \
Peter Foley856c0752013-02-02 15:44:30 -0500969)
970
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200971ifeq ($(COM),MSC)
972$(call gb_LinkTarget_add_libs,$(1),\
973 $(call gb_UnpackedTarball_get_dir,xslt)/win32/bin.msvc/libexslt.lib \
David Tardonab03e872012-08-15 07:20:13 +0200974)
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200975else
976$(call gb_LinkTarget_add_libs,$(1),\
977 -L$(call gb_UnpackedTarball_get_dir,xslt)/libexslt/.libs -lexslt \
978)
979endif
David Tardonab03e872012-08-15 07:20:13 +0200980
981endef
982
Michael Stahlc74af0d2011-04-01 20:49:35 +0000983endif # SYSTEM_LIBXSLT
984
Norbert Thiebaud587d9692013-08-29 10:38:00 -0500985ifeq ($(ENABLE_LIBLANGTAG),TRUE)
Jan Holesovsky6a7b32b02012-08-10 10:27:54 +0200986
Michael Stahl49dde4c2014-02-11 19:42:28 +0100987ifneq ($(SYSTEM_LIBLANGTAG),)
Eike Rathkea774a482012-08-06 19:22:43 +0200988
989define gb_LinkTarget__use_liblangtag
990$(call gb_LinkTarget_set_include,$(1),\
991 $$(INCLUDE) \
992 $(LIBLANGTAG_CFLAGS) \
993)
994
995$(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
996
997endef
998
David Tardonc2a119b2016-01-13 14:24:31 +0100999gb_ExternalProject__use_liblangtag :=
1000
Eike Rathkea774a482012-08-06 19:22:43 +02001001else # !SYSTEM_LIBLANGTAG
1002
Michael Stahl01adcd82014-03-18 17:38:06 +01001003$(eval $(call gb_Helper_register_packages_for_install,ooo,\
1004 liblangtag_data \
1005))
1006
David Tardon7d93bb82016-01-13 15:45:17 +01001007ifeq ($(COM),MSC)
1008
Eike Rathkea774a482012-08-06 19:22:43 +02001009define gb_LinkTarget__use_liblangtag
Peter Foley782151a2012-11-11 16:02:36 -05001010$(call gb_LinkTarget_set_include,$(1),\
David Tardon34513502016-01-13 14:21:10 +01001011 $(LIBLANGTAG_CFLAGS) \
Peter Foley782151a2012-11-11 16:02:36 -05001012 $$(INCLUDE) \
1013)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001014$(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1015$(call gb_LinkTarget_use_external_project,$(1),langtag)
Eike Rathkea774a482012-08-06 19:22:43 +02001016
1017endef
1018
David Tardon7d93bb82016-01-13 15:45:17 +01001019else
1020
1021$(eval $(call gb_Helper_register_packages_for_install,ooo,\
1022 liblangtag \
1023))
1024
1025define gb_LinkTarget__use_liblangtag
1026$(call gb_LinkTarget_set_include,$(1),\
1027 $(LIBLANGTAG_CFLAGS) \
1028 $$(INCLUDE) \
1029)
1030$(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1031$(call gb_LinkTarget_use_package,$(1),liblangtag)
1032
1033endef
1034
1035endif # MSC
1036
David Tardonc2a119b2016-01-13 14:24:31 +01001037define gb_ExternalProject__use_liblangtag
1038$(call gb_ExternalProject_use_external_project,$(1),langtag)
1039
1040endef
1041
Eike Rathkea774a482012-08-06 19:22:43 +02001042endif # SYSTEM_LIBLANGTAG
1043
Matúš Kukan51ba7db2013-05-02 12:19:35 +02001044else
1045
1046gb_LinkTarget__use_liblangtag :=
David Tardonc2a119b2016-01-13 14:24:31 +01001047gb_ExternalProject__use_liblangtag :=
Matúš Kukan51ba7db2013-05-02 12:19:35 +02001048
Jan Holesovsky6a7b32b02012-08-10 10:27:54 +02001049endif # ENABLE_LIBLANGTAG
1050
Matúš Kukandcae0502014-02-25 21:47:33 +01001051gb_ExternalProject__use_apr :=
1052
1053ifeq ($(WITH_WEBDAV),serf)
Matúš Kukan0b272532014-02-06 12:28:36 +01001054
1055define gb_LinkTarget__use_apr
1056$(call gb_LinkTarget_set_include,$(1),\
1057 $$(INCLUDE) \
1058 $(APR_CFLAGS) \
1059)
1060$(call gb_LinkTarget_add_libs,$(1),\
1061 $(APR_LIBS) \
Michael Stahl5cf22052014-06-05 13:35:14 +02001062 $(if $(filter $(OS),LINUX),-lpthread) \
1063 $(if $(filter $(OS),MACOSX),-liconv) \
Matúš Kukan0b272532014-02-06 12:28:36 +01001064)
1065
1066ifeq ($(SYSTEM_APR),)
1067$(call gb_LinkTarget_use_system_win32_libs,$(1),\
1068 mswsock \
1069 rpcrt4 \
1070 shell32 \
1071)
1072$(call gb_LinkTarget_add_defs,$(1),\
1073 -DAPR_DECLARE_STATIC \
1074 -DAPU_DECLARE_STATIC \
1075)
1076$(call gb_LinkTarget_use_external_project,$(1),apr_util)
1077endif
1078
1079endef
1080
1081define gb_ExternalProject__use_apr
1082ifeq ($(SYSTEM_APR),)
1083$(call gb_ExternalProject_use_external_project,$(1),apr_util)
1084endif
1085
1086endef
1087
1088define gb_LinkTarget__use_serf
1089$(call gb_LinkTarget_set_include,$(1),\
1090 $(SERF_CFLAGS) \
1091 $$(INCLUDE) \
1092)
1093$(call gb_LinkTarget_add_libs,$(1),\
1094 $(SERF_LIBS) \
1095)
1096
1097ifeq ($(SYSTEM_SERF),)
1098$(call gb_LinkTarget_use_external_project,$(1),serf)
1099endif
1100
1101endef
1102
Matúš Kukandcae0502014-02-25 21:47:33 +01001103else ifeq ($(WITH_WEBDAV),neon)
Eike Rathkea774a482012-08-06 19:22:43 +02001104
Michael Stahle3abec32014-02-11 15:57:18 +01001105ifneq ($(SYSTEM_NEON),)
Matúš Kukan464b4332012-01-15 02:12:49 +01001106
1107define gb_LinkTarget__use_neon
Matúš Kukan464b4332012-01-15 02:12:49 +01001108$(call gb_LinkTarget_add_defs,$(1),\
1109 -DNEON_VERSION=0x$(NEON_VERSION) \
David Tardonb74bf412013-08-12 09:39:59 +02001110 -DSYSTEM_NEON \
Matúš Kukan464b4332012-01-15 02:12:49 +01001111)
Matúš Kukan464b4332012-01-15 02:12:49 +01001112$(call gb_LinkTarget_set_include,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +01001113 $$(INCLUDE) \
Caolán McNamara1ac9ccf2012-01-16 08:57:38 +00001114 $(NEON_CFLAGS) \
Matúš Kukan464b4332012-01-15 02:12:49 +01001115)
1116
1117$(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
1118
1119endef
1120
1121else # !SYSTEM_NEON
1122
Marcos Paulo de Souzaf70343b2014-02-12 06:53:02 -02001123$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
Matúš Kukan464b4332012-01-15 02:12:49 +01001124 neon \
1125))
1126
1127define gb_LinkTarget__use_neon
Matúš Kukan7a030392012-10-29 23:29:37 +01001128$(call gb_LinkTarget_use_unpacked,$(1),neon)
Matúš Kukan464b4332012-01-15 02:12:49 +01001129$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001130 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
Matúš Kukan464b4332012-01-15 02:12:49 +01001131 $$(INCLUDE) \
1132)
Michael Stahlc923f7d2012-04-07 23:22:08 +02001133$(call gb_LinkTarget_use_libraries,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +01001134 neon \
1135)
1136
1137endef
1138
1139endif # SYSTEM_NEON
1140
Matúš Kukandcae0502014-02-25 21:47:33 +01001141endif # WITH_WEBDAV
Matúš Kukan464b4332012-01-15 02:12:49 +01001142
Michael Stahle3abec32014-02-11 15:57:18 +01001143ifneq ($(SYSTEM_REDLAND),)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001144
1145define gb_LinkTarget__use_librdf
Michael Stahla88ef232011-04-13 16:11:41 +00001146$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +00001147 -DSYSTEM_REDLAND \
1148)
1149$(call gb_LinkTarget_set_include,$(1),\
1150 $$(INCLUDE) \
1151 $(REDLAND_CFLAGS) \
1152)
1153$(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +01001154
Michael Stahlc74af0d2011-04-01 20:49:35 +00001155endef
1156
Peter Foley18bd1e72012-12-27 18:04:21 -05001157gb_LinkTarget__use_redland_headers:=
1158
1159gb_LinkTarget__use_raptor_headers:=
1160
1161gb_LinkTarget__use_rasqal_headers:=
1162
Michael Stahlc74af0d2011-04-01 20:49:35 +00001163else # !SYSTEM_REDLAND
1164
Peter Foley18bd1e72012-12-27 18:04:21 -05001165define gb_LinkTarget__use_redland_headers
1166$(call gb_LinkTarget_set_include,$(1),\
Michael Stahld719c012013-04-01 12:41:18 +02001167 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
Peter Foley18bd1e72012-12-27 18:04:21 -05001168 $$(INCLUDE) \
1169)
1170
1171endef
1172
1173define gb_LinkTarget__use_raptor_headers
1174$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001175 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
Peter Foley18bd1e72012-12-27 18:04:21 -05001176 $$(INCLUDE) \
1177)
1178
1179endef
1180
1181define gb_LinkTarget__use_rasqal_headers
1182$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001183 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
Peter Foley18bd1e72012-12-27 18:04:21 -05001184 $$(INCLUDE) \
1185)
1186
1187endef
1188
Tor Lillqvist9a42ca72012-04-19 21:45:14 +03001189ifneq ($(OS),ANDROID)
1190
Michael Stahl5f9cda22013-11-01 15:43:47 +01001191ifeq ($(COM),MSC)
Michael Stahlae8e5792014-01-10 12:07:31 +01001192$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
David Tardon491dea02013-05-01 11:23:50 +02001193 raptor2 \
1194 rasqal \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001195 rdf \
1196))
Michael Stahl5ae30d32014-03-13 19:32:13 +01001197else
1198$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1199 raptor \
1200 rasqal \
1201 redland \
1202))
Michael Stahl5f9cda22013-11-01 15:43:47 +01001203endif
Michael Stahlc74af0d2011-04-01 20:49:35 +00001204
1205define gb_LinkTarget__use_librdf
Michael Stahl831aaef2013-10-24 01:09:35 +02001206ifeq ($(COM),MSC)
1207$(call gb_LinkTarget_use_libraries,$(1),\
1208 raptor2 \
1209 rdf \
1210)
1211else
Matúš Kukan85d1e392013-12-14 11:17:30 +01001212$(call gb_LinkTarget_use_packages,$(1),raptor rasqal redland)
1213
Michael Stahl2793c542013-10-23 21:18:24 +02001214$(call gb_LinkTarget_add_libs,$(1),\
1215 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1216 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001217)
Michael Stahl831aaef2013-10-24 01:09:35 +02001218endif
Caolán McNamara6bccd202011-07-25 22:10:33 +01001219
Michael Stahlc74af0d2011-04-01 20:49:35 +00001220endef
1221
Tor Lillqvist9a42ca72012-04-19 21:45:14 +03001222else # ANDROID
1223
Tor Lillqvist9a42ca72012-04-19 21:45:14 +03001224define gb_LinkTarget__use_librdf
Michael Stahl95565d52013-05-07 12:17:20 +02001225$(call gb_LinkTarget_use_packages,$(1),raptor rasqal redland)
Tor Lillqvist9a42ca72012-04-19 21:45:14 +03001226
1227endef
1228
1229endif # ANDROID
1230
Michael Stahlc74af0d2011-04-01 20:49:35 +00001231endif # SYSTEM_REDLAND
1232
1233
Michael Stahlf7a6da22016-02-29 21:15:09 +01001234ifneq ($(USING_X11)$(ENABLE_CAIRO_CANVAS)$(ENABLE_HEADLESS),) # or
Michael Stahl32a617d2014-02-17 11:23:19 +01001235
Michael Stahl5c0e6d82014-02-11 17:03:53 +01001236ifneq ($(SYSTEM_CAIRO),)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001237
Michael Stahlc74af0d2011-04-01 20:49:35 +00001238define gb_LinkTarget__use_cairo
1239$(call gb_LinkTarget_set_include,$(1),\
1240 $$(INCLUDE) \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001241 $(CAIRO_CFLAGS) \
1242)
David Tardon962771f2013-05-24 14:35:18 +02001243$(call gb_LinkTarget_use_external,$(1),freetype_headers)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001244$(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +01001245
Michael Stahlc74af0d2011-04-01 20:49:35 +00001246endef
1247
Michael Stahl5c0e6d82014-02-11 17:03:53 +01001248else # !SYSTEM_CAIRO
Michael Stahlc74af0d2011-04-01 20:49:35 +00001249
Michael Stahl32a617d2014-02-17 11:23:19 +01001250$(eval $(call gb_Helper_register_packages_for_install,ooo,\
1251 cairo \
1252 $(if $(filter $(OS),WNT),,pixman) \
1253))
1254
Michael Stahlc74af0d2011-04-01 20:49:35 +00001255define gb_LinkTarget__use_cairo
Michael Stahlde142202012-11-20 22:05:36 +01001256$(call gb_LinkTarget_use_package,$(1),cairo)
1257$(call gb_LinkTarget_use_package,$(1),pixman)
David Tardon962771f2013-05-24 14:35:18 +02001258$(call gb_LinkTarget_use_external,$(1),freetype_headers)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001259$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001260 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1261 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
Matúš Kukan2cb7ba12012-11-10 22:14:42 +01001262 $$(INCLUDE) \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001263)
Michael Stahld89f48b2013-10-23 21:27:05 +02001264$(call gb_LinkTarget_add_libs,$(1),\
1265 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
Matúš Kukan2cb7ba12012-11-10 22:14:42 +01001266 $(if $(filter-out MACOSX WNT,$(OS)), \
Michael Stahld89f48b2013-10-23 21:27:05 +02001267 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
Matúš Kukan2cb7ba12012-11-10 22:14:42 +01001268 ) \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001269)
Caolán McNamara5bb76f62011-07-25 21:50:34 +01001270
Michael Stahlc74af0d2011-04-01 20:49:35 +00001271endef
1272
1273endif # SYSTEM_CAIRO
1274
Caolán McNamarafb7d4ba2015-11-16 13:40:22 +00001275else ifeq ($(OS),ANDROID)
1276
1277define gb_LinkTarget__use_cairo
1278$(call gb_LinkTarget_use_package,$(1),cairo)
1279$(call gb_LinkTarget_use_package,$(1),pixman)
1280$(call gb_LinkTarget_use_external,$(1),freetype_headers)
1281$(call gb_LinkTarget_set_include,$(1),\
1282 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1283 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1284 $$(INCLUDE) \
1285)
1286$(call gb_LinkTarget_add_libs,$(1),\
1287 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1288 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1289)
1290
1291endef
1292
Michael Stahl32a617d2014-02-17 11:23:19 +01001293endif # CAIRO
1294
Michael Stahl379f9782014-02-11 16:49:19 +01001295ifneq ($(SYSTEM_FREETYPE),)
David Tardon962771f2013-05-24 14:35:18 +02001296
1297define gb_LinkTarget__use_freetype_headers
Caolán McNamarab41ae462011-07-25 22:24:27 +01001298$(call gb_LinkTarget_set_include,$(1),\
1299 $$(INCLUDE) \
1300 $(FREETYPE_CFLAGS) \
1301)
Tor Lillqvist0d1c24e2012-04-19 21:10:00 +03001302
David Tardon962771f2013-05-24 14:35:18 +02001303endef
1304
1305define gb_LinkTarget__use_freetype
1306$(call gb_LinkTarget_use_external,$(1),freetype_headers)
Caolán McNamarab41ae462011-07-25 22:24:27 +01001307$(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1308
1309endef
1310
Michael Stahle568d2a2013-09-30 14:10:22 +02001311gb_ExternalProject__use_freetype :=
1312
Zolnai Tamás6403f2b2014-06-25 15:19:41 +02001313else ifeq ($(OS),ANDROID)
David Tardon962771f2013-05-24 14:35:18 +02001314
1315define gb_LinkTarget__use_freetype_headers
Michael Stahlb242cee82013-10-24 12:08:50 +02001316$(call gb_LinkTarget_use_external_project,$(1),freetype)
David Tardon962771f2013-05-24 14:35:18 +02001317$(call gb_LinkTarget_set_include,$(1),\
1318 -I$(call gb_UnpackedTarball_get_dir,freetype)/include \
1319 $$(INCLUDE) \
1320)
1321
David Tardon61695f12013-05-24 17:15:20 +02001322endef
1323
David Tardon962771f2013-05-24 14:35:18 +02001324define gb_LinkTarget__use_freetype
1325$(call gb_LinkTarget_use_external,$(1),freetype_headers)
Jan Holesovskyfe5dbe32014-04-22 00:41:57 +02001326$(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
David Tardon962771f2013-05-24 14:35:18 +02001327
1328endef
1329
Michael Stahle568d2a2013-09-30 14:10:22 +02001330define gb_ExternalProject__use_freetype
Michael Stahlb242cee82013-10-24 12:08:50 +02001331$(call gb_ExternalProject_use_external_project,$(1),freetype)
Michael Stahle568d2a2013-09-30 14:10:22 +02001332
1333endef
1334
David Tardon962771f2013-05-24 14:35:18 +02001335endif # SYSTEM_FREETYPE
1336
Michael Stahl04ff5352014-02-11 16:21:04 +01001337ifneq ($(SYSTEM_FONTCONFIG),)
David Tardon4eb68422013-05-24 14:16:03 +02001338
Caolán McNamarab41ae462011-07-25 22:24:27 +01001339define gb_LinkTarget__use_fontconfig
1340$(call gb_LinkTarget_set_include,$(1),\
1341 $$(INCLUDE) \
1342 $(FONTCONFIG_CFLAGS) \
1343)
Tor Lillqvist0d1c24e2012-04-19 21:10:00 +03001344
Caolán McNamarab41ae462011-07-25 22:24:27 +01001345$(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1346
1347endef
Michael Stahlc74af0d2011-04-01 20:49:35 +00001348
Matúš Kukanfb8d0a42013-09-25 10:13:09 +02001349else ifeq ($(OS),ANDROID)
David Tardon4eb68422013-05-24 14:16:03 +02001350
David Tardon4eb68422013-05-24 14:16:03 +02001351define gb_LinkTarget__use_fontconfig
Michael Stahl76596b32013-10-24 11:01:41 +02001352$(call gb_LinkTarget_use_external_project,$(1),fontconfig)
David Tardon4eb68422013-05-24 14:16:03 +02001353$(call gb_LinkTarget_set_include,$(1),\
1354 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1355 $$(INCLUDE) \
1356)
1357
David Tardon4eb68422013-05-24 14:16:03 +02001358endef
1359
1360endif # SYSTEM_FONTCONFIG
1361
David Tardon026dc562014-05-30 19:50:24 +02001362ifeq ($(ENABLE_GRAPHITE),TRUE)
1363
Michael Stahle3abec32014-02-11 15:57:18 +01001364ifneq ($(SYSTEM_GRAPHITE),)
Michael Stahl87e44332011-04-13 16:11:39 +00001365
Michael Stahl87e44332011-04-13 16:11:39 +00001366define gb_LinkTarget__use_graphite
Michael Stahl87e44332011-04-13 16:11:39 +00001367$(call gb_LinkTarget_set_include,$(1),\
1368 $$(INCLUDE) \
1369 $(GRAPHITE_CFLAGS) \
1370)
1371$(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +01001372
Michael Stahl87e44332011-04-13 16:11:39 +00001373endef
1374
Michael Stahle3abec32014-02-11 15:57:18 +01001375else # !SYSTEM_GRAPHITE
Michael Stahl87e44332011-04-13 16:11:39 +00001376
Michael Stahl87e44332011-04-13 16:11:39 +00001377define gb_LinkTarget__use_graphite
Matúš Kukan7a030392012-10-29 23:29:37 +01001378$(call gb_LinkTarget_use_unpacked,$(1),graphite)
Matúš Kukan1ceb47d2012-10-25 09:55:13 +02001379$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001380 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
Matúš Kukan1ceb47d2012-10-25 09:55:13 +02001381 $$(INCLUDE) \
1382)
Michael Stahlc923f7d2012-04-07 23:22:08 +02001383$(call gb_LinkTarget_use_static_libraries,$(1),\
Matúš Kukan1ceb47d2012-10-25 09:55:13 +02001384 graphite \
Michael Stahl87e44332011-04-13 16:11:39 +00001385)
Caolán McNamara6bccd202011-07-25 22:10:33 +01001386
Michael Stahl87e44332011-04-13 16:11:39 +00001387endef
1388
1389endif # SYSTEM_GRAPHITE
1390
David Tardon026dc562014-05-30 19:50:24 +02001391else # !ENABLE_GRAPHITE
1392
1393gb_LinkTarget__use_graphite :=
1394
1395endif # ENABLE_GRAPHITE
1396
Michael Stahl187194b2014-02-11 19:17:42 +01001397ifneq ($(SYSTEM_ICU),)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001398
Peter Foleyb92a0d92012-12-25 17:39:43 -05001399gb_LinkTarget__use_icu_headers:=
Fridrich Štrba8e9675d2013-01-25 10:55:04 +01001400gb_ExternalProject__use_icu:=
Peter Foleyb92a0d92012-12-25 17:39:43 -05001401
Matúš Kukan6fad1752011-08-11 12:42:39 +02001402define gb_LinkTarget__use_icudata
1403$(call gb_LinkTarget_add_libs,$(1),-licudata)
1404
1405endef
David Tardon1a852392011-07-26 09:58:54 +02001406define gb_LinkTarget__use_icui18n
1407$(call gb_LinkTarget_add_libs,$(1),-licui18n)
Matúš Kukan6fad1752011-08-11 12:42:39 +02001408
David Tardon1a852392011-07-26 09:58:54 +02001409endef
Michael Stahlc74af0d2011-04-01 20:49:35 +00001410define gb_LinkTarget__use_icuuc
1411$(call gb_LinkTarget_add_libs,$(1),-licuuc)
Caolán McNamara6bccd202011-07-25 22:10:33 +01001412
Michael Stahlc74af0d2011-04-01 20:49:35 +00001413endef
1414
1415else # !SYSTEM_ICU
1416
Michael Stahl057613c2014-07-24 00:22:51 +02001417$(eval $(call gb_Helper_register_packages_for_install,ure, \
1418 icu_ure \
1419))
1420
Michael Stahle7592692014-03-14 11:23:52 +01001421$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1422 icu \
1423))
1424
Tor Lillqvist084db5f2012-09-24 10:37:25 +03001425ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
Tor Lillqvist8a3ea752011-11-21 14:25:37 +02001426gb_ICU_suffix:=lo
1427else
1428gb_ICU_suffix:=
1429endif
1430
Peter Foleyb92a0d92012-12-25 17:39:43 -05001431define gb_LinkTarget__use_icu_headers
Peter Foleyce9bf0f2013-03-23 12:32:31 -04001432$(call gb_LinkTarget_use_unpacked,$(1),icu)
Peter Foleyb92a0d92012-12-25 17:39:43 -05001433$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001434 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1435 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1436 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
Peter Foleyb92a0d92012-12-25 17:39:43 -05001437 $$(INCLUDE) \
1438)
1439
1440endef
1441
Fridrich Štrba8e9675d2013-01-25 10:55:04 +01001442define gb_ExternalProject__use_icu
1443$(call gb_ExternalProject_use_package,$(1),icu)
Fridrich Štrba851ca9c2013-01-25 10:29:59 +01001444
1445endef
1446
Peter Foleyf7452122012-11-04 08:46:44 -05001447# icudata and icui18n is called icudt and icuin when built with MSVC :-/
Michael Stahla92f80f2013-10-23 15:00:29 +02001448define gb_LinkTarget__use_icudata
Peter Foleyb4b6c45982012-12-31 15:12:11 -05001449$(call gb_LinkTarget_use_package,$(1),icu)
Michael Stahla92f80f2013-10-23 15:00:29 +02001450
1451ifeq ($(OS),WNT)
1452$(call gb_LinkTarget_add_libs,$(1),\
1453 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
Matúš Kukan6fad1752011-08-11 12:42:39 +02001454)
Michael Stahla92f80f2013-10-23 15:00:29 +02001455else
1456$(call gb_LinkTarget_add_libs,$(1),\
1457 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1458)
1459endif
Matúš Kukan6fad1752011-08-11 12:42:39 +02001460
1461endef
Michael Stahla92f80f2013-10-23 15:00:29 +02001462
1463define gb_LinkTarget__use_icui18n
1464$(call gb_LinkTarget_use_package,$(1),icu)
1465
1466ifeq ($(OS),WNT)
1467$(call gb_LinkTarget_add_libs,$(1),\
1468 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1469)
1470else
1471$(call gb_LinkTarget_add_libs,$(1),\
1472 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1473)
1474endif
1475
1476endef
1477
Michael Stahlc74af0d2011-04-01 20:49:35 +00001478define gb_LinkTarget__use_icuuc
Peter Foleyb4b6c45982012-12-31 15:12:11 -05001479$(call gb_LinkTarget_use_package,$(1),icu)
Michael Stahla92f80f2013-10-23 15:00:29 +02001480
1481ifeq ($(OS),WNT)
1482$(call gb_LinkTarget_add_libs,$(1),\
1483 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001484)
Michael Stahla92f80f2013-10-23 15:00:29 +02001485else
1486$(call gb_LinkTarget_add_libs,$(1),\
1487 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1488)
1489endif
Caolán McNamara6bccd202011-07-25 22:10:33 +01001490
Michael Stahlc74af0d2011-04-01 20:49:35 +00001491endef
1492
1493endif # SYSTEM_ICU
1494
Fridrich Štrba9a943e52013-04-23 11:23:17 +02001495ifeq ($(ENABLE_HARFBUZZ),TRUE)
Michael Stahle3abec32014-02-11 15:57:18 +01001496ifneq ($(SYSTEM_HARFBUZZ),)
Khaled Hosny7e389f42013-04-20 13:00:56 +02001497
1498define gb_LinkTarget__use_harfbuzz
1499$(call gb_LinkTarget_set_include,$(1),\
1500 $$(INCLUDE) \
1501 $(HARFBUZZ_CFLAGS) \
1502)
1503$(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1504
1505endef
1506
Michael Stahle3abec32014-02-11 15:57:18 +01001507else # SYSTEM_HARFBUZZ != TRUE
Khaled Hosny7e389f42013-04-20 13:00:56 +02001508
Khaled Hosny7e389f42013-04-20 13:00:56 +02001509define gb_LinkTarget__use_harfbuzz
Michael Stahl8db02752013-05-07 23:28:45 +02001510$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl2f6261f2013-09-19 19:28:36 +02001511 $(HARFBUZZ_CFLAGS) \
Michael Stahl8db02752013-05-07 23:28:45 +02001512 $$(INCLUDE) \
1513)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001514$(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1515$(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
Khaled Hosny7e389f42013-04-20 13:00:56 +02001516
1517endef
1518
1519endif # SYSTEM_HARFBUZZ
1520else # ENABLE_HARFBUZZ != YES
1521
1522gb_LinkTarget__use_harfbuzz :=
1523
1524endif # ENABLE_HARFBUZZ
Michael Stahl4a8919f2011-04-18 11:13:57 +00001525
Norbert Thiebaudbf6d1f72013-08-31 18:55:53 -05001526ifeq ($(DISABLE_OPENSSL),TRUE)
Andres Gomeze3f607e2013-04-11 10:24:25 +03001527
1528gb_ExternalProject__use_openssl:=
1529gb_LinkTarget__use_openssl_headers:=
1530gb_LinkTarget__use_openssl:=
1531
1532else # !DISABLE_OPENSSL
1533
Michael Stahle3abec32014-02-11 15:57:18 +01001534ifneq ($(SYSTEM_OPENSSL),)
Michael Stahl4a8919f2011-04-18 11:13:57 +00001535
Peter Foley9ddba662012-12-28 11:19:06 -05001536gb_LinkTarget__use_openssl_headers:=
1537gb_ExternalProject__use_openssl:=
1538
Michael Stahl4a8919f2011-04-18 11:13:57 +00001539define gb_LinkTarget__use_openssl
1540$(call gb_LinkTarget_set_include,$(1),\
1541 $$(INCLUDE) \
1542 $(OPENSSL_CFLAGS) \
1543)
1544$(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +01001545
Michael Stahl4a8919f2011-04-18 11:13:57 +00001546endef
1547
1548else # !SYSTEM_OPENSSL
1549
Michael Stahlf921e262014-03-13 19:36:48 +01001550$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1551 openssl \
1552))
1553
Peter Foley9ddba662012-12-28 11:19:06 -05001554define gb_ExternalProject__use_openssl
1555$(call gb_ExternalProject_use_package,$(1),openssl)
1556
1557endef
1558
1559define gb_LinkTarget__use_openssl_headers
Michael Stahlc7ca0712016-03-07 21:18:23 +01001560$(call gb_LinkTarget_use_external_project,$(1),openssl)
Peter Foley9ddba662012-12-28 11:19:06 -05001561$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001562 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
Peter Foley9ddba662012-12-28 11:19:06 -05001563 $$(INCLUDE) \
1564)
1565
1566endef
1567
Michael Stahl4a8919f2011-04-18 11:13:57 +00001568define gb_LinkTarget__use_openssl
Peter Foley9ddba662012-12-28 11:19:06 -05001569$(call gb_LinkTarget_use_package,$(1),openssl)
Michael Stahl4a8919f2011-04-18 11:13:57 +00001570ifeq ($(OS),WNT)
Michael Stahl5b906622013-10-24 00:22:20 +02001571$(call gb_LinkTarget_add_libs,$(1),\
1572 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/ssleay32.lib \
1573 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/libeay32.lib \
Michael Stahl4a8919f2011-04-18 11:13:57 +00001574)
1575else
Michael Stahl2f6261f2013-09-19 19:28:36 +02001576$(call gb_LinkTarget_add_libs,$(1),\
1577 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1578 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
Michael Stahl4a8919f2011-04-18 11:13:57 +00001579)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001580$(call gb_LinkTarget_use_external_project,$(1),openssl)
Michael Stahl4a8919f2011-04-18 11:13:57 +00001581ifeq ($(OS),SOLARIS)
Michael Stahl80374352012-09-28 12:25:50 +02001582$(call gb_LinkTarget_add_libs,$(1),\
1583 -lnsl \
1584 -lsocket \
Michael Stahl4a8919f2011-04-18 11:13:57 +00001585)
1586endif
1587endif
Caolán McNamara6bccd202011-07-25 22:10:33 +01001588
Michael Stahl4a8919f2011-04-18 11:13:57 +00001589endef
1590
1591endif # SYSTEM_OPENSSL
Andres Gomeze3f607e2013-04-11 10:24:25 +03001592endif # DISABLE_OPENSSL
Michael Stahl4a8919f2011-04-18 11:13:57 +00001593
Matúš Kukanc4560482011-07-28 01:03:23 +02001594
Norbert Thiebaudbf6d1f72013-08-31 18:55:53 -05001595ifeq ($(DISABLE_OPENSSL),TRUE)
Andres Gomez48d49752013-04-11 10:32:54 +03001596
1597define gb_LinkTarget__use_gnutls
1598$(call gb_LinkTarget_set_include,$(1),\
1599 $$(INCLUDE) \
1600 $(GNUTLS_CFLAGS) \
1601)
1602
1603$(call gb_LinkTarget_add_defs,$(1),\
1604 -DDISABLE_OPENSSL \
1605)
1606
1607$(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1608
1609endef
1610
1611define gb_LinkTarget__use_libgcrypt
1612$(call gb_LinkTarget_set_include,$(1),\
1613 $$(INCLUDE) \
1614 $(LIBGCRYPT_CFLAGS) \
1615)
1616
1617$(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1618
1619endef
1620
1621else # !DISABLE_OPENSSL
1622
1623gb_LinkTarget__use_gnutls:=
1624gb_LinkTarget__use_libgcrypt:=
1625
1626endif # DISABLE_OPENSSL
1627
1628
Michael Stahle3abec32014-02-11 15:57:18 +01001629ifneq ($(SYSTEM_CDR),)
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001630
1631define gb_LinkTarget__use_cdr
1632$(call gb_LinkTarget_set_include,$(1),\
1633 $$(INCLUDE) \
1634 $(CDR_CFLAGS) \
1635)
1636$(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1637
1638endef
1639
Bjoern Michaelsenfb455e52013-02-19 11:22:02 +01001640else # !SYSTEM_CDR
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001641
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001642define gb_LinkTarget__use_cdr
David Tardonf16f3662013-05-24 13:48:03 +02001643$(call gb_LinkTarget_set_include,$(1),\
1644 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1645 $$(INCLUDE) \
1646)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001647$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001648 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrbab8f39c52012-10-05 13:32:14 +02001649)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001650$(call gb_LinkTarget_use_external_project,$(1),libcdr)
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001651endef
1652
Bjoern Michaelsenfb455e52013-02-19 11:22:02 +01001653endif # SYSTEM_CDR
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001654
1655
Michael Stahle3abec32014-02-11 15:57:18 +01001656ifneq ($(SYSTEM_EBOOK),)
David Tardon316be1b2013-11-09 15:52:36 +01001657
1658define gb_LinkTarget__use_ebook
1659$(call gb_LinkTarget_set_include,$(1),\
1660 $$(INCLUDE) \
1661 $(EBOOK_CFLAGS) \
1662)
1663$(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1664
1665endef
1666
1667gb_ExternalProject__use_ebook :=
1668
1669else # !SYSTEM_EBOOK
1670
1671define gb_LinkTarget__use_ebook
1672$(call gb_LinkTarget_set_include,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001673 -I${WORKDIR}/UnpackedTarball/libebook/inc \
David Tardon316be1b2013-11-09 15:52:36 +01001674 $$(INCLUDE) \
1675)
1676$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001677 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
David Tardon316be1b2013-11-09 15:52:36 +01001678)
1679$(call gb_LinkTarget_use_external_project,$(1),libebook)
1680
1681endef
1682
1683define gb_ExternalProject__use_ebook
1684$(call gb_ExternalProject_use_external_project,$(1),libebook)
1685
1686endef
1687
1688endif # SYSTEM_EBOOK
1689
1690
Michael Stahle3abec32014-02-11 15:57:18 +01001691ifneq ($(SYSTEM_ETONYEK),)
David Tardon08ca3e42013-10-24 16:46:49 +02001692
1693define gb_LinkTarget__use_etonyek
1694$(call gb_LinkTarget_set_include,$(1),\
1695 $$(INCLUDE) \
1696 $(ETONYEK_CFLAGS) \
1697)
1698$(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1699
1700endef
1701
1702gb_ExternalProject__use_etonyek :=
1703
1704else # !SYSTEM_ETONYEK
1705
David Tardon78deb812015-05-19 16:12:08 +02001706ifeq ($(COM),MSC)
1707
1708$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1709 etonyek \
1710))
1711
David Tardon08ca3e42013-10-24 16:46:49 +02001712define gb_LinkTarget__use_etonyek
1713$(call gb_LinkTarget_set_include,$(1),\
David Tardon78deb812015-05-19 16:12:08 +02001714 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1715 $$(INCLUDE) \
1716)
1717$(call gb_LinkTarget_use_libraries,$(1),\
1718 etonyek \
1719)
1720
1721endef
1722
1723else # !MSC
1724
1725$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1726 libetonyek \
1727))
1728
1729define gb_LinkTarget__use_etonyek
1730$(call gb_LinkTarget_use_package,$(1),libetonyek)
1731
1732$(call gb_LinkTarget_set_include,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001733 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
David Tardon78deb812015-05-19 16:12:08 +02001734 -DLIBETONYEK_VISIBILITY \
David Tardon08ca3e42013-10-24 16:46:49 +02001735 $$(INCLUDE) \
1736)
1737$(call gb_LinkTarget_add_libs,$(1),\
David Tardon78deb812015-05-19 16:12:08 +02001738 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
David Tardon08ca3e42013-10-24 16:46:49 +02001739)
1740$(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1741
1742endef
1743
1744define gb_ExternalProject__use_etonyek
1745$(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1746
1747endef
1748
David Tardon78deb812015-05-19 16:12:08 +02001749endif
1750
David Tardon08ca3e42013-10-24 16:46:49 +02001751endif # SYSTEM_ETONYEK
1752
1753
Michael Stahle3abec32014-02-11 15:57:18 +01001754ifneq ($(SYSTEM_FREEHAND),)
Fridrich Štrba67153d72013-10-31 12:42:50 +01001755
1756define gb_LinkTarget__use_freehand
1757$(call gb_LinkTarget_set_include,$(1),\
1758 $$(INCLUDE) \
1759 $(FREEHAND_CFLAGS) \
1760)
1761$(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1762
1763endef
1764
1765gb_ExternalProject__use_freehand :=
1766
1767else # !SYSTEM_FREEHAND
1768
1769define gb_LinkTarget__use_freehand
1770$(call gb_LinkTarget_set_include,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001771 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
Fridrich Štrba67153d72013-10-31 12:42:50 +01001772 $$(INCLUDE) \
1773)
1774$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001775 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba67153d72013-10-31 12:42:50 +01001776)
1777$(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1778
1779endef
1780
1781define gb_ExternalProject__use_freehand
1782$(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1783
1784endef
1785
1786endif # SYSTEM_FREEHAND
1787
1788
Michael Stahle3abec32014-02-11 15:57:18 +01001789ifneq ($(SYSTEM_ODFGEN),)
Fridrich Štrba93848e12013-05-02 20:25:51 +02001790
1791define gb_LinkTarget__use_odfgen
1792$(call gb_LinkTarget_set_include,$(1),\
1793 $$(INCLUDE) \
1794 $(ODFGEN_CFLAGS) \
1795)
1796$(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1797
1798endef
1799
1800else # !SYSTEM_ODFGEN
1801
David Tardon36c3f912014-05-24 09:13:33 +02001802ifeq ($(COM),MSC)
1803
1804$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1805 odfgen \
1806))
1807
Fridrich Štrba93848e12013-05-02 20:25:51 +02001808define gb_LinkTarget__use_odfgen
David Tardon0f8a90c2013-05-24 13:49:11 +02001809$(call gb_LinkTarget_set_include,$(1),\
1810 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1811 $$(INCLUDE) \
1812)
David Tardon36c3f912014-05-24 09:13:33 +02001813$(call gb_LinkTarget_use_libraries,$(1),\
1814 odfgen \
Fridrich Štrba93848e12013-05-02 20:25:51 +02001815)
Fridrich Štrba93848e12013-05-02 20:25:51 +02001816
1817endef
1818
David Tardon36c3f912014-05-24 09:13:33 +02001819else # !MSC
1820
1821$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1822 libodfgen \
1823))
1824
1825define gb_LinkTarget__use_odfgen
1826$(call gb_LinkTarget_use_package,$(1),libodfgen)
1827
1828$(call gb_LinkTarget_set_include,$(1),\
1829 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
Stephan Bergmannb6ee5cf2015-01-26 15:09:13 +01001830 -DLIBODFGEN_VISIBILITY \
David Tardon36c3f912014-05-24 09:13:33 +02001831 $$(INCLUDE) \
1832)
1833$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001834 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
David Tardon36c3f912014-05-24 09:13:33 +02001835)
1836
1837endef
1838
1839endif
1840
Fridrich Štrba93848e12013-05-02 20:25:51 +02001841endif # SYSTEM_ODFGEN
1842
1843
David Tardonb421ce72014-05-24 08:39:54 +02001844ifneq ($(SYSTEM_REVENGE),)
1845
1846define gb_LinkTarget__use_revenge
1847$(call gb_LinkTarget_set_include,$(1),\
1848 $$(INCLUDE) \
1849 $(REVENGE_CFLAGS) \
1850)
1851$(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1852
1853endef
1854
David Tardon7c9c7792014-05-25 13:06:57 +02001855gb_ExternalProject__use_revenge :=
1856
David Tardonb421ce72014-05-24 08:39:54 +02001857else # !SYSTEM_REVENGE
1858
1859ifeq ($(COM),MSC)
1860
1861$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1862 revenge \
1863))
1864
1865define gb_LinkTarget__use_revenge
1866$(call gb_LinkTarget_set_include,$(1),\
David Tardon0b7d0a82014-05-25 13:19:31 +02001867 $(REVENGE_CFLAGS) \
David Tardonb421ce72014-05-24 08:39:54 +02001868 $$(INCLUDE) \
1869)
1870$(call gb_LinkTarget_use_libraries,$(1),\
1871 revenge \
1872)
1873
1874endef
1875
David Tardon7c9c7792014-05-25 13:06:57 +02001876define gb_ExternalProject__use_revenge
1877$(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1878
1879endef
1880
David Tardonb421ce72014-05-24 08:39:54 +02001881else # !MSC
1882
1883$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1884 librevenge \
1885))
1886
1887define gb_LinkTarget__use_revenge
1888$(call gb_LinkTarget_use_package,$(1),librevenge)
1889
1890$(call gb_LinkTarget_set_include,$(1),\
David Tardon0b7d0a82014-05-25 13:19:31 +02001891 $(REVENGE_CFLAGS) \
Stephan Bergmannb6ee5cf2015-01-26 15:09:13 +01001892 -DLIBREVENGE_VISIBILITY \
David Tardonb421ce72014-05-24 08:39:54 +02001893 $$(INCLUDE) \
1894)
1895$(call gb_LinkTarget_add_libs,$(1),\
David Tardon0b7d0a82014-05-25 13:19:31 +02001896 $(REVENGE_LIBS) \
David Tardonb421ce72014-05-24 08:39:54 +02001897)
1898endef
1899
David Tardon7c9c7792014-05-25 13:06:57 +02001900define gb_ExternalProject__use_revenge
1901$(call gb_ExternalProject_use_package,$(1),librevenge)
1902
1903endef
1904
David Tardonb421ce72014-05-24 08:39:54 +02001905endif # MSC
1906
1907endif # SYSTEM_REVENGE
1908
1909
Michael Stahle3abec32014-02-11 15:57:18 +01001910ifneq ($(SYSTEM_ABW),)
Fridrich Štrba10eaaac2014-01-13 17:01:32 +01001911
1912define gb_LinkTarget__use_abw
1913$(call gb_LinkTarget_set_include,$(1),\
1914 $$(INCLUDE) \
1915 $(ABW_CFLAGS) \
1916)
1917$(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1918
1919endef
1920gb_ExternalProject__use_abw :=
1921
1922else # !SYSTEM_ABW
1923
1924define gb_LinkTarget__use_abw
1925$(call gb_LinkTarget_set_include,$(1),\
1926 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1927 $$(INCLUDE) \
1928)
1929$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001930 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba10eaaac2014-01-13 17:01:32 +01001931)
1932$(call gb_LinkTarget_use_external_project,$(1),libabw)
1933
1934endef
1935define gb_ExternalProject__use_abw
1936$(call gb_ExternalProject_use_external_project,$(1),libabw)
1937
1938endef
1939
1940endif # SYSTEM_ABW
1941
1942
Michael Stahle3abec32014-02-11 15:57:18 +01001943ifneq ($(SYSTEM_MSPUB),)
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001944
1945define gb_LinkTarget__use_mspub
1946$(call gb_LinkTarget_set_include,$(1),\
1947 $$(INCLUDE) \
1948 $(MSPUB_CFLAGS) \
1949)
1950$(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
1951
1952endef
1953
Bjoern Michaelsena4c80752013-02-19 11:22:51 +01001954else # !SYSTEM_MSPUB
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001955
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001956define gb_LinkTarget__use_mspub
Michael Stahl35ac39e2013-05-16 13:09:11 +02001957$(call gb_LinkTarget_set_include,$(1),\
1958 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
1959 $$(INCLUDE) \
1960)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001961$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001962 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba093a5c92013-01-28 10:13:50 +01001963)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001964$(call gb_LinkTarget_use_external_project,$(1),libmspub)
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001965
1966endef
1967
Bjoern Michaelsena4c80752013-02-19 11:22:51 +01001968endif # SYSTEM_MSPUB
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001969
1970
David Tardon516fb342014-06-26 21:26:11 +02001971ifneq ($(SYSTEM_PAGEMAKER),)
1972
1973define gb_LinkTarget__use_pagemaker
1974$(call gb_LinkTarget_set_include,$(1),\
1975 $$(INCLUDE) \
1976 $(PAGEMAKER_CFLAGS) \
1977)
1978$(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
1979
1980endef
1981gb_ExternalProject__use_pagemaker :=
1982
1983else # !SYSTEM_PAGEMAKER
1984
1985define gb_LinkTarget__use_pagemaker
1986$(call gb_LinkTarget_set_include,$(1),\
1987 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
1988 $$(INCLUDE) \
1989)
1990$(call gb_LinkTarget_add_libs,$(1),\
1991 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
1992)
1993$(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
1994
1995endef
1996define gb_ExternalProject__use_pagemaker
1997$(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
1998
1999endef
2000
2001endif # SYSTEM_PAGEMAKER
2002
2003
Michael Stahle3abec32014-02-11 15:57:18 +01002004ifneq ($(SYSTEM_VISIO),)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002005
2006define gb_LinkTarget__use_visio
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002007$(call gb_LinkTarget_set_include,$(1),\
2008 $$(INCLUDE) \
Fridrich Štrbae531e8a2011-10-05 10:21:08 +02002009 $(VISIO_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002010)
Fridrich Štrbae531e8a2011-10-05 10:21:08 +02002011$(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02002012
2013endef
2014
Bjoern Michaelsenfe8bcfa2013-02-19 11:14:46 +01002015else # !SYSTEM_VISIO
Matúš Kukanc6a63952011-07-28 17:29:44 +02002016
Matúš Kukanc6a63952011-07-28 17:29:44 +02002017define gb_LinkTarget__use_visio
Michael Stahlacc7f612013-05-16 13:14:37 +02002018$(call gb_LinkTarget_set_include,$(1),\
2019 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2020 $$(INCLUDE) \
2021)
Michael Stahl2f6261f2013-09-19 19:28:36 +02002022$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02002023 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba64ab6112012-11-05 11:43:55 +01002024)
Michael Stahl2f6261f2013-09-19 19:28:36 +02002025$(call gb_LinkTarget_use_external_project,$(1),libvisio)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002026
2027endef
2028
Bjoern Michaelsenfe8bcfa2013-02-19 11:14:46 +01002029endif # SYSTEM_VISIO
Matúš Kukanc6a63952011-07-28 17:29:44 +02002030
2031
Michael Stahle3abec32014-02-11 15:57:18 +01002032ifneq ($(SYSTEM_WPD),)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002033
2034define gb_LinkTarget__use_wpd
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002035$(call gb_LinkTarget_set_include,$(1),\
2036 $$(INCLUDE) \
Fridrich Štrba8703f3e2011-10-05 10:04:04 +02002037 $(WPD_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002038)
Fridrich Štrba8703f3e2011-10-05 10:04:04 +02002039$(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02002040
2041endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02002042gb_ExternalProject__use_wpd :=
Matúš Kukanc6a63952011-07-28 17:29:44 +02002043
Bjoern Michaelsen5de206a2013-02-19 11:20:31 +01002044else # !SYSTEM_WPD
Matúš Kukanc6a63952011-07-28 17:29:44 +02002045
David Tardonc868a0c2014-12-23 18:37:54 +01002046ifeq ($(COM),MSC)
2047
2048$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2049 wpd \
2050))
2051
Fridrich Štrba4425db62012-09-24 13:17:45 +02002052define gb_LinkTarget__use_wpd
Michael Stahldb5c8c52013-05-16 13:28:14 +02002053$(call gb_LinkTarget_set_include,$(1),\
2054 $(WPD_CFLAGS) \
2055 $$(INCLUDE) \
2056)
David Tardonc868a0c2014-12-23 18:37:54 +01002057$(call gb_LinkTarget_use_libraries,$(1),\
2058 wpd \
Michael Stahl34295432012-09-24 22:25:28 +02002059)
Fridrich Štrba4425db62012-09-24 13:17:45 +02002060
2061endef
David Tardonc868a0c2014-12-23 18:37:54 +01002062
Michael Stahl2b7536a2012-10-05 21:17:25 +02002063define gb_ExternalProject__use_wpd
David Tardonc868a0c2014-12-23 18:37:54 +01002064$(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
Michael Stahl2b7536a2012-10-05 21:17:25 +02002065
2066endef
Fridrich Štrba4425db62012-09-24 13:17:45 +02002067
David Tardonc868a0c2014-12-23 18:37:54 +01002068else # !MSC
2069
2070$(eval $(call gb_Helper_register_packages_for_install,ooo, \
2071 libwpd \
2072))
2073
2074define gb_LinkTarget__use_wpd
2075$(call gb_LinkTarget_use_package,$(1),libwpd)
2076
2077$(call gb_LinkTarget_set_include,$(1),\
2078 $(WPD_CFLAGS) \
2079 $$(INCLUDE) \
2080)
2081$(call gb_LinkTarget_add_libs,$(1),\
2082 $(WPD_LIBS) \
2083)
2084
2085endef
2086
2087define gb_ExternalProject__use_wpd
2088$(call gb_ExternalProject_use_package,$(1),libwpd)
2089
2090endef
2091
2092endif # MSC
2093
Bjoern Michaelsen5de206a2013-02-19 11:20:31 +01002094endif # SYSTEM_WPD
Matúš Kukanc6a63952011-07-28 17:29:44 +02002095
2096
Michael Stahle3abec32014-02-11 15:57:18 +01002097ifneq ($(SYSTEM_WPG),)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002098
2099define gb_LinkTarget__use_wpg
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002100$(call gb_LinkTarget_set_include,$(1),\
2101 $$(INCLUDE) \
Fridrich Štrba62c43b42011-10-05 10:15:40 +02002102 $(WPG_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002103)
Fridrich Štrba62c43b42011-10-05 10:15:40 +02002104$(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02002105
2106endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02002107gb_ExternalProject__use_wpg :=
Matúš Kukanc6a63952011-07-28 17:29:44 +02002108
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01002109else # !SYSTEM_WPG
Matúš Kukanc6a63952011-07-28 17:29:44 +02002110
David Tardonc868a0c2014-12-23 18:37:54 +01002111ifeq ($(COM),MSC)
2112
2113$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2114 wpg \
2115))
2116
Matúš Kukanc6a63952011-07-28 17:29:44 +02002117define gb_LinkTarget__use_wpg
David Tardonc51a2542013-05-24 14:53:37 +02002118$(call gb_LinkTarget_set_include,$(1),\
2119 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2120 $$(INCLUDE) \
2121)
David Tardonc868a0c2014-12-23 18:37:54 +01002122$(call gb_LinkTarget_use_libraries,$(1),\
2123 wpg \
Michael Stahl53b7bdc2012-10-05 17:19:47 +02002124)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002125
2126endef
David Tardonc868a0c2014-12-23 18:37:54 +01002127
2128else # !MSC
2129
2130$(eval $(call gb_Helper_register_packages_for_install,ooo, \
2131 libwpg \
2132))
2133
2134define gb_LinkTarget__use_wpg
2135$(call gb_LinkTarget_use_package,$(1),libwpg)
2136
2137$(call gb_LinkTarget_set_include,$(1),\
2138 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2139 $$(INCLUDE) \
2140)
2141$(call gb_LinkTarget_add_libs,$(1),\
2142 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2143)
Michael Stahl2b7536a2012-10-05 21:17:25 +02002144
2145endef
Matúš Kukanc6a63952011-07-28 17:29:44 +02002146
David Tardonc868a0c2014-12-23 18:37:54 +01002147endif # MSC
2148
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01002149endif # SYSTEM_WPG
Matúš Kukanc6a63952011-07-28 17:29:44 +02002150
2151
Michael Stahle3abec32014-02-11 15:57:18 +01002152ifneq ($(SYSTEM_WPS),)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002153
2154define gb_LinkTarget__use_wps
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002155$(call gb_LinkTarget_set_include,$(1),\
2156 $$(INCLUDE) \
Fridrich Štrbae991bba2011-10-05 10:18:53 +02002157 $(WPS_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002158)
Fridrich Štrbae991bba2011-10-05 10:18:53 +02002159$(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02002160
2161endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02002162gb_ExternalProject__use_wps :=
Matúš Kukanc6a63952011-07-28 17:29:44 +02002163
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01002164else # !SYSTEM_WPS
Matúš Kukanc6a63952011-07-28 17:29:44 +02002165
David Tardonf85d10f2014-05-30 15:35:48 +02002166ifeq ($(COM),MSC)
2167
2168$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2169 wps \
2170))
2171
Matúš Kukanc6a63952011-07-28 17:29:44 +02002172define gb_LinkTarget__use_wps
David Tardon6f9d8212013-05-24 14:58:31 +02002173$(call gb_LinkTarget_set_include,$(1),\
2174 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2175 $$(INCLUDE) \
2176)
David Tardonf85d10f2014-05-30 15:35:48 +02002177
2178$(call gb_LinkTarget_use_libraries,$(1),\
2179 wps \
Fridrich Štrba8c07bd32013-04-19 12:06:58 +02002180)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002181
2182endef
David Tardonf85d10f2014-05-30 15:35:48 +02002183
2184else # !MSC
2185
2186$(eval $(call gb_Helper_register_packages_for_install,ooo, \
2187 libwps \
2188))
2189
2190define gb_LinkTarget__use_wps
2191$(call gb_LinkTarget_use_package,$(1),libwps)
2192
2193$(call gb_LinkTarget_set_include,$(1),\
2194 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2195 $$(INCLUDE) \
2196)
2197$(call gb_LinkTarget_add_libs,$(1),\
osnolaf9568332015-05-18 10:21:10 +02002198 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
David Tardonf85d10f2014-05-30 15:35:48 +02002199)
Michael Stahl2b7536a2012-10-05 21:17:25 +02002200
2201endef
Matúš Kukanc6a63952011-07-28 17:29:44 +02002202
David Tardonf85d10f2014-05-30 15:35:48 +02002203endif # MSC
2204
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01002205endif # SYSTEM_WPS
Matúš Kukanc6a63952011-07-28 17:29:44 +02002206
2207
Michael Stahle3abec32014-02-11 15:57:18 +01002208ifneq ($(SYSTEM_MWAW),)
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002209
2210define gb_LinkTarget__use_mwaw
2211$(call gb_LinkTarget_set_include,$(1),\
2212 $$(INCLUDE) \
2213 $(MWAW_CFLAGS) \
2214)
2215$(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2216
2217endef
2218
2219else # !SYSTEM_MWAW
2220
David Tardon79211c12014-05-30 13:55:20 +02002221ifeq ($(COM),MSC)
2222
2223$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2224 mwaw \
2225))
2226
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002227define gb_LinkTarget__use_mwaw
Michael Stahlff718952013-05-16 13:11:36 +02002228$(call gb_LinkTarget_set_include,$(1),\
2229 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2230 $$(INCLUDE) \
2231)
David Tardon79211c12014-05-30 13:55:20 +02002232
2233$(call gb_LinkTarget_use_libraries,$(1),\
2234 mwaw \
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002235)
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002236
2237endef
2238
David Tardon79211c12014-05-30 13:55:20 +02002239else # !MSC
2240
2241$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2242 libmwaw \
2243))
2244
2245define gb_LinkTarget__use_mwaw
2246$(call gb_LinkTarget_use_package,$(1),libmwaw)
2247
2248$(call gb_LinkTarget_set_include,$(1),\
2249 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2250 $$(INCLUDE) \
2251)
2252$(call gb_LinkTarget_add_libs,$(1),\
2253 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2254)
2255
2256endef
2257
2258endif # MSC
2259
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002260endif # SYSTEM_MWAW
2261
2262
Michael Stahle3abec32014-02-11 15:57:18 +01002263ifneq ($(SYSTEM_LCMS2),)
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002264
2265define gb_LinkTarget__use_lcms2
2266$(call gb_LinkTarget_set_include,$(1),\
2267 $$(INCLUDE) \
Peter Foleyf7452122012-11-04 08:46:44 -05002268 $(LCMS2_CFLAGS) \
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002269)
2270$(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2271
2272endef
2273
Peter Foley8905c0e2012-11-08 21:00:30 -05002274gb_ExternalProject__use_lcms2 :=
2275
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002276else # !SYSTEM_LCMS2
2277
Michael Stahl32a617d2014-02-17 11:23:19 +01002278$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2279 lcms2 \
2280))
2281
Peter Foley8905c0e2012-11-08 21:00:30 -05002282define gb_ExternalProject__use_lcms2
2283$(call gb_ExternalProject_use_package,$(1),lcms2)
2284
2285endef
2286
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03002287ifeq ($(OS),ANDROID)
2288
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03002289define gb_LinkTarget__use_lcms2
Christian Lohmaier3dee92e2012-11-13 19:44:44 +01002290$(call gb_LinkTarget_use_package,$(1),lcms2)
Matúš Kukan3790e842012-09-04 22:00:15 +02002291$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002292 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
Matúš Kukan3790e842012-09-04 22:00:15 +02002293 $$(INCLUDE) \
2294)
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03002295
2296endef
2297
2298else
2299
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002300define gb_LinkTarget__use_lcms2
Christian Lohmaier3dee92e2012-11-13 19:44:44 +01002301$(call gb_LinkTarget_use_package,$(1),lcms2)
Matúš Kukan3790e842012-09-04 22:00:15 +02002302$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002303 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
Matúš Kukan3790e842012-09-04 22:00:15 +02002304 $$(INCLUDE) \
2305)
Michael Stahl25f65f22013-10-23 22:04:36 +02002306$(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002307
2308endef
2309
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03002310endif # ANDROID
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002311endif # SYSTEM_LCMS2
2312
Matúš Kukan8dc394d2014-03-31 19:36:41 +02002313ifneq ($(ENABLE_LPSOLVE),)
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002314
Michael Stahlab586f12014-02-11 19:25:30 +01002315ifneq ($(SYSTEM_LPSOLVE),)
Matúš Kukanc4560482011-07-28 01:03:23 +02002316
Peter Foley085346f2012-11-03 19:19:30 -04002317define gb_LinkTarget__use_lpsolve
Matúš Kukanc4560482011-07-28 01:03:23 +02002318$(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
Peter Foley085346f2012-11-03 19:19:30 -04002319$(call gb_LinkTarget_add_defs,$(1),\
2320 -DSYSTEM_LPSOLVE \
Peter Foley29d5e292012-11-07 18:18:08 -05002321)
Matúš Kukanc4560482011-07-28 01:03:23 +02002322
2323endef
2324
2325else # !SYSTEM_LPSOLVE
2326
Peter Foley085346f2012-11-03 19:19:30 -04002327define gb_LinkTarget__use_lpsolve
2328$(call gb_LinkTarget_use_unpacked,$(1),lpsolve)
Michael Stahlb7d8ca82013-10-24 01:25:59 +02002329ifeq ($(COM),MSC)
2330$(call gb_LinkTarget_add_libs,$(1),\
2331 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2332)
2333else
Michael Stahlb177b302013-10-23 21:33:51 +02002334$(call gb_LinkTarget_add_libs,$(1),\
2335 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
Matúš Kukanc4560482011-07-28 01:03:23 +02002336)
Michael Stahlb7d8ca82013-10-24 01:25:59 +02002337endif
Peter Foley085346f2012-11-03 19:19:30 -04002338$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002339 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
Peter Foley085346f2012-11-03 19:19:30 -04002340 $$(INCLUDE) \
2341)
Matúš Kukanc4560482011-07-28 01:03:23 +02002342
2343endef
2344
Matúš Kukan083fa762014-02-27 17:08:09 +01002345$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2346 lpsolve \
2347))
2348
Matúš Kukanc4560482011-07-28 01:03:23 +02002349endif # SYSTEM_LPSOLVE
Matúš Kukan4f7b9682014-02-28 10:39:19 +01002350
Matúš Kukan077bdc72014-03-27 14:51:46 +01002351else
2352
2353gb_LinkTarget__use_lpsolve :=
2354
Matúš Kukan8dc394d2014-03-31 19:36:41 +02002355endif # ENABLE_LPSOLVE
2356
2357ifneq ($(ENABLE_COINMP),)
Matúš Kukan4f7b9682014-02-28 10:39:19 +01002358
Rene Engelhardd85f5132014-08-06 00:03:21 +02002359ifneq ($(SYSTEM_COINMP),TRUE)
2360
Matúš Kukan4f7b9682014-02-28 10:39:19 +01002361define gb_LinkTarget__use_coinmp
2362$(call gb_LinkTarget_use_package,$(1),coinmp)
2363ifeq ($(COM),MSC)
2364$(call gb_LinkTarget_add_libs,$(1),\
David Ostrovsky152e2a22014-11-30 18:26:01 +01002365 $(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 +01002366)
2367else
2368$(call gb_LinkTarget_add_libs,$(1),\
2369 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2370 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2371 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2372 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2373 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2374 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2375 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2376)
2377endif
2378$(call gb_LinkTarget_set_include,$(1),\
2379 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
Caolán McNamara67b4b342014-06-06 14:32:09 +01002380 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
Matúš Kukan4f7b9682014-02-28 10:39:19 +01002381 $$(INCLUDE) \
2382)
2383
2384endef
2385
2386$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2387 coinmp \
2388))
2389
Rene Engelhardd85f5132014-08-06 00:03:21 +02002390else # SYSTEM_COINMP
2391
2392define gb_LinkTarget__use_coinmp
2393$(call gb_LinkTarget_set_include,$(1),\
2394 $$(INCLUDE) \
2395 $(COINMP_CFLAGS) \
2396)
2397$(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2398
2399endef
2400
2401endif
2402
Matúš Kukan077bdc72014-03-27 14:51:46 +01002403else
2404
2405gb_LinkTarget__use_coinmp :=
2406
Matúš Kukan8dc394d2014-03-31 19:36:41 +02002407endif # ENABLE_COINMP
Matúš Kukanc4560482011-07-28 01:03:23 +02002408
Michael Stahl9ec0e6d2015-11-27 23:54:40 +01002409ifneq (,$(filter MDNSRESPONDER,$(BUILD_TYPE)))
2410
2411define gb_LinkTarget__use_mDNSResponder
2412$(call gb_LinkTarget_set_include,$(1),\
2413 -I$(call gb_UnpackedTarball_get_dir,mDNSResponder)/mDNSShared \
2414 $$(INCLUDE) \
2415)
2416$(call gb_LinkTarget_use_static_libraries,$(1),mDNSResponder)
2417endef
2418
2419endif # MDNSRESPONDER
2420
Caolán McNamaraaabc73d2012-08-30 13:58:15 +01002421ifeq ($(ENABLE_GIO),TRUE)
Matúš Kukanc4560482011-07-28 01:03:23 +02002422
Matúš Kukan464b4332012-01-15 02:12:49 +01002423define gb_LinkTarget__use_gio
2424$(call gb_LinkTarget_set_include,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +01002425 $$(INCLUDE) \
Caolán McNamara1ac9ccf2012-01-16 08:57:38 +00002426 $(GIO_CFLAGS) \
Matúš Kukan464b4332012-01-15 02:12:49 +01002427)
2428
2429$(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2430
2431endef
2432
Caolán McNamaraaabc73d2012-08-30 13:58:15 +01002433else # ENABLE_GIO
2434
2435define gb_LinkTarget__use_gio
Caolán McNamara1e98bb42012-11-06 20:09:57 +00002436
Caolán McNamaraaabc73d2012-08-30 13:58:15 +01002437endef
2438
2439endif # ENABLE_GIO
2440
Siqid0419802013-07-24 11:16:31 +02002441ifeq ($(ENABLE_AVAHI),TRUE)
2442
2443define gb_LinkTarget__use_avahi
2444$(call gb_LinkTarget_set_include,$(1),\
2445 $$(INCLUDE) \
2446 $(AVAHI_CFLAGS) \
2447)
2448
2449$(call gb_LinkTarget_add_defs,$(1),\
2450 -DENABLE_AVAHI \
2451)
2452
2453$(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2454
2455endef
2456
2457else # ENABLE_AVAHI
2458
David Tardon9ce38ef2013-11-05 07:03:08 +01002459gb_LinkTarget__use_avahi :=
Siqid0419802013-07-24 11:16:31 +02002460
2461endif # ENABLE_AVAHI
2462
2463
Bjoern Michaelsene7cc9e02011-07-26 14:51:35 +02002464define gb_LinkTarget__use_gtk
2465$(call gb_LinkTarget_set_include,$(1),\
2466 $$(INCLUDE) \
2467 $(GTK_CFLAGS) \
2468)
2469
2470$(call gb_LinkTarget_add_libs,$(1),$(GTK_LIBS))
2471
David Tardonadb11052011-12-01 13:39:09 +01002472ifeq ($(ENABLE_GTK_PRINT),TRUE)
2473
2474$(call gb_LinkTarget_add_defs,$(1),-DENABLE_GTK_PRINT)
2475
2476$(call gb_LinkTarget_set_include,$(1),\
2477 $$(INCLUDE) \
2478 $(GTK_PRINT_CFLAGS) \
2479)
2480
2481$(call gb_LinkTarget_add_libs,$(1),$(GTK_PRINT_LIBS))
2482
2483endif
2484
Bjoern Michaelsene7cc9e02011-07-26 14:51:35 +02002485endef
Michael Stahl4a8919f2011-04-18 11:13:57 +00002486
Bjoern Michaelsen54dd3072011-07-26 15:15:41 +02002487define gb_LinkTarget__use_gthread
Rene Engelhardac3c7ba2012-11-06 20:38:47 +01002488$(call gb_LinkTarget_add_libs,$(1),$(GTHREAD_LIBS))
Bjoern Michaelsen54dd3072011-07-26 15:15:41 +02002489endef
2490
Caolán McNamara68ffb332012-09-14 11:31:50 +01002491ifeq ($(ENABLE_CUPS),TRUE)
2492
2493define gb_LinkTarget__use_cups
2494$(call gb_LinkTarget_add_defs,$(1),\
2495 -DENABLE_CUPS \
2496)
2497
2498$(call gb_LinkTarget_add_libs,$(1),\
2499 -lcups \
2500)
2501
2502endef
2503
2504else # ENABLE_CUPS
2505
2506define gb_LinkTarget__use_cups
2507
2508endef
2509
2510endif # ENABLE_DBUS
David Tardon1b717ce2011-11-02 13:00:48 +01002511
Caolán McNamara9ec0a3e2012-08-30 13:44:53 +01002512ifeq ($(ENABLE_DBUS),TRUE)
David Tardon1b717ce2011-11-02 13:00:48 +01002513
2514define gb_LinkTarget__use_dbus
2515$(call gb_LinkTarget_set_include,$(1),\
2516 $$(INCLUDE) \
2517 $(DBUS_CFLAGS) \
2518)
2519
David Tardon1b717ce2011-11-02 13:00:48 +01002520$(call gb_LinkTarget_add_libs,$(1),\
2521 $(DBUS_LIBS) \
2522)
2523
2524endef
2525
2526else # ENABLE_DBUS
2527
2528define gb_LinkTarget__use_dbus
2529
2530endef
2531
2532endif # ENABLE_DBUS
2533
2534
Bjoern Michaelsendd321062011-07-26 16:04:15 +02002535define gb_LinkTarget__use_dbusmenugtk
2536$(call gb_LinkTarget_set_include,$(1),\
2537 $$(INCLUDE) \
2538 $(DBUSMENUGTK_CFLAGS) \
2539)
2540
2541$(call gb_LinkTarget_add_libs,$(1),$(DBUSMENUGTK_LIBS))
2542
2543endef
2544
Eike Rathkea3a8b802012-03-16 22:14:54 +01002545
2546ifeq ($(ENABLE_TELEPATHY),TRUE)
2547
2548define gb_LinkTarget__use_telepathy
2549$(call gb_LinkTarget_set_include,$(1),\
2550 $$(INCLUDE) \
2551 $(TELEPATHY_CFLAGS) \
2552)
2553
Eike Rathkea3a8b802012-03-16 22:14:54 +01002554$(call gb_LinkTarget_add_libs,$(1),\
2555 $(TELEPATHY_LIBS) \
2556)
2557
2558endef
2559
2560else # !ENABLE_TELEPATHY
2561
Matúš Kukanfe327622012-08-09 00:15:52 +02002562gb_LinkTarget__use_telepathy :=
Eike Rathkea3a8b802012-03-16 22:14:54 +01002563
2564endif # ENABLE_TELEPATHY
2565
Michael Stahle3abec32014-02-11 15:57:18 +01002566ifneq ($(SYSTEM_LIBPNG),)
David Tardon6df9c472011-09-15 14:44:34 +02002567
2568define gb_LinkTarget__use_png
2569$(call gb_LinkTarget_set_include,$(1),\
2570 $$(INCLUDE) \
2571 $(LIBPNG_CFLAGS) \
2572)
2573
2574$(call gb_LinkTarget_add_libs,$(1),\
2575 $(LIBPNG_LIBS) \
2576)
2577
2578endef
2579
2580else # !SYSTEM_LIBPNG
2581
David Tardon6df9c472011-09-15 14:44:34 +02002582define gb_LinkTarget__use_png
Michael Stahl416b3212013-05-08 17:22:22 +02002583$(call gb_LinkTarget_set_include,$(1),\
2584 $(LIBPNG_CFLAGS) \
2585 $$(INCLUDE) \
2586)
Matúš Kukanf96d58b2012-09-08 18:13:20 +02002587$(call gb_LinkTarget_use_static_libraries,$(1),\
David Tardon6df9c472011-09-15 14:44:34 +02002588 png \
2589)
Michael Stahl398ce442012-09-28 21:47:29 +02002590$(call gb_LinkTarget__use_zlib,$(1))
David Tardon6df9c472011-09-15 14:44:34 +02002591
2592endef
2593
2594endif # !SYSTEM_LIBPNG
2595
Michael Stahl50471a82011-12-06 19:17:52 +01002596
Michael Stahle3abec32014-02-11 15:57:18 +01002597ifneq ($(SYSTEM_CURL),)
Michael Stahl50471a82011-12-06 19:17:52 +01002598
2599define gb_LinkTarget__use_curl
Cédric Bosdonnat89361fa2014-07-16 17:02:01 +02002600$(call gb_LinkTarget_add_defs,$(1),\
2601 -DSYSTEM_CURL \
2602)
Michael Stahl50471a82011-12-06 19:17:52 +01002603$(call gb_LinkTarget_set_include,$(1),\
2604 $$(INCLUDE) \
2605 $(CURL_CFLAGS) \
2606)
2607$(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2608
2609endef
2610
2611else # !SYSTEM_CURL
2612
Michael Stahl32a617d2014-02-17 11:23:19 +01002613$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2614 curl \
2615))
2616
Michael Stahl50471a82011-12-06 19:17:52 +01002617define gb_LinkTarget__use_curl
Christian Lohmaier3dee92e2012-11-13 19:44:44 +01002618$(call gb_LinkTarget_use_package,$(1),curl)
Matúš Kukan9f3a3ab2012-10-29 22:57:34 +01002619$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002620 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
Matúš Kukan9f3a3ab2012-10-29 22:57:34 +01002621 $$(INCLUDE) \
2622)
Michael Stahl936a1a92013-10-23 22:37:11 +02002623
2624ifeq ($(COM),MSC)
Michael Stahl714b93b2013-10-24 00:32:04 +02002625$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahl548da052014-06-02 01:35:41 +02002626 $(call gb_UnpackedTarball_get_dir,curl)/lib/$(if $(MSVC_USE_DEBUG_RUNTIME),debug-dll,release-dll)/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),d)_imp.lib \
Michael Stahl50471a82011-12-06 19:17:52 +01002627)
Michael Stahl936a1a92013-10-23 22:37:11 +02002628else
2629$(call gb_LinkTarget_add_libs,$(1),\
2630 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2631)
2632endif
Michael Stahl50471a82011-12-06 19:17:52 +01002633
2634endef
2635
2636endif # SYSTEM_CURL
2637
Stephan Bergmann49313b02012-11-27 15:35:02 +01002638ifeq ($(ENABLE_VALGRIND),TRUE)
David Tardon3446cda2011-12-23 12:21:19 +01002639
2640define gb_LinkTarget__use_valgrind
2641$(call gb_LinkTarget_add_defs,$(1),\
Stephan Bergmann49313b02012-11-27 15:35:02 +01002642 -DHAVE_VALGRIND_HEADERS \
David Tardon3446cda2011-12-23 12:21:19 +01002643)
2644
2645$(call gb_LinkTarget_set_include,$(1),\
2646 $$(INCLUDE) \
2647 $(VALGRIND_CFLAGS) \
2648)
2649
2650endef
2651
Stephan Bergmann49313b02012-11-27 15:35:02 +01002652else # !ENABLE_VALGRIND
David Tardon3446cda2011-12-23 12:21:19 +01002653
2654define gb_LinkTarget__use_valgrind
2655
2656endef
2657
Stephan Bergmann49313b02012-11-27 15:35:02 +01002658endif # ENABLE_VALGRIND
David Tardon3446cda2011-12-23 12:21:19 +01002659
Michael Stahl32db4992014-02-11 19:35:22 +01002660ifneq ($(SYSTEM_POPPLER),)
David Tardondba2d322012-02-18 18:54:35 +01002661
2662define gb_LinkTarget__use_poppler
David Tardondba2d322012-02-18 18:54:35 +01002663$(call gb_LinkTarget_set_include,$(1),\
2664 $(POPPLER_CFLAGS) \
2665 $$(INCLUDE) \
2666)
2667
2668$(call gb_LinkTarget_add_libs,$(1),\
2669 $(POPPLER_LIBS) \
2670)
2671
2672endef
2673
2674else # !SYSTEM_POPPLER
2675
David Tardondba2d322012-02-18 18:54:35 +01002676define gb_LinkTarget__use_poppler
David Tardoncad68c62015-09-29 18:09:16 +02002677$(call gb_LinkTarget_use_external_project,$(1),poppler,full)
Peter Foleyfb1d11d2013-02-17 09:26:01 -05002678
David Tardon548b61a2012-02-21 06:58:02 +01002679$(call gb_LinkTarget_set_include,$(1),\
Fridrich Štrbaeb276d12013-07-08 14:01:17 +02002680 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2681 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2682 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
David Tardon548b61a2012-02-21 06:58:02 +01002683 $$(INCLUDE) \
David Tardondba2d322012-02-18 18:54:35 +01002684)
2685
Michael Stahl2f6261f2013-09-19 19:28:36 +02002686$(call gb_LinkTarget_add_libs,$(1),\
2687 $(call gb_UnpackedTarball_get_dir,poppler)/fofi/.libs/libfofi$(gb_StaticLibrary_PLAINEXT) \
2688 $(call gb_UnpackedTarball_get_dir,poppler)/goo/.libs/libgoo$(gb_StaticLibrary_PLAINEXT) \
2689 $(call gb_UnpackedTarball_get_dir,poppler)/poppler/.libs/libpoppler$(gb_StaticLibrary_PLAINEXT) \
David Tardon548b61a2012-02-21 06:58:02 +01002690)
2691
2692ifeq ($(OS),MACOSX)
Michael Stahl967986b2012-09-28 00:54:49 +02002693$(call gb_LinkTarget_add_libs,$(1),\
2694 -lobjc \
David Tardon548b61a2012-02-21 06:58:02 +01002695)
Caolán McNamara0d5cc8c2014-08-30 15:12:53 +01002696else ifeq ($(OS),LINUX)
2697$(call gb_LinkTarget_add_libs,$(1),\
2698 -pthread \
2699)
David Tardon548b61a2012-02-21 06:58:02 +01002700else ifeq ($(OS),WNT)
Michael Stahldc397aae2012-09-28 15:31:46 +02002701$(call gb_LinkTarget_use_system_win32_libs,$(1),\
David Tardon548b61a2012-02-21 06:58:02 +01002702 advapi32 \
2703 gdi32 \
2704)
2705endif
2706
David Tardondba2d322012-02-18 18:54:35 +01002707endef
2708
2709endif # SYSTEM_POPPLER
2710
David Tardon3446cda2011-12-23 12:21:19 +01002711
Michael Stahl46648152014-02-11 16:33:18 +01002712ifneq ($(SYSTEM_CLUCENE),)
David Tardon22c60cb2012-04-07 15:50:47 +02002713
2714define gb_LinkTarget__use_clucene
2715$(call gb_LinkTarget_add_defs,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02002716 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
David Tardon22c60cb2012-04-07 15:50:47 +02002717)
2718
2719$(call gb_LinkTarget_set_include,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02002720 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
David Tardon22c60cb2012-04-07 15:50:47 +02002721 $$(INCLUDE) \
2722)
2723
2724$(call gb_LinkTarget_add_libs,$(1),\
2725 $(CLUCENE_LIBS) \
2726)
2727
2728endef
2729
2730else # !SYSTEM_CLUCENE
2731
2732define gb_LinkTarget__use_clucene
Michael Stahl28cde0c2013-05-07 23:47:27 +02002733$(call gb_LinkTarget_set_include,$(1),\
2734 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2735 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2736 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2737 $$(INCLUDE) \
2738)
2739
Michael Stahlc923f7d2012-04-07 23:22:08 +02002740$(call gb_LinkTarget_use_libraries,$(1),\
David Tardon22c60cb2012-04-07 15:50:47 +02002741 clucene \
2742)
2743
2744endef
2745
Marcos Paulo de Souzaf70343b2014-02-12 06:53:02 -02002746$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
David Tardon22c60cb2012-04-07 15:50:47 +02002747 clucene \
2748))
2749
2750endif # SYSTEM_CLUCENE
2751
Peter Foley64402842011-12-22 16:34:35 -05002752define gb_LinkTarget__use_gobject
Rene Engelhardac3c7ba2012-11-06 20:38:47 +01002753$(call gb_LinkTarget_add_libs,$(1),\
2754 $(GOBJECT_LIBS) \
2755)
2756
2757$(call gb_LinkTarget_set_include,$(1),\
2758 $$(INCLUDE) \
2759 $(GOBJECT_CFLAGS) \
2760)
Peter Foley64402842011-12-22 16:34:35 -05002761endef
2762
Michael Stahl5866b332014-02-11 18:56:33 +01002763ifneq ($(SYSTEM_HSQLDB),)
David Tardon579f52d2012-03-27 16:36:31 +02002764
2765define gb_LinkTarget__use_hsqldb
2766
2767$(call gb_LinkTarget_add_defs,$(1),\
2768 -DSYSTEM_HSQLDB \
2769 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2770)
2771
2772endef
2773
2774else # !SYSTEM_HSQLDB
2775
2776define gb_LinkTarget__use_hsqldb
2777
2778endef
2779
2780endif # SYSTEM_HSQLDB
2781
David Tardon8bc7afb2012-04-05 10:53:08 +02002782
Michael Stahl5378dea2014-02-11 19:11:47 +01002783ifneq ($(SYSTEM_OPENLDAP),)
Michael Stahle0ee0d42012-07-16 19:00:07 +02002784
2785define gb_LinkTarget__use_openldap
2786
2787$(call gb_LinkTarget_add_libs,$(1),\
2788 -lldap \
2789 -llber \
2790)
2791
2792endef
2793
Michael Stahl2f6261f2013-09-19 19:28:36 +02002794gb_ExternalProject__use_openldap :=
2795
Michael Stahl5378dea2014-02-11 19:11:47 +01002796else # !SYSTEM_OPENLDAP
Michael Stahle0ee0d42012-07-16 19:00:07 +02002797
Michael Stahle0ee0d42012-07-16 19:00:07 +02002798define gb_LinkTarget__use_openldap
Matúš Kukan7a030392012-10-29 23:29:37 +01002799$(call gb_LinkTarget_use_unpacked,$(1),openldap)
Michael Stahle0ee0d42012-07-16 19:00:07 +02002800$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002801 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
Michael Stahle0ee0d42012-07-16 19:00:07 +02002802 $$(INCLUDE) \
2803)
Stephan Bergmann6b4c4352015-10-09 09:21:48 +02002804$(call gb_LinkTarget_use_external_project,$(1),openldap,full)
Michael Stahl2f6261f2013-09-19 19:28:36 +02002805$(call gb_LinkTarget_add_libs,$(1), \
2806 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2807 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
Michael Stahle0ee0d42012-07-16 19:00:07 +02002808)
2809
2810endef
2811
Michael Stahl2f6261f2013-09-19 19:28:36 +02002812define gb_ExternalProject__use_openldap
2813$(call gb_ExternalProject_use_external_project,$(1),openldap)
2814
2815endef
2816
Michael Stahle0ee0d42012-07-16 19:00:07 +02002817endif # SYSTEM_OPENLDAP
2818
2819
Javier Fernandezf53228c2013-05-10 18:21:30 +00002820ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2821
Michael Stahl23647592014-02-11 19:04:20 +01002822ifneq ($(SYSTEM_FIREBIRD),)
Javier Fernandezf53228c2013-05-10 18:21:30 +00002823
Rene Engelhard0b68d702013-07-16 21:50:14 +02002824define gb_LinkTarget__use_libfbembed
Javier Fernandezf53228c2013-05-10 18:21:30 +00002825$(call gb_LinkTarget_set_include,$(1),\
2826 $(FIREBIRD_CFLAGS) \
2827 $$(INCLUDE) \
2828)
2829$(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
2830
2831endef
2832
2833# gb_LinkTarget__use_atomic_ops :=
2834# gb_LinkTarget__use_tommath :=
2835
2836else # !SYSTEM_FIREBIRD
2837
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +01002838#$(call gb_LinkTarget__use_libatomic_ops,$(1))
2839
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +01002840define gb_LinkTarget__use_libfbembed
2841$(call gb_LinkTarget_use_package,$(1),firebird)
Javier Fernandezf53228c2013-05-10 18:21:30 +00002842$(call gb_LinkTarget_set_include,$(1),\
Javier Fernandezf53228c2013-05-10 18:21:30 +00002843 $$(INCLUDE) \
Andrzej J.R. Hunt7309fda2013-07-16 22:40:47 +02002844 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/include \
Javier Fernandezf53228c2013-05-10 18:21:30 +00002845)
Michael Stahl37563db2013-10-22 22:22:49 +02002846ifeq ($(COM),MSC)
2847$(call gb_LinkTarget_add_libs,$(1),\
2848 $(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/bin/ifbembed.lib \
Javier Fernandezf53228c2013-05-10 18:21:30 +00002849)
Michael Stahl37563db2013-10-22 22:22:49 +02002850else
2851$(call gb_LinkTarget_add_libs,$(1),\
2852 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/lib -lfbembed \
2853)
2854endif
Javier Fernandezf53228c2013-05-10 18:21:30 +00002855
2856endef
2857
Javier Fernandezf53228c2013-05-10 18:21:30 +00002858# define gb_LinkTarget__use_tommath
2859# $(call gb_LinkTarget_set_include,$(1),\
2860# $(TOMMATH_CFLAGS) \
2861# $$(INCLUDE) \
2862# )
2863
2864# $(call gb_LinkTarget_add_libs,$(1),$(TOMMATH_LIBS))
2865
2866# endef
2867
2868endif # SYSTEM_FIREBIRD
2869
2870else # !ENABLE_FIREBIRD_SDBC
Michael Stahl6fa0b372014-02-12 17:01:35 +01002871
Javier Fernandezf53228c2013-05-10 18:21:30 +00002872gb_LinkTarget__use_firebird :=
2873# gb_LinkTarget__use_atomic_ops :=
2874# gb_LinkTarget__use_tommath :=
2875
2876endif # ENABLE_FIREBIRD_SDBC
2877
2878
Michael Stahl5866b332014-02-11 18:56:33 +01002879ifneq ($(SYSTEM_POSTGRESQL),)
David Tardon8bc7afb2012-04-05 10:53:08 +02002880
2881define gb_LinkTarget__use_postgresql
2882
David Tardon8bc7afb2012-04-05 10:53:08 +02002883$(call gb_LinkTarget_set_include,$(1),\
2884 $(POSTGRESQL_INC) \
2885 $$(INCLUDE) \
2886)
2887
2888$(call gb_LinkTarget_add_libs,$(1),\
2889 -lpq \
2890)
2891
2892$(call gb_LinkTarget_add_ldflags,$(1),\
2893 $(POSTGRESQL_LIB) \
2894)
2895
2896endef
2897
2898else # !SYSTEM_POSTGRESQL
2899
2900define gb_LinkTarget__use_postgresql
2901
Michael Stahl2f6261f2013-09-19 19:28:36 +02002902$(call gb_LinkTarget_use_external_project,$(1),postgresql)
David Tardoncb9823b2012-10-22 06:33:00 +02002903
David Tardon8bc7afb2012-04-05 10:53:08 +02002904$(call gb_LinkTarget_set_include,$(1),\
Michael Stahlee8323e2013-05-08 00:19:40 +02002905 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
2906 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
David Tardon8bc7afb2012-04-05 10:53:08 +02002907 $$(INCLUDE) \
2908)
2909
Michael Stahl2f6261f2013-09-19 19:28:36 +02002910$(call gb_LinkTarget_add_libs,$(1),\
2911 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
David Tardon8bc7afb2012-04-05 10:53:08 +02002912)
2913
Tor Lillqvistc2909892012-12-12 01:07:09 +02002914ifeq ($(OS)$(COM),WNTMSC)
Matúš Kukan5e32d152012-05-27 00:21:12 +02002915$(call gb_LinkTarget_use_external,$(1),openssl)
2916
Michael Stahldc397aae2012-09-28 15:31:46 +02002917$(call gb_LinkTarget_use_system_win32_libs,$(1),\
David Tardon8bc7afb2012-04-05 10:53:08 +02002918 secur32 \
2919 ws2_32 \
David Tardon8bc7afb2012-04-05 10:53:08 +02002920)
David Tardon8af6aa62012-05-30 12:06:42 +02002921
David Tardon8bc7afb2012-04-05 10:53:08 +02002922endif
2923
2924endef
2925
David Tardon8bc7afb2012-04-05 10:53:08 +02002926endif # SYSTEM_POSTGRESQL
2927
David Tardond4efa8b2012-04-28 20:48:14 +02002928ifeq ($(ENABLE_KDE4),TRUE)
2929
2930define gb_LinkTarget__use_kde4
2931$(call gb_LinkTarget_set_include,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02002932 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS)))) \
David Tardond4efa8b2012-04-28 20:48:14 +02002933 $$(INCLUDE) \
2934)
2935
2936$(call gb_LinkTarget_add_defs,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02002937 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS))) \
David Tardond4efa8b2012-04-28 20:48:14 +02002938)
2939
2940$(call gb_LinkTarget_add_libs,$(1),\
2941 $(KDE4_LIBS) \
2942)
2943
David Tardond4efa8b2012-04-28 20:48:14 +02002944endef
2945
2946else # !ENABLE_KDE4
2947
2948define gb_LinkTarget__use_kde4
2949
2950endef
2951
2952endif # ENABLE_KDE4
2953
2954
Caolán McNamara9ec0a3e2012-08-30 13:44:53 +01002955ifeq ($(ENABLE_TDE),TRUE)
David Tardond4efa8b2012-04-28 20:48:14 +02002956
2957define gb_LinkTarget__use_tde
2958$(call gb_LinkTarget_add_libs,$(1),\
2959 $(TDE_LIBS) \
2960)
2961
2962$(call gb_LinkTarget_set_include,$(1),\
2963 $$(INCLUDE) \
2964 $(TDE_CFLAGS) \
2965)
2966endef
2967
2968else # ! ENABLE_TDE
2969
2970define gb_LinkTarget__use_tde
2971
2972endef
2973
2974endif # ENABLE_TDE
2975
2976
David Ostrovskye16ac692012-05-27 22:50:41 +02002977# PYTHON
Michael Stahl91926332012-11-27 15:50:53 +01002978# extra python_headers external because pyuno wrapper must not link python
Michael Stahl0443d0a2014-02-11 16:57:35 +01002979ifneq ($(SYSTEM_PYTHON),)
David Ostrovskye16ac692012-05-27 22:50:41 +02002980
Michael Stahl91926332012-11-27 15:50:53 +01002981define gb_LinkTarget__use_python_headers
David Ostrovskye16ac692012-05-27 22:50:41 +02002982$(call gb_LinkTarget_add_defs,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02002983 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYHTON_CFLAGS)))) \
David Ostrovskye16ac692012-05-27 22:50:41 +02002984)
2985
2986$(call gb_LinkTarget_set_include,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02002987 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
David Ostrovskye16ac692012-05-27 22:50:41 +02002988 $$(INCLUDE) \
2989)
2990
Michael Stahl91926332012-11-27 15:50:53 +01002991endef
2992
2993define gb_LinkTarget__use_python
2994$(call gb_LinkTarget__use_python_headers,$(1))
2995
David Ostrovskye16ac692012-05-27 22:50:41 +02002996$(call gb_LinkTarget_add_libs,$(1),\
2997 $(PYTHON_LIBS) \
2998)
2999
3000endef
3001
3002else # !SYSTEM_PYTHON
3003
Michael Stahl720ca8e2014-03-18 18:24:15 +01003004$(eval $(call gb_Helper_register_packages_for_install,python,\
3005 python3 \
3006))
3007
Michael Stahl91926332012-11-27 15:50:53 +01003008define gb_LinkTarget__use_python_headers
David Tardoncad68c62015-09-29 18:09:16 +02003009$(call gb_LinkTarget_use_external_project,$(1),python3,full)
Michael Stahl91926332012-11-27 15:50:53 +01003010$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02003011 -I$(call gb_UnpackedTarball_get_dir,python3) \
3012 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3013 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
Michael Stahl91926332012-11-27 15:50:53 +01003014 $$(INCLUDE) \
3015)
3016
3017endef
3018
David Ostrovskye16ac692012-05-27 22:50:41 +02003019define gb_LinkTarget__use_python
Michael Stahl91926332012-11-27 15:50:53 +01003020$(call gb_LinkTarget__use_python_headers,$(1))
Michael Stahld9162d22015-07-29 12:17:03 +02003021ifeq ($(OS),MACOSX)
3022$(call gb_LinkTarget_use_generated_package,$(1),python3)
3023else
Michael Stahl57dd4d02015-07-29 10:56:57 +02003024$(call gb_LinkTarget_use_package,$(1),python3)
Michael Stahld9162d22015-07-29 12:17:03 +02003025endif
David Ostrovskye16ac692012-05-27 22:50:41 +02003026
3027ifeq ($(OS),WNT)
3028$(call gb_LinkTarget_add_libs,$(1),\
David Ostrovskye04c7342016-02-27 14:14:12 +01003029 $(call gb_UnpackedTarball_get_dir,python3)/PCbuild$(if $(filter X86_64,$(CPUNAME)),/amd64)$(if $(filter 140-INTEL,$(VCVER)-$(CPUNAME)),/win32)/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).lib \
David Ostrovskye16ac692012-05-27 22:50:41 +02003030)
3031else ifeq ($(OS),MACOSX)
3032$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahl9d921ba2012-11-27 15:32:36 +01003033 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
David Ostrovskye16ac692012-05-27 22:50:41 +02003034)
3035else
Michael Stahlb6bcbb62013-04-21 14:34:50 +02003036$(call gb_LinkTarget_add_libs,$(1),\
3037 -L$(call gb_UnpackedTarball_get_dir,python3) \
3038 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
David Ostrovskye16ac692012-05-27 22:50:41 +02003039)
3040endif
3041
David Ostrovskye16ac692012-05-27 22:50:41 +02003042endef
3043
David Ostrovskye16ac692012-05-27 22:50:41 +02003044endif # SYSTEM_PYTHON
3045
Kohei Yoshida49b0b692012-09-04 15:05:35 -04003046# ORCUS
Kohei Yoshida02346aa2013-09-18 19:06:20 -04003047ifeq ($(ENABLE_ORCUS),TRUE)
3048
Michael Stahle3abec32014-02-11 15:57:18 +01003049ifneq ($(SYSTEM_LIBORCUS),)
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003050
3051define gb_LinkTarget__use_orcus
3052$(call gb_LinkTarget_set_include,$(1),\
3053 $$(INCLUDE) \
Matúš Kukana2d63fe2012-09-09 16:29:10 +02003054 $(ORCUS_CFLAGS) \
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003055)
Rene Engelhard26b80fc2013-04-13 19:29:33 +02003056$(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
Rene Engelhardfb360f52013-04-13 16:17:29 +02003057endef
3058
3059define gb_LinkTarget__use_orcus-parser
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003060
3061endef
3062
Kohei Yoshida31f589b2012-08-30 23:26:59 -04003063else # !SYSTEM_LIBORCUS
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003064
David Tardonedb38d72015-06-04 16:09:48 +02003065ifeq ($(COM),MSC)
3066
3067$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3068 orcus \
3069 orcus-parser \
3070))
3071
Kohei Yoshidac8b7e982012-08-31 10:11:32 -04003072define gb_LinkTarget__use_orcus
Matúš Kukan1ee76032012-09-09 15:29:43 +02003073$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl10fc13c2013-05-06 23:35:13 +02003074 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
Matúš Kukan1ee76032012-09-09 15:29:43 +02003075 $$(INCLUDE) \
3076)
David Tardonf1035c12012-11-23 06:49:21 +01003077
David Tardonedb38d72015-06-04 16:09:48 +02003078$(call gb_LinkTarget_use_libraries,$(1),\
3079 orcus \
Stephan Bergmann3743cdb2013-02-17 22:58:21 +01003080)
David Tardonf1035c12012-11-23 06:49:21 +01003081
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003082endef
3083
Kohei Yoshida4d9c2fb2013-04-11 23:11:21 -04003084define gb_LinkTarget__use_orcus-parser
Kohei Yoshidaecc884e2013-12-17 21:18:46 -05003085$(call gb_LinkTarget_set_include,$(1),\
3086 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3087 $$(INCLUDE) \
3088)
David Tardonedb38d72015-06-04 16:09:48 +02003089
3090$(call gb_LinkTarget_use_libraries,$(1),\
3091 orcus-parser \
Kohei Yoshida4d9c2fb2013-04-11 23:11:21 -04003092)
3093
3094endef
3095
David Tardonedb38d72015-06-04 16:09:48 +02003096else # !MSC
3097
3098$(eval $(call gb_Helper_register_packages_for_install,ooo,\
3099 liborcus \
3100))
3101
3102define gb_LinkTarget__use_orcus
3103$(call gb_LinkTarget_use_package,$(1),liborcus)
3104
3105$(call gb_LinkTarget_set_include,$(1),\
3106 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3107 $$(INCLUDE) \
3108)
3109
3110$(call gb_LinkTarget_add_libs,$(1),\
Kohei Yoshidab325b4c2016-03-05 20:09:34 -05003111 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.11 \
David Tardonedb38d72015-06-04 16:09:48 +02003112)
3113
3114$(if $(SYSTEM_BOOST), \
3115 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3116 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3117)
3118
3119endef
3120
3121define gb_LinkTarget__use_orcus-parser
3122$(call gb_LinkTarget_use_package,$(1),liborcus)
3123
3124$(call gb_LinkTarget_set_include,$(1),\
3125 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3126 $$(INCLUDE) \
3127)
3128
3129$(call gb_LinkTarget_add_libs,$(1),\
Kohei Yoshidab325b4c2016-03-05 20:09:34 -05003130 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.11 \
David Tardonedb38d72015-06-04 16:09:48 +02003131)
3132
3133endef
3134
3135endif # MSC
3136
Kohei Yoshida31f589b2012-08-30 23:26:59 -04003137endif # SYSTEM_LIBORCUS
David Ostrovskye16ac692012-05-27 22:50:41 +02003138
Kohei Yoshida02346aa2013-09-18 19:06:20 -04003139else # ENABLE_ORCUS != TRUE
3140
3141gb_LinkTarget__use_orcus :=
3142gb_LinkTarget__use_orcus-parser :=
3143
3144endif
Michael Stahl78b59b82012-09-27 21:45:47 +02003145
David Tardon49a4d362013-11-12 16:44:40 +01003146ifeq ($(ENABLE_EOT),TRUE)
3147
Michael Stahle3abec32014-02-11 15:57:18 +01003148ifneq ($(SYSTEM_LIBEOT),)
David Tardon49a4d362013-11-12 16:44:40 +01003149
3150define gb_LinkTarget__use_libeot
3151$(call gb_LinkTarget_set_include,$(1),\
3152 $$(INCLUDE) \
3153 $(LIBEOT_CFLAGS) \
3154)
3155$(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3156
3157endef
3158
3159gb_ExternalProject__use_libeot :=
3160
3161else # !SYSTEM_LIBEOT
3162
3163define gb_LinkTarget__use_libeot
3164$(call gb_LinkTarget_set_include,$(1),\
3165 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3166 $$(INCLUDE) \
3167)
3168$(call gb_LinkTarget_add_libs,$(1),\
3169 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3170)
3171$(call gb_LinkTarget_use_external_project,$(1),libeot)
3172
3173endef
3174
3175define gb_ExternalProject__use_libeot
3176$(call gb_ExternalProject_use_external_project,$(1),libeot)
3177
3178endef
3179
3180endif # SYSTEM_LIBEOT
3181
3182else # !ENABLE_EOT
3183
3184gb_LinkTarget__use_libeot :=
3185gb_ExternalProject__use_libeot :=
3186
3187endif # ENABLE_EOT
3188
Michael Stahl78b59b82012-09-27 21:45:47 +02003189### X11 stuff ###
3190
Samuel Mehrbrodtc29ea222015-09-18 14:12:08 +02003191ifeq ($(USING_X11), TRUE)
Michael Stahl78b59b82012-09-27 21:45:47 +02003192
Michael Stahl78b59b82012-09-27 21:45:47 +02003193define gb_LinkTarget__use_Xrandr
Michael Stahl78b59b82012-09-27 21:45:47 +02003194$(call gb_LinkTarget_set_include,$(1),\
3195 $$(INCLUDE) \
3196 $(XRANDR_CFLAGS) \
3197)
3198
3199$(call gb_LinkTarget_add_libs,$(1),\
3200 $(XRANDR_LIBS) \
3201)
3202endef
3203
Michael Stahl78b59b82012-09-27 21:45:47 +02003204define gb_LinkTarget__use_Xrender
Michael Stahl78b59b82012-09-27 21:45:47 +02003205$(call gb_LinkTarget_set_include,$(1),\
3206 $$(INCLUDE) \
3207 $(XRENDER_CFLAGS) \
3208)
3209
3210$(call gb_LinkTarget_add_libs,$(1),\
3211 $(XRENDER_LIBS) \
3212)
3213endef
3214
Samuel Mehrbrodtc29ea222015-09-18 14:12:08 +02003215endif # USING_X11
Michael Stahl78b59b82012-09-27 21:45:47 +02003216
Tor Lillqvist35491072011-08-02 21:22:35 +03003217
Michael Meeksb440cfc2013-02-28 12:05:07 +00003218gb_ExternalProject__use_nss3:=
3219
Tor Lillqvist3442b002014-08-12 16:50:17 +03003220ifeq ($(OS),ANDROID)
Tor Lillqvist9dc7f052012-08-13 09:19:35 +03003221
Peter Foleyc003d252013-01-01 09:39:36 -05003222gb_LinkTarget__use_nss3:=
Tor Lillqvist801408c2014-12-12 23:51:17 +02003223gb_LinkTarget__use_plc4:=
Tor Lillqvist9dc7f052012-08-13 09:19:35 +03003224
3225else
3226
Michael Stahle3abec32014-02-11 15:57:18 +01003227ifneq ($(SYSTEM_NSS),)
David Tardonb6aa4842011-08-11 13:10:14 +02003228
David Tardon2b9dbc82012-08-13 06:57:51 +02003229define gb_LinkTarget__use_nss3
3230$(call gb_LinkTarget_add_defs,$(1),\
Stephan Bergmannea641222012-11-19 16:40:33 +01003231 -DSYSTEM_NSS \
David Tardon2b9dbc82012-08-13 06:57:51 +02003232)
3233
David Tardonb6aa4842011-08-11 13:10:14 +02003234$(call gb_LinkTarget_set_include,$(1),\
3235 $$(INCLUDE) \
Tomas Chvatal75f77e62011-11-02 21:16:53 +01003236 $(NSS_CFLAGS) \
David Tardonb6aa4842011-08-11 13:10:14 +02003237)
3238
3239$(call gb_LinkTarget_add_libs,$(1),\
Tomas Chvatal75f77e62011-11-02 21:16:53 +01003240 $(NSS_LIBS) \
David Tardonb6aa4842011-08-11 13:10:14 +02003241)
Caolán McNamara24ae3ab2011-08-11 12:47:00 +01003242
David Tardonb6aa4842011-08-11 13:10:14 +02003243endef
3244
David Tardon2b9dbc82012-08-13 06:57:51 +02003245define gb_LinkTarget__use_plc4
3246$(call gb_LinkTarget__use_nss3,$(1))
3247
3248endef
3249
David Tardon6ef46562013-02-04 10:04:07 +01003250define gb_LinkTarget__use_ssl3
3251$(call gb_LinkTarget__use_nss3,$(1))
3252
3253endef
3254
Michael Stahle3abec32014-02-11 15:57:18 +01003255else # !SYSTEM_NSS
David Tardonb6aa4842011-08-11 13:10:14 +02003256
Michael Stahlffae67c2014-03-13 19:51:19 +01003257$(eval $(call gb_Helper_register_packages_for_install,ooo, \
3258 nss \
3259))
3260
David Tardon2b9dbc82012-08-13 06:57:51 +02003261define gb_LinkTarget__use_nss3
Peter Foleyc003d252013-01-01 09:39:36 -05003262$(call gb_LinkTarget_use_package,$(1),nss)
David Tardon2b9dbc82012-08-13 06:57:51 +02003263$(call gb_LinkTarget_set_include,$(1),\
3264 $$(INCLUDE) \
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003265 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3266 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
David Tardon2b9dbc82012-08-13 06:57:51 +02003267)
3268
Michael Stahld2f62c32013-10-23 00:14:01 +02003269ifeq ($(COM),MSC)
3270$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003271 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3272 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3273 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
David Tardon2b9dbc82012-08-13 06:57:51 +02003274)
Michael Stahld2f62c32013-10-23 00:14:01 +02003275else
3276$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003277 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
Michael Stahld2f62c32013-10-23 00:14:01 +02003278 -lnspr4 \
3279 -lnss3 \
3280 -lsmime3 \
3281)
3282endif
David Tardon2b9dbc82012-08-13 06:57:51 +02003283
3284endef
3285
Caolán McNamara24ae3ab2011-08-11 12:47:00 +01003286define gb_LinkTarget__use_plc4
Peter Foleyc003d252013-01-01 09:39:36 -05003287$(call gb_LinkTarget_use_package,$(1),nss)
Michael Stahld2f62c32013-10-23 00:14:01 +02003288ifeq ($(COM),MSC)
3289$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003290 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
David Tardonb6aa4842011-08-11 13:10:14 +02003291)
Michael Stahld2f62c32013-10-23 00:14:01 +02003292else
3293$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003294 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
Michael Stahld2f62c32013-10-23 00:14:01 +02003295)
3296endif
Caolán McNamara24ae3ab2011-08-11 12:47:00 +01003297
David Tardonb6aa4842011-08-11 13:10:14 +02003298endef
3299
David Tardon6ef46562013-02-04 10:04:07 +01003300define gb_LinkTarget__use_ssl3
3301$(call gb_LinkTarget_use_package,$(1),nss)
Michael Stahld2f62c32013-10-23 00:14:01 +02003302ifeq ($(COM),MSC)
3303$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003304 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
David Tardon6ef46562013-02-04 10:04:07 +01003305)
Michael Stahld2f62c32013-10-23 00:14:01 +02003306else
3307$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003308 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
Michael Stahld2f62c32013-10-23 00:14:01 +02003309)
3310endif
David Tardon6ef46562013-02-04 10:04:07 +01003311
3312endef
3313
Michael Meeksb440cfc2013-02-28 12:05:07 +00003314define gb_ExternalProject__use_nss3
3315$(call gb_ExternalProject_use_package,$(1),nss)
Michael Meeksb440cfc2013-02-28 12:05:07 +00003316
3317endef
3318
Michael Stahle3abec32014-02-11 15:57:18 +01003319endif # SYSTEM_NSS
3320
Tor Lillqvist9dc7f052012-08-13 09:19:35 +03003321endif # DESKTOP
David Tardonb6aa4842011-08-11 13:10:14 +02003322
Markus Mohrharda46ef632015-11-15 04:39:24 +01003323ifeq ($(ENABLE_BREAKPAD),TRUE)
3324
Markus Mohrharda46ef632015-11-15 04:39:24 +01003325define gb_LinkTarget__use_breakpad
3326$(call gb_LinkTarget_set_include,$(1),\
3327 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3328 $$(INCLUDE) \
3329)
3330
3331ifeq ($(COM),MSC)
Markus Mohrhardff9b7d12016-03-31 00:00:03 +02003332$(call gb_LinkTarget_use_static_libraries,$(1),\
3333 breakpad \
Markus Mohrharda46ef632015-11-15 04:39:24 +01003334)
3335else
3336$(call gb_LinkTarget_add_libs,$(1),\
3337 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3338)
3339endif
3340
3341$(call gb_LinkTarget_use_external_project,$(1),breakpad)
3342
Michael Stahlb4d3a0d2016-02-23 15:08:47 +01003343endef
3344
Markus Mohrhard133a5d872016-02-27 14:50:13 +01003345endif # ENABLE_BREAKPAD
Markus Mohrharda46ef632015-11-15 04:39:24 +01003346
Zolnai Tamás62fd6302014-04-18 12:55:56 +02003347ifeq ($(ENABLE_GLTF),TRUE)
3348
Rene Engelhard97bda8e2014-08-05 20:05:35 +02003349ifneq ($(SYSTEM_LIBGLTF),TRUE)
3350
Zolnai Tamás62fd6302014-04-18 12:55:56 +02003351define gb_LinkTarget__use_libgltf
3352$(call gb_LinkTarget_set_include,$(1),\
3353 -I$(call gb_UnpackedTarball_get_dir,libgltf)/inc \
3354 $$(INCLUDE) \
3355)
3356
Zolnai Tamás6403f2b2014-06-25 15:19:41 +02003357ifeq ($(COM),MSC)
3358$(call gb_LinkTarget_add_libs,$(1),\
David Ostrovskyac06ab22015-02-18 22:17:49 +01003359 $(call gb_UnpackedTarball_get_dir,libgltf)/build/win32/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug/libgltf.lib,Release/libgltf.lib) \
Zolnai Tamás62fd6302014-04-18 12:55:56 +02003360)
Zolnai Tamás6403f2b2014-06-25 15:19:41 +02003361else
3362$(call gb_LinkTarget_add_libs,$(1),\
3363 $(call gb_UnpackedTarball_get_dir,libgltf)/src/.libs/libgltf-0.0$(gb_StaticLibrary_PLAINEXT) \
3364)
3365endif
3366
3367$(call gb_LinkTarget_use_external_project,$(1),libgltf)
3368
3369endef
3370
Rene Engelhard97bda8e2014-08-05 20:05:35 +02003371else # SYSTEM_LIBGLTF
3372
3373define gb_LinkTarget__use_libgltf
3374$(call gb_LinkTarget_set_include,$(1),\
3375 $$(INCLUDE) \
3376 $(LIBGLTF_CFLAGS) \
3377)
3378$(call gb_LinkTarget_add_libs,$(1),$(LIBGLTF_LIBS))
Rene Engelhard97bda8e2014-08-05 20:05:35 +02003379
3380endef
3381
Julien Nabet3ee2edf2016-05-07 22:43:37 +02003382endif # SYSTEM_LIBGLTF
Rene Engelhard97bda8e2014-08-05 20:05:35 +02003383
Zolnai Tamás191f0942014-08-07 15:21:41 +02003384ifeq ($(ENABLE_COLLADA),TRUE)
3385
David Tardonf24c6082014-10-20 14:21:22 +02003386ifeq ($(SYSTEM_OPENCOLLADA),TRUE)
3387
3388define gb_LinkTarget__use_opencollada_parser
3389$(call gb_LinkTarget_set_include,$(1),\
3390 $$(INCLUDE) \
3391 $(OPENCOLLADA_CFLAGS) \
3392)
3393
3394$(call gb_LinkTarget_add_libs,$(1),$(OPENCOLLADA_LIBS))
3395
3396endef
3397
3398else # !SYSTEM_OPENCOLLADA
3399
Zolnai Tamásaa5fe792014-04-10 13:33:58 +02003400define gb_LinkTarget__use_opencollada_parser
3401$(call gb_LinkTarget_set_include,$(1),\
3402 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADABaseUtils/include \
3403 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADAFramework/include \
3404 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADASaxFrameworkLoader/include \
3405 -I$(call gb_UnpackedTarball_get_dir,opencollada)/GeneratedSaxParser/include \
3406 $$(INCLUDE) \
3407)
3408
3409$(call gb_LinkTarget_use_static_libraries,$(1),\
3410 opencollada_parser \
3411)
3412endef
3413
David Tardonf24c6082014-10-20 14:21:22 +02003414endif # SYSTEM_OPENCOLLADA
3415
David Tardon8840fd32015-04-13 15:31:41 +02003416ifeq ($(SYSTEM_COLLADA2GLTF),TRUE)
3417
3418define gb_LinkTarget__use_collada2gltf
3419$(call gb_LinkTarget_set_include,$(1),\
3420 $$(INCLUDE) \
3421 $(COLLADA2GLTF_CFLAGS) \
3422)
3423
3424$(call gb_LinkTarget_add_libs,$(1),$(COLLADA2GLTF_LIBS))
3425
3426endef
3427
3428else # !SYSTEM_COLLADA2GLTF
3429
Zolnai Tamásd57591702014-04-10 13:37:38 +02003430define gb_LinkTarget__use_collada2gltf
3431$(call gb_LinkTarget_set_include,$(1),\
3432 -I$(call gb_UnpackedTarball_get_dir,collada2gltf) \
3433 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/assetModifiers \
3434 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/GLTF \
3435 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/helpers \
3436 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/JSON \
3437 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/dependencies/json/include/rapidjson/ \
3438 $$(INCLUDE) \
3439)
3440
3441$(call gb_LinkTarget_use_static_libraries,$(1),\
3442 collada2gltf \
3443)
3444endef
3445
David Tardon8840fd32015-04-13 15:31:41 +02003446endif # SYSTEM_COLLADA2GLTF
3447
Zolnai Tamás191f0942014-08-07 15:21:41 +02003448endif # ENABLE_COLLADA
3449
3450endif # ENABLE_GLTF
Zolnai Tamás62fd6302014-04-18 12:55:56 +02003451
Stephan Bergmannecc617e2015-07-08 11:20:19 +02003452define gb_LinkTarget__use_dconf
3453$(call gb_LinkTarget_add_defs,$(1),$(DCONF_CFLAGS))
3454$(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3455endef
3456
Michael Stahl2ee5f242011-09-15 14:01:27 +02003457### Jars ############################################################
3458
Michael Stahl5866b332014-02-11 18:56:33 +01003459ifneq ($(SYSTEM_HSQLDB),)
Michael Stahl666173b2012-08-15 20:24:59 +02003460
3461define gb_Jar__use_hsqldb
3462$(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3463endef
Michael Stahlb254f4f2012-08-17 11:47:29 +02003464define gb_JunitTest__use_hsqldb
3465$(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3466endef
Michael Stahl666173b2012-08-15 20:24:59 +02003467
3468else # !SYSTEM_HSQLDB
3469
David Tardon2dec0672014-05-19 10:20:37 +02003470ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl376d1b52014-03-18 20:25:04 +01003471$(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003472 hsqldb \
3473))
David Tardon2dec0672014-05-19 10:20:37 +02003474endif
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003475
Michael Stahl666173b2012-08-15 20:24:59 +02003476define gb_Jar__use_hsqldb
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003477$(call gb_Jar_use_jar,$(1),hsqldb)
Michael Stahl666173b2012-08-15 20:24:59 +02003478endef
Michael Stahlb254f4f2012-08-17 11:47:29 +02003479define gb_JunitTest__use_hsqldb
3480$(call gb_JunitTest_use_jar,$(1),hsqldb)
3481endef
Michael Stahl666173b2012-08-15 20:24:59 +02003482
3483endif # SYSTEM_HSQLDB
3484
Michael Stahl2ee5f242011-09-15 14:01:27 +02003485
Rene Engelhard40facc42014-05-23 07:43:19 +02003486ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3487
Michael Stahl7d2f7c62014-02-11 19:39:18 +01003488ifneq ($(SYSTEM_BSH),)
David Tardon3bcf9102011-10-04 09:44:48 +02003489
Michael Stahla4551262012-08-15 17:41:25 +02003490define gb_Jar__use_bsh
3491$(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
David Tardon3bcf9102011-10-04 09:44:48 +02003492endef
3493
3494else # !SYSTEM_BSH
3495
David Tardon2dec0672014-05-19 10:20:37 +02003496ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl8475eb92014-03-18 20:38:30 +01003497$(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003498 bsh \
3499))
David Tardon2dec0672014-05-19 10:20:37 +02003500endif
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003501
Michael Stahla4551262012-08-15 17:41:25 +02003502define gb_Jar__use_bsh
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003503$(call gb_Jar_use_jar,$(1),bsh)
David Tardon3bcf9102011-10-04 09:44:48 +02003504endef
3505
3506endif # SYSTEM_BSH
3507
Rene Engelhard40facc42014-05-23 07:43:19 +02003508endif
3509
3510ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
Michael Stahl2ee5f242011-09-15 14:01:27 +02003511
Michael Stahl49dde4c2014-02-11 19:42:28 +01003512ifneq ($(SYSTEM_RHINO),)
Tomas Chvatal32af02b2012-05-06 12:49:33 +02003513
Michael Stahla4551262012-08-15 17:41:25 +02003514define gb_Jar__use_rhino
3515$(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
Tomas Chvatal32af02b2012-05-06 12:49:33 +02003516endef
3517
3518else # !SYSTEM_RHINO
3519
David Tardon2dec0672014-05-19 10:20:37 +02003520ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl6474d1c2014-03-18 20:50:02 +01003521$(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003522 js \
3523))
David Tardon2dec0672014-05-19 10:20:37 +02003524endif
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003525
Michael Stahla4551262012-08-15 17:41:25 +02003526define gb_Jar__use_rhino
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003527$(call gb_Jar_use_jar,$(1),js)
Tomas Chvatal32af02b2012-05-06 12:49:33 +02003528endef
3529
3530endif # SYSTEM_RHINO
3531
Rene Engelhard40facc42014-05-23 07:43:19 +02003532endif
3533
Michael Stahl7d2f7c62014-02-11 19:39:18 +01003534ifneq ($(SYSTEM_APACHE_COMMONS),)
David Tardon9b530e12012-04-07 10:07:35 +02003535
Michael Stahla4551262012-08-15 17:41:25 +02003536define gb_Jar__use_commons-logging
3537$(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003538endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02003539gb_ExternalProject__use_commons-logging :=
David Tardon9b530e12012-04-07 10:07:35 +02003540
3541else # !SYSTEM_APACHE_COMMONS
3542
David Tardon2dec0672014-05-19 10:20:37 +02003543ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl2bec9f42014-03-18 21:54:33 +01003544$(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
rbujd8a7f722014-08-18 13:52:32 +02003545 commons-logging-$(COMMONS_LOGGING_VERSION) \
Michael Stahldb23d4b2013-10-24 23:10:27 +02003546))
David Tardon2dec0672014-05-19 10:20:37 +02003547endif
David Tardon9b530e12012-04-07 10:07:35 +02003548
Michael Stahla4551262012-08-15 17:41:25 +02003549define gb_Jar__use_commons-logging
Michael Stahl461d8302013-10-25 18:40:48 +02003550$(call gb_Jar_use_external_project,$(1),apache_commons_logging)
rbujd8a7f722014-08-18 13:52:32 +02003551$(call gb_Jar_use_jar,$(1),commons-logging-$(COMMONS_LOGGING_VERSION))
David Tardon9b530e12012-04-07 10:07:35 +02003552endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02003553define gb_ExternalProject__use_commons-logging
Michael Stahla60427e2013-10-26 20:17:52 +02003554$(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
Michael Stahl2b7536a2012-10-05 21:17:25 +02003555endef
David Tardon9b530e12012-04-07 10:07:35 +02003556
3557endif # SYSTEM_APACHE_COMMONS
3558
3559
Michael Stahl32db4992014-02-11 19:35:22 +01003560ifneq ($(SYSTEM_JFREEREPORT),)
David Tardon9b530e12012-04-07 10:07:35 +02003561
Michael Stahla4551262012-08-15 17:41:25 +02003562define gb_Jar__use_flow-engine
3563$(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003564endef
3565
Michael Stahla4551262012-08-15 17:41:25 +02003566define gb_Jar__use_flute
3567$(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003568endef
3569
Michael Stahla4551262012-08-15 17:41:25 +02003570define gb_Jar__use_libbase
3571$(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003572endef
3573
Michael Stahla4551262012-08-15 17:41:25 +02003574define gb_Jar__use_libfonts
3575$(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003576endef
3577
Michael Stahla4551262012-08-15 17:41:25 +02003578define gb_Jar__use_libformula
3579$(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003580endef
3581
Michael Stahla4551262012-08-15 17:41:25 +02003582define gb_Jar__use_liblayout
3583$(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003584endef
3585
Michael Stahla4551262012-08-15 17:41:25 +02003586define gb_Jar__use_libloader
3587$(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003588endef
3589
Michael Stahla4551262012-08-15 17:41:25 +02003590define gb_Jar__use_librepository
3591$(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003592endef
3593
Michael Stahla4551262012-08-15 17:41:25 +02003594define gb_Jar__use_libserializer
3595$(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003596endef
3597
Michael Stahla4551262012-08-15 17:41:25 +02003598define gb_Jar__use_libxml
3599$(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003600endef
3601
Michael Stahla4551262012-08-15 17:41:25 +02003602define gb_Jar__use_sac
3603$(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003604endef
3605
3606else # !SYSTEM_JFREEREPORT
3607
David Tardon2dec0672014-05-19 10:20:37 +02003608ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl4c3626af2014-03-18 22:03:00 +01003609$(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
Michael Stahl070ca1e2013-10-25 21:01:58 +02003610 flow-engine \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003611 flute-1.1.6 \
3612 libbase-1.1.6 \
3613 libfonts-1.1.6 \
3614 libformula-1.1.7 \
Michael Stahl070ca1e2013-10-25 21:01:58 +02003615 liblayout \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003616 libloader-1.1.6 \
3617 librepository-1.1.6 \
3618 libserializer-1.1.6 \
3619 libxml-1.1.7 \
3620 sac \
3621))
David Tardon2dec0672014-05-19 10:20:37 +02003622endif
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003623
Michael Stahla4551262012-08-15 17:41:25 +02003624define gb_Jar__use_flow-engine
Michael Stahl070ca1e2013-10-25 21:01:58 +02003625$(call gb_Jar_use_jar,$(1),flow-engine)
David Tardon9b530e12012-04-07 10:07:35 +02003626endef
3627
Michael Stahla4551262012-08-15 17:41:25 +02003628define gb_Jar__use_flute
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003629$(call gb_Jar_use_jar,$(1),flute-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003630endef
3631
Michael Stahla4551262012-08-15 17:41:25 +02003632define gb_Jar__use_libbase
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003633$(call gb_Jar_use_jar,$(1),libbase-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003634endef
3635
Michael Stahla4551262012-08-15 17:41:25 +02003636define gb_Jar__use_libfonts
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003637$(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003638endef
3639
Michael Stahla4551262012-08-15 17:41:25 +02003640define gb_Jar__use_libformula
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003641$(call gb_Jar_use_jar,$(1),libformula-1.1.7)
David Tardon9b530e12012-04-07 10:07:35 +02003642endef
3643
Michael Stahla4551262012-08-15 17:41:25 +02003644define gb_Jar__use_liblayout
Michael Stahl070ca1e2013-10-25 21:01:58 +02003645$(call gb_Jar_use_jar,$(1),liblayout)
David Tardon9b530e12012-04-07 10:07:35 +02003646endef
3647
Michael Stahla4551262012-08-15 17:41:25 +02003648define gb_Jar__use_libloader
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003649$(call gb_Jar_use_jar,$(1),libloader-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003650endef
3651
Michael Stahla4551262012-08-15 17:41:25 +02003652define gb_Jar__use_librepository
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003653$(call gb_Jar_use_jar,$(1),librepository-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003654endef
3655
Michael Stahla4551262012-08-15 17:41:25 +02003656define gb_Jar__use_libserializer
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003657$(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003658endef
3659
Michael Stahla4551262012-08-15 17:41:25 +02003660define gb_Jar__use_libxml
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003661$(call gb_Jar_use_jar,$(1),libxml-1.1.7)
David Tardon9b530e12012-04-07 10:07:35 +02003662endef
3663
Michael Stahla4551262012-08-15 17:41:25 +02003664define gb_Jar__use_sac
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003665$(call gb_Jar_use_jar,$(1),sac)
David Tardon9b530e12012-04-07 10:07:35 +02003666endef
3667
3668endif # SYSTEM_JFREEREPORT
3669
David Tardonc2eca352012-12-02 10:51:37 +01003670
3671# Executables
3672
David Tardonedf67302012-12-30 12:27:04 +01003673# FIXME: the library target should be for build too
3674define gb_Executable__register_bestreversemap
3675$(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3676 $(if $(filter-out ANDROID,$(OS)),$(call gb_Library_get_target,sal_textenc)) \
3677)
3678endef
3679
David Tardonceb0d062012-12-30 13:11:43 +01003680# TODO depending on the whole URE might be overkill, but I do not have a
3681# Windows machine to debug it...
3682# FIXME: the library target should be for build too
3683define gb_Executable__register_climaker
3684$(call gb_Executable_add_runtime_dependencies,climaker,\
3685 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
Michael Stahl4e6b4fb2015-11-27 12:49:34 +01003686 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
Tor Lillqviste4c6fe52013-04-24 15:11:39 +03003687 $(call gb_UnoApi_get_target,udkapi) \
Michael Stahl4e6b4fb2015-11-27 12:49:34 +01003688 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
David Tardonceb0d062012-12-30 13:11:43 +01003689)
3690endef
3691
David Tardon6c1614a2014-01-08 13:49:46 +01003692define gb_Executable__register_cppumaker
3693$(call gb_Executable_add_runtime_dependencies,cppumaker,\
3694 $(if $(filter-out ANDROID,$(OS)),$(call gb_Library_get_target,sal_textenc)) \
3695)
3696endef
3697
Matúš Kukanbae52ee2013-05-16 09:17:57 +02003698# This is used to determine what we need for 'build' platform.
Michael Stahl4e6b4fb2015-11-27 12:49:34 +01003699# FIXME: the library target should be for build too
Matúš Kukan9555b5b2013-06-14 12:48:20 +02003700define gb_Executable__register_gengal
Matúš Kukan94b68822013-06-17 10:41:18 +02003701$(call gb_Executable_add_runtime_dependencies,gengal,\
David Tardon1546c292013-05-07 20:41:41 +02003702 $(call gb_AllLangResTarget_get_target,ofa) \
David Tardon1546c292013-05-07 20:41:41 +02003703 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
David Tardone59420d2014-08-04 17:23:54 +02003704 $(call gb_Package_get_target_for_build,postprocess_images) \
Matúš Kukan8b162f22013-09-27 10:58:28 +02003705 $(call gb_Package_get_target_for_build,postprocess_registry) \
Matúš Kukan15614c82015-12-05 07:05:37 +01003706 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3707 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3708 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
Michael Stahl4e6b4fb2015-11-27 12:49:34 +01003709 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3710 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
David Tardon1546c292013-05-07 20:41:41 +02003711 $(call gb_UnoApi_get_target,offapi) \
3712 $(call gb_UnoApi_get_target,udkapi) \
3713)
3714endef
3715
Michael Stahl187194b2014-02-11 19:17:42 +01003716ifeq ($(SYSTEM_ICU),)
David Tardonedf67302012-12-30 12:27:04 +01003717
3718define gb_Executable__register_gendict
3719$(call gb_Executable_add_runtime_dependencies,gendict,\
3720 $(call gb_Package_get_target_for_build,icu) \
3721)
3722endef
3723
3724endif
3725
David Tardonceb0d062012-12-30 13:11:43 +01003726define gb_Executable__register_idlc
3727$(call gb_Executable_add_runtime_dependencies,idlc,\
David Tardonce038cf2013-10-20 20:43:46 +02003728 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
David Tardonceb0d062012-12-30 13:11:43 +01003729)
3730endef
3731
David Tardonedf67302012-12-30 12:27:04 +01003732define gb_Executable__register_localize
3733$(call gb_Executable_add_runtime_dependencies,localize,\
3734 $(foreach exec,cfgex helpex propex transex3 treex uiex ulfex xrmex,\
3735 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3736 ) \
3737)
3738endef
3739
Michael Stahl4c51feb2013-09-21 01:39:41 +02003740# FIXME ure/services.rdb needs cleanup
Stephan Bergmannab149c72013-04-24 10:42:40 +02003741# The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
David Tardonedf67302012-12-30 12:27:04 +01003742# due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3743# FIXME: the library target should be for build too
3744define gb_Executable__register_saxparser
3745$(call gb_Executable_add_runtime_dependencies,saxparser,\
3746 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
David Tardon92f66c52014-10-13 16:59:33 +02003747 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
Matúš Kukanb469cd22013-05-24 12:24:27 +02003748 $(call gb_Rdb_get_target_for_build,saxparser) \
Michael Stahl4e6b4fb2015-11-27 12:49:34 +01003749 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
Tor Lillqviste4c6fe52013-04-24 15:11:39 +03003750 $(call gb_UnoApi_get_target,udkapi) \
David Tardonedf67302012-12-30 12:27:04 +01003751)
3752endef
3753
Stephan Bergmannab149c72013-04-24 10:42:40 +02003754# NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
David Tardonedf67302012-12-30 12:27:04 +01003755# required due to the settings for URE_SERVICES and URE_TYPES in
3756# cppuhelper/source/unorc
3757# FIXME: the library target should be for build too
3758define gb_Executable__register_uno
3759$(call gb_Executable_add_runtime_dependencies,uno,\
3760 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
Michael Stahl4e6b4fb2015-11-27 12:49:34 +01003761 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
Tor Lillqviste4c6fe52013-04-24 15:11:39 +03003762 $(call gb_UnoApi_get_target,udkapi) \
David Tardonedf67302012-12-30 12:27:04 +01003763)
3764endef
3765
3766
3767# External executables
3768
Michael Stahl379f9782014-02-11 16:49:19 +01003769ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
David Tardonc2eca352012-12-02 10:51:37 +01003770
3771gb_ExternalExecutable__register_xmllint :=
3772
3773else # ! SYSTEM_LIBXML_FOR_BUILD
3774
3775define gb_ExternalExecutable__register_xmllint
David Tardondbac8f52014-04-18 18:34:40 +02003776$(call gb_ExternalExecutable_set_internal,xmllint,$(WORKDIR_FOR_BUILD)/UnpackedTarball/xml2/$(if $(filter MSC,$(COM)),win32/bin.msvc)/xmllint$(gb_Executable_EXT_for_build),xml2)
David Tardon5b660242014-07-28 10:38:49 +02003777$(call gb_ExternalExecutable_add_dependencies,xmllint,\
3778 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3779 $(call gb_Package_get_target,xml2) \
3780)
David Tardonc2eca352012-12-02 10:51:37 +01003781
3782endef
3783
3784endif # SYSTEM_LIBXML_FOR_BUILD
3785
Michael Stahle3abec32014-02-11 15:57:18 +01003786ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
David Tardonc2eca352012-12-02 10:51:37 +01003787
3788gb_ExternalExecutable__register_xsltproc :=
3789
3790else # ! SYSTEM_LIBXSLT_FOR_BUILD
3791
3792define gb_ExternalExecutable__register_xsltproc
David Tardondbac8f52014-04-18 18:34:40 +02003793$(call gb_ExternalExecutable_set_internal,xsltproc,$(WORKDIR_FOR_BUILD)/UnpackedTarball/xslt/$(if $(filter MSC,$(COM)),win32/bin.msvc,xsltproc)/xsltproc$(gb_Executable_EXT_for_build),xslt)
David Tardon5b660242014-07-28 10:38:49 +02003794$(call gb_ExternalExecutable_add_dependencies,xsltproc,\
3795 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
Michael Stahl56b2bb52015-07-31 11:08:04 +02003796 $(call gb_Package_get_target,xml2) \
David Tardon5b660242014-07-28 10:38:49 +02003797 $(call gb_Package_get_target,xslt) \
3798)
David Tardonc2eca352012-12-02 10:51:37 +01003799
3800endef
3801
3802endif # SYSTEM_LIBXSLT_FOR_BUILD
3803
David Tardonce038cf2013-10-20 20:43:46 +02003804ifneq (,$(SYSTEM_UCPP))
3805
3806gb_ExternalExecutable__register_ucpp :=
3807
3808else # ! SYSTEM_UCPP
3809
3810define gb_ExternalExecutable__register_ucpp
David Tardon489d2ea2013-10-21 08:17:32 +02003811$(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
David Tardonce038cf2013-10-20 20:43:46 +02003812
3813endef
3814
3815endif # SYSTEM_UCPP
3816
Matúš Kukane4826722013-03-05 22:03:38 +01003817ifeq (,$(PYTHON_FOR_BUILD))
David Tardonc2eca352012-12-02 10:51:37 +01003818
3819define gb_ExternalExecutable__register_python
Christian Lohmaier04032bd2013-03-19 17:27:01 +01003820ifeq ($(OS),MACOSX)
3821
3822# use set_external, to avoid having the command added as prerequisite for the
3823# targets that make use of it. (Otherwise make will choke as it doesn't have a
3824# matching rule to build that specific file)
3825$(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))
3826# the Zip ensures that internal python has been built (cannot use the Package
3827# target, as that is not used on Mac)
David Tardon45a5c262013-05-16 13:36:24 +02003828$(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
Christian Lohmaier04032bd2013-03-19 17:27:01 +01003829
3830else
3831
Tor Lillqvist4c63fd102013-09-22 19:59:37 +03003832$(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 +01003833$(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
Christian Lohmaier04032bd2013-03-19 17:27:01 +01003834$(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
3835
3836endif
David Tardonc2eca352012-12-02 10:51:37 +01003837
3838endef
3839
Matúš Kukane4826722013-03-05 22:03:38 +01003840else
3841
3842define gb_ExternalExecutable__register_python
3843$(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
3844
3845endef
3846
3847endif # PYTHON_FOR_BUILD
David Tardonc2eca352012-12-02 10:51:37 +01003848
David Tardon63069262012-12-29 12:56:24 +01003849ifneq ($(SYSTEM_GENBRK),)
3850
3851define gb_ExternalExecutable__register_genbrk
3852$(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
3853
3854endef
3855
3856else # ! SYSTEM_GENBRK
3857
3858define gb_ExternalExecutable__register_genbrk
David Tardondbac8f52014-04-18 18:34:40 +02003859$(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 +01003860$(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
David Tardon63069262012-12-29 12:56:24 +01003861$(call gb_ExternalExecutable_add_dependencies,genbrk,\
3862 $(call gb_Package_get_target_for_build,icu) \
3863)
3864
3865endef
3866
3867endif
3868
3869ifneq ($(SYSTEM_GENCCODE),)
3870
3871define gb_ExternalExecutable__register_genccode
3872$(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
3873
3874endef
3875
3876else # ! SYSTEM_GENCCODE
3877
3878define gb_ExternalExecutable__register_genccode
David Tardondbac8f52014-04-18 18:34:40 +02003879$(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 +01003880$(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
David Tardon63069262012-12-29 12:56:24 +01003881$(call gb_ExternalExecutable_add_dependencies,genccode,\
3882 $(call gb_Package_get_target_for_build,icu) \
3883)
3884
3885endef
3886
3887endif
3888
3889ifneq ($(SYSTEM_GENCMN),)
3890
3891define gb_ExternalExecutable__register_gencmn
3892$(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
3893
3894endef
3895
3896else # ! SYSTEM_GENCMN
3897
3898define gb_ExternalExecutable__register_gencmn
David Tardondbac8f52014-04-18 18:34:40 +02003899$(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 +01003900$(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
David Tardon63069262012-12-29 12:56:24 +01003901$(call gb_ExternalExecutable_add_dependencies,gencmn,\
3902 $(call gb_Package_get_target_for_build,icu) \
3903)
3904
3905endef
3906
3907endif
3908
Jacobo Aragunde Péreze6fe5082015-02-02 19:49:37 +00003909ifeq (OWNCLOUD_ANDROID_LIB,$(filter OWNCLOUD_ANDROID_LIB,$(BUILD_TYPE)))
3910
3911$(eval $(call gb_Helper_register_jars,OXT,\
3912 owncloud-android-library \
3913))
3914
3915define gb_Jar__use_owncloud_android_lib
3916$(call gb_Jar_use_external_project,$(1),owncloud-android-lib)
3917$(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,owncloud-android-lib)/bin/owncloud-android-library.jar)
3918endef
3919define gb_ExternalProject__use_owncloud_android_lib
3920$(call gb_ExternalProject_use_external_project,$(1),owncloud_android_lib)
3921endef
3922
3923endif
3924
Nathan Yee7eb863d2015-07-03 11:58:27 +02003925ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
3926ifneq ($(SYSTEM_BZIP2),)
3927
3928define gb_LinkTarget__use_bzip2
3929$(call gb_LinkTarget_set_include,$(1),\
3930 $(BZIP2_CFLAGS) \
3931 $$(INCLUDE) \
3932)
3933$(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
3934
3935endef
Jan Holesovsky025952f2015-07-03 13:46:38 +02003936
Nathan Yee7eb863d2015-07-03 11:58:27 +02003937gb_ExternalProject__use_bzip2 :=
3938
3939else # !SYSTEM_BZIP2
3940
3941define gb_LinkTarget__use_bzip2
Nathan Yee7eb863d2015-07-03 11:58:27 +02003942$(call gb_LinkTarget_set_include,$(1),\
3943 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
3944 $$(INCLUDE) \
3945)
Nathan Yeeb59955b2015-07-14 14:36:37 -07003946
3947ifeq ($(COM),MSC)
3948$(call gb_LinkTarget_add_libs,$(1),\
3949 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
3950)
3951else
Jan Holesovsky025952f2015-07-03 13:46:38 +02003952$(call gb_LinkTarget_add_libs,$(1),\
3953 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
3954)
Nathan Yeeb59955b2015-07-14 14:36:37 -07003955endif
3956
Jan Holesovskyec477172015-07-07 09:24:45 +02003957$(call gb_LinkTarget_use_external_project,$(1),bzip2)
Nathan Yee7eb863d2015-07-03 11:58:27 +02003958endef
3959
3960define gb_ExternalProject__use_bzip2
3961$(call gb_ExternalProject_use_external_project,$(1),bzip2)
3962endef
3963
3964endif
3965endif
3966
Stephan Bergmannec53ac62016-04-12 20:06:04 +02003967define gb_LinkTarget__use_clew
3968$(call gb_LinkTarget_set_include,$(1), \
3969 -I$(SRCDIR)/external/clew/source/include \
3970 $$(INCLUDE) \
3971)
3972$(call gb_LinkTarget_use_libraries,$(1),clew)
3973endef
3974
Michael Stahlc74af0d2011-04-01 20:49:35 +00003975# vim: set noet sw=4 ts=4: