blob: 109b924e4e115e30faf1734f10448f43bd0a7019 [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
Tor Lillqvist65b27f82014-04-08 13:36:30 +0300186ifneq ($(SYSTEM_GLEW),)
David Tardon864f7752014-02-09 21:19:07 +0100187
188define gb_LinkTarget__use_glew
189$(call gb_LinkTarget_set_include,$(1),\
190 $$(INCLUDE) \
191 $(GLEW_CFLAGS) \
192)
193$(call gb_LinkTarget_add_libs,$(1),$(GLEW_LIBS))
194
195endef
196
Zolnai Tamás6403f2b2014-06-25 15:19:41 +0200197gb_ExternalProject__use_glew :=
198
Michael Stahle3abec32014-02-11 15:57:18 +0100199else # !SYSTEM_GLEW
David Tardon864f7752014-02-09 21:19:07 +0100200
Michael Stahl0c94f232014-03-18 17:17:04 +0100201$(eval $(call gb_Helper_register_packages_for_install,ooo,\
202 glew \
203))
204
David Tardon864f7752014-02-09 21:19:07 +0100205define gb_LinkTarget__use_glew
Matúš Kukan532e8cc2014-04-08 10:30:47 +0200206$(call gb_LinkTarget_use_package,$(1),glew)
David Tardon864f7752014-02-09 21:19:07 +0100207$(call gb_LinkTarget_set_include,$(1),\
208 -I$(call gb_UnpackedTarball_get_dir,glew/include) \
Stephan Bergmannfa50ede2015-03-02 20:22:42 +0100209 -DGLEW_NO_GLU \
David Tardon864f7752014-02-09 21:19:07 +0100210 $$(INCLUDE) \
211)
212
213ifeq ($(COM),MSC)
214$(call gb_LinkTarget_add_libs,$(1),\
David Ostrovsky152e2a22014-11-30 18:26:01 +0100215 $(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 +0100216)
217else
218$(call gb_LinkTarget_add_libs,$(1),\
219 -L$(call gb_UnpackedTarball_get_dir,glew)/lib/ -lGLEW \
220)
221endif
222
223endef
224
Zolnai Tamás6403f2b2014-06-25 15:19:41 +0200225define gb_ExternalProject__use_glew
226$(call gb_ExternalProject_use_external_project,$(1),glew)
227
228endef
229
Michael Stahle3abec32014-02-11 15:57:18 +0100230endif # SYSTEM_GLEW
David Tardon864f7752014-02-09 21:19:07 +0100231
Tor Lillqvist40900fb2013-01-03 12:48:14 +0200232define gb_LinkTarget__use_iconv
233$(call gb_LinkTarget_add_libs,$(1),-liconv)
234
235endef
236
Michael Stahl379f9782014-02-11 16:49:19 +0100237ifneq ($(SYSTEM_MARIADB),)
Peter Foleyc322d502013-01-23 16:29:08 -0500238
David Tardon217eae42013-11-05 06:49:33 +0100239define gb_LinkTarget__use_mariadb
240$(call gb_LinkTarget_set_include,$(1),\
241 $$(INCLUDE) \
242 $(MARIADB_CFLAGS) \
243)
244$(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS))
245
246endef
247gb_ExternalProject__use_mariadb :=
248
249else # !SYSTEM_MARIADB
250
251define gb_LinkTarget__use_mariadb
252$(call gb_LinkTarget_set_include,$(1),\
253 $$(INCLUDE) \
254 $(MARIADB_CFLAGS) \
255)
256$(call gb_LinkTarget_use_static_libraries,$(1),\
257 mariadblib \
258)
259
260endef
261define gb_ExternalProject__use_mariadb
262$(call gb_ExternalProject_use_static_libraries,$(1),mariadblib)
263
264endef
265
266endif # SYSTEM_MARIADB
267
268
Michael Stahl379f9782014-02-11 16:49:19 +0100269ifneq ($(SYSTEM_MARIADB),)
David Tardon217eae42013-11-05 06:49:33 +0100270
Peter Foleyc322d502013-01-23 16:29:08 -0500271define gb_LinkTarget__use_mysql
272
273$(call gb_LinkTarget_add_defs,$(1),\
Fridrich Štrba1bf43062013-03-06 11:45:50 +0100274 -DSYSTEM_MARIADB \
Peter Foleyc322d502013-01-23 16:29:08 -0500275)
276
277$(call gb_LinkTarget_add_libs,$(1),\
Fridrich Štrbacad422a2013-03-06 16:33:07 +0100278 $(MARIADB_LIBS) \
Peter Foleyc322d502013-01-23 16:29:08 -0500279)
280
281$(call gb_LinkTarget_set_include,$(1),\
Fridrich Štrbacad422a2013-03-06 16:33:07 +0100282 $(MARIADB_CFLAGS) \
Peter Foleyc322d502013-01-23 16:29:08 -0500283 $$(INCLUDE) \
284)
285endef
286
287else
288
289define gb_LinkTarget__use_mysql
290
291$(call gb_LinkTarget_set_include,$(1),\
Peter Foleyc322d502013-01-23 16:29:08 -0500292 $$(INCLUDE) \
293)
294
295endef
296
297endif
298
Michael Stahl0443d0a2014-02-11 16:57:35 +0100299ifneq ($(SYSTEM_MYSQL_CPPCONN),)
Peter Foleyc322d502013-01-23 16:29:08 -0500300
301define gb_LinkTarget__use_mysqlcppconn
302$(call gb_LinkTarget_add_libs,$(1),\
303 -lmysqlcppconn \
304)
305
306$(call gb_LinkTarget_add_defs,$(1),\
Peter Foleyb02d7992013-01-24 15:43:52 -0500307 -DSYSTEM_MYSQL_CPPCONN \
Peter Foleyc322d502013-01-23 16:29:08 -0500308)
309endef
310
311else
312
Stephan Bergmann5afa25c2015-06-12 16:26:25 +0200313$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OXT,\
Peter Foleyc322d502013-01-23 16:29:08 -0500314 mysqlcppconn \
315))
316
Michael Stahl5f356bd2013-01-28 23:53:30 +0100317# note: this does not link mysqlcppconn, it is loaded via osl_loadModuleRelative
Peter Foleyc322d502013-01-23 16:29:08 -0500318define gb_LinkTarget__use_mysqlcppconn
319
Michael Stahl5f356bd2013-01-28 23:53:30 +0100320$(call gb_LinkTarget_use_unpacked,$(1),mysqlcppconn)
321
Peter Foleyb02d7992013-01-24 15:43:52 -0500322$(call gb_LinkTarget_add_defs,$(1),\
323 -DCPPCONN_LIB_BUILD \
324)
325
Peter Foleyc322d502013-01-23 16:29:08 -0500326$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200327 -I$(call gb_UnpackedTarball_get_dir,mysqlcppconn) \
328 -I$(call gb_UnpackedTarball_get_dir,mysqlcppconn)/cppconn \
Peter Foleyc322d502013-01-23 16:29:08 -0500329 $$(INCLUDE) \
330)
331
332endef
333
334endif
335
Michael Stahl04ff5352014-02-11 16:21:04 +0100336ifneq ($(SYSTEM_ZLIB),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000337
338define gb_LinkTarget__use_zlib
Michael Stahla88ef232011-04-13 16:11:41 +0000339$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000340 -DSYSTEM_ZLIB \
341)
342$(call gb_LinkTarget_add_libs,$(1),-lz)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100343
Michael Stahlc74af0d2011-04-01 20:49:35 +0000344endef
345
David Tardoncb276232012-10-26 15:33:26 +0200346# nothing on system
347define gb_LinkTarget__use_zlib_x64
348
349endef
350
Fridrich Štrba2f4d1602013-03-14 12:45:24 +0100351gb_ExternalProject__use_zlib :=
352
Michael Stahlc74af0d2011-04-01 20:49:35 +0000353else # !SYSTEM_ZLIB
354
David Tardoncb276232012-10-26 15:33:26 +0200355define gb_LinkTarget__use_zlib_multiarch
356$(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
357
Matúš Kukanf5ff45b2012-09-08 16:29:05 +0200358$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl3c38b772013-05-08 15:47:24 +0200359 $(ZLIB_CFLAGS) \
Matúš Kukanf5ff45b2012-09-08 16:29:05 +0200360 $$(INCLUDE) \
361)
David Tardoncb276232012-10-26 15:33:26 +0200362
Michael Stahlc923f7d2012-04-07 23:22:08 +0200363$(call gb_LinkTarget_use_static_libraries,$(1),\
David Tardoncb276232012-10-26 15:33:26 +0200364 $(2) \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000365)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100366
Michael Stahlc74af0d2011-04-01 20:49:35 +0000367endef
368
David Tardoncb276232012-10-26 15:33:26 +0200369define gb_LinkTarget__use_zlib
370$(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
371
372endef
373
374define gb_LinkTarget__use_zlib_x64
375$(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
376
377endef
378
Fridrich Štrba2f4d1602013-03-14 12:45:24 +0100379define gb_ExternalProject__use_zlib
Fridrich Štrba2f4d1602013-03-14 12:45:24 +0100380$(call gb_ExternalProject_use_static_libraries,$(1),zlib)
381
382endef
383
Michael Stahlc74af0d2011-04-01 20:49:35 +0000384endif # SYSTEM_ZLIB
385
386
Michael Stahl46648152014-02-11 16:33:18 +0100387ifneq ($(SYSTEM_JPEG),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000388
389define gb_LinkTarget__use_jpeg
Michael Stahleea709f2016-11-02 14:13:54 +0100390$(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
Michael Stahlc74af0d2011-04-01 20:49:35 +0000391$(call gb_LinkTarget_set_ldflags,$(1),\
Michael Stahl73d2fe92011-04-13 16:11:39 +0000392 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000393)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100394
Michael Stahlc74af0d2011-04-01 20:49:35 +0000395endef
396
Michael Stahleea709f2016-11-02 14:13:54 +0100397gb_ExternalProject__use_jpeg :=
398
Stephan Bergmann2d6ee4e2014-12-03 08:26:17 +0100399else ifneq ($(filter JPEG_TURBO,$(BUILD_TYPE)),)
Matúš Kukan71fae5d2014-11-17 09:16:34 +0100400
401define gb_LinkTarget__use_jpeg
402$(call gb_LinkTarget_set_include,$(1),\
Michael Stahleea709f2016-11-02 14:13:54 +0100403 $(LIBJPEG_CFLAGS) \
Matúš Kukan71fae5d2014-11-17 09:16:34 +0100404 $$(INCLUDE) \
405)
Michael Stahleea709f2016-11-02 14:13:54 +0100406$(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
Stephan Bergmann8d34d362016-02-18 12:51:41 +0100407$(call gb_LinkTarget_use_external_project,$(1),jpeg-turbo,full)
Matúš Kukan71fae5d2014-11-17 09:16:34 +0100408
409endef
410
Michael Stahleea709f2016-11-02 14:13:54 +0100411define gb_ExternalProject__use_jpeg
412$(call gb_ExternalProject_use_external_project,$(1),jpeg-turbo)
413
414endef
415
Michael Stahlc74af0d2011-04-01 20:49:35 +0000416else # !SYSTEM_JPEG
417
Michael Stahlc74af0d2011-04-01 20:49:35 +0000418define gb_LinkTarget__use_jpeg
Matúš Kukane8a28be2012-01-21 00:46:29 +0100419$(call gb_LinkTarget_set_include,$(1),\
Michael Stahleea709f2016-11-02 14:13:54 +0100420 $(LIBJPEG_CFLAGS) \
Matúš Kukane8a28be2012-01-21 00:46:29 +0100421 $$(INCLUDE) \
Matúš Kukane8a28be2012-01-21 00:46:29 +0100422)
423
Michael Stahlc923f7d2012-04-07 23:22:08 +0200424$(call gb_LinkTarget_use_static_libraries,$(1),\
David Tardon4ed91fd2012-10-12 09:32:02 +0200425 jpeg \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000426)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100427
Michael Stahl8d1c80e2016-11-03 13:23:45 +0100428endef
429
Michael Stahleea709f2016-11-02 14:13:54 +0100430define gb_ExternalProject__use_jpeg
431$(call gb_ExternalProject_use_static_libraries,$(1),jpeg)
432
433endef
434
Michael Stahlc74af0d2011-04-01 20:49:35 +0000435endif # SYSTEM_JPEG
436
Michael Stahlab586f12014-02-11 19:25:30 +0100437ifneq ($(SYSTEM_MYTHES),)
Peter Foley1d1bab42012-10-28 12:00:06 -0400438
439define gb_LinkTarget__use_mythes
Rene Engelhard99ef1f52012-10-28 23:00:03 +0100440$(call gb_LinkTarget_set_include,$(1),\
441 $$(INCLUDE) \
442 $(MYTHES_CFLAGS) \
443)
444$(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
445
Peter Foley1d1bab42012-10-28 12:00:06 -0400446endef
447
448else # !SYSTEM_MYTHES
449
Peter Foley1d1bab42012-10-28 12:00:06 -0400450define gb_LinkTarget__use_mythes
Michael Stahl90ad80e32013-05-07 23:59:00 +0200451$(call gb_LinkTarget_set_include,$(1),\
452 -I$(call gb_UnpackedTarball_get_dir,mythes) \
453 $$(INCLUDE) \
454)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200455
456ifeq ($(COM),MSC)
Matúš Kukan327db9f2012-10-28 22:40:30 +0100457$(call gb_LinkTarget_use_static_libraries,$(1),\
458 mythes \
Peter Foley1d1bab42012-10-28 12:00:06 -0400459)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200460else
461$(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
462$(call gb_LinkTarget_use_external_project,$(1),mythes)
463endif
Matúš Kukan327db9f2012-10-28 22:40:30 +0100464
Peter Foley1d1bab42012-10-28 12:00:06 -0400465endef
466
467endif # SYSTEM_MYTHES
468
Michael Stahlc74af0d2011-04-01 20:49:35 +0000469
Michael Stahl46648152014-02-11 16:33:18 +0100470ifneq ($(SYSTEM_EXPAT),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000471
David Tardon51149802013-04-09 09:22:20 +0200472define gb_LinkTarget__use_expat_impl
473$(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
Michael Stahlc74af0d2011-04-01 20:49:35 +0000474
Michael Stahla88ef232011-04-13 16:11:41 +0000475$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000476 -DSYSTEM_EXPAT \
477)
478
479$(call gb_LinkTarget_add_libs,$(1),-lexpat)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100480
Michael Stahlc74af0d2011-04-01 20:49:35 +0000481endef
482
Michael Stahl77289672012-11-17 00:36:29 +0100483gb_ExternalProject__use_expat :=
484
Michael Stahlc74af0d2011-04-01 20:49:35 +0000485else # !SYSTEM_EXPAT
486
David Tardon51149802013-04-09 09:22:20 +0200487define gb_LinkTarget__use_expat_impl
488$(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
Michael Stahlc74af0d2011-04-01 20:49:35 +0000489
David Ostrovsky2ffde7b2012-10-12 12:28:11 -0700490$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl5e037bb2013-05-07 21:47:18 +0200491 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
David Ostrovsky2ffde7b2012-10-12 12:28:11 -0700492 $$(INCLUDE) \
493)
494
Michael Stahlc923f7d2012-04-07 23:22:08 +0200495$(call gb_LinkTarget_use_static_libraries,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000496 $(2) \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000497)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100498
Michael Stahlc74af0d2011-04-01 20:49:35 +0000499endef
500
Michael Stahl77289672012-11-17 00:36:29 +0100501define gb_ExternalProject__use_expat
Michael Stahl77289672012-11-17 00:36:29 +0100502$(call gb_ExternalProject_use_static_libraries,$(1),expat)
503
504endef
505
Michael Stahlc74af0d2011-04-01 20:49:35 +0000506endif # SYSTEM_EXPAT
507
David Tardon51149802013-04-09 09:22:20 +0200508define gb_LinkTarget__use_expat
509$(call gb_LinkTarget__use_expat_impl,$(1),expat)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100510
Michael Stahlc74af0d2011-04-01 20:49:35 +0000511endef
512
David Tardon51149802013-04-09 09:22:20 +0200513define gb_LinkTarget__use_expat_x64
514$(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100515
Michael Stahlc74af0d2011-04-01 20:49:35 +0000516endef
517
Michael Stahl9fc9e9c2014-02-11 19:21:36 +0100518ifneq ($(SYSTEM_HYPH),)
Peter Foleydd584cb2012-11-03 13:54:46 -0400519
520define gb_LinkTarget__use_hyphen
521$(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
522
523endef
524
525else # !SYSTEM_HYPH
526
Peter Foleydd584cb2012-11-03 13:54:46 -0400527define gb_LinkTarget__use_hyphen
528$(call gb_LinkTarget_use_unpacked,$(1),hyphen)
529$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200530 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
Peter Foleydd584cb2012-11-03 13:54:46 -0400531 $$(INCLUDE) \
532)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200533
534ifeq ($(COM),MSC)
Peter Foleydd584cb2012-11-03 13:54:46 -0400535$(call gb_LinkTarget_use_static_libraries,$(1),\
536 hyphen \
537)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200538else
539$(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
540$(call gb_LinkTarget_use_external_project,$(1),hyphen)
541endif
Peter Foleydd584cb2012-11-03 13:54:46 -0400542
543endef
544
545endif # SYSTEM_HYPH
546
Michael Stahl9fc9e9c2014-02-11 19:21:36 +0100547ifneq ($(SYSTEM_HUNSPELL),)
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100548
549define gb_LinkTarget__use_hunspell
550$(call gb_LinkTarget_set_include,$(1),\
551 $$(INCLUDE) \
552 $(HUNSPELL_CFLAGS) \
553)
554$(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
555
556endef
557
Michael Stahl2f6261f2013-09-19 19:28:36 +0200558gb_ExternalProject__use_hunspell :=
559
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100560else # !SYSTEM_HUNSPELL
561
562define gb_LinkTarget__use_hunspell
563$(call gb_LinkTarget_add_defs,$(1),\
564 -DHUNSPELL_STATIC \
565)
Matúš Kukan7a030392012-10-29 23:29:37 +0100566$(call gb_LinkTarget_use_unpacked,$(1),hunspell)
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100567$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200568 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
Matúš Kukan7a030392012-10-29 23:29:37 +0100569 $$(INCLUDE) \
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100570)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200571
572ifeq ($(COM),MSC)
Michael Stahlc923f7d2012-04-07 23:22:08 +0200573$(call gb_LinkTarget_use_static_libraries,$(1),\
Matúš Kukan327db9f2012-10-28 22:40:30 +0100574 hunspell \
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100575)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200576else
577$(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
578$(call gb_LinkTarget_use_external_project,$(1),hunspell)
579endif
580
581endef
582
583define gb_ExternalProject__use_hunspell
584$(call gb_ExternalProject_use_external_project,$(1),hunspell)
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100585
586endef
587
588endif # SYSTEM_HUNSPELL
589
590
Michael Stahladddbbc2014-02-11 18:40:09 +0100591ifneq ($(SYSTEM_BOOST),)
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200592
David Tardon57c439a2016-03-08 06:06:36 +0100593define gb_LinkTarget__use_boost_lib
David Tardon0f6919c2012-06-06 17:04:01 +0200594$(call gb_LinkTarget_set_include,$(1),\
595 $$(INCLUDE) \
596 $(BOOST_CPPFLAGS) \
597)
598
599$(call gb_LinkTarget_add_ldflags,$(1),\
600 $(BOOST_LDFLAGS) \
601)
602
David Tardon57c439a2016-03-08 06:06:36 +0100603$(call gb_LinkTarget_add_libs,$(1),$(2))
604
605endef
606
David Tardon23d2e0e2016-03-08 08:35:59 +0100607define gb_LinkTarget__use_boost_date_time
David Tardon57c439a2016-03-08 06:06:36 +0100608$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
David Tardon0f6919c2012-06-06 17:04:01 +0200609
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200610endef
611
David Tardonb4339fa2016-03-08 06:08:36 +0100612define gb_LinkTarget__use_boost_filesystem
613$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_FILESYSTEM_LIB))
614
615endef
616
617gb_ExternalProject__use_boost_filesystem :=
618
Markus Mohrhard36788e92014-01-08 13:17:28 +0100619define gb_LinkTarget__use_boost_iostreams
David Tardon57c439a2016-03-08 06:06:36 +0100620$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
Markus Mohrhard36788e92014-01-08 13:17:28 +0100621
622endef
623
David Tardon6d9de6b2014-03-03 20:39:13 +0100624gb_ExternalProject__use_boost_iostreams :=
625
Markus Mohrhard36788e92014-01-08 13:17:28 +0100626define gb_LinkTarget__use_boost_system
David Tardon57c439a2016-03-08 06:06:36 +0100627$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB))
Tor Lillqvist503b2482013-05-22 19:50:22 +0300628
629endef
630
Markus Mohrhard36788e92014-01-08 13:17:28 +0100631gb_ExternalProject__use_boost_system :=
Tor Lillqvist503b2482013-05-22 19:50:22 +0300632
Stephan Bergmann93208022013-02-16 22:56:19 +0100633define gb_LinkTarget__use_boost_headers
634$(call gb_LinkTarget_set_include,$(1),\
635 $$(INCLUDE) \
636 $(BOOST_CPPFLAGS) \
637)
638
639endef
640
Peter Foleycdb6eca2012-11-10 08:56:12 -0500641gb_ExternalProject__use_boost_headers:=
642
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200643else # !SYSTEM_BOOST
644
David Tardon57c439a2016-03-08 06:06:36 +0100645define gb_LinkTarget__use_boost_lib
Michael Stahl7f2e1682012-09-06 20:22:11 +0200646$(call gb_LinkTarget_add_defs,$(1),\
647 -DBOOST_ALL_NO_LIB \
648)
649
David Tardon57c439a2016-03-08 06:06:36 +0100650$(call gb_LinkTarget_use_static_libraries,$(1),$(2))
651
652endef
653
David Tardon23d2e0e2016-03-08 08:35:59 +0100654define gb_LinkTarget__use_boost_date_time
655$(call gb_LinkTarget__use_boost_lib,$(1),boost_date_time)
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200656
657endef
658
David Tardond72a33c2016-03-08 05:57:40 +0100659define gb_LinkTarget__use_boost_filesystem
David Tardon57c439a2016-03-08 06:06:36 +0100660$(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem)
David Tardond72a33c2016-03-08 05:57:40 +0100661
662endef
663
664define gb_ExternalProject__use_boost_filesystem
665$(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
666endef
667
Markus Mohrhard36788e92014-01-08 13:17:28 +0100668define gb_LinkTarget__use_boost_iostreams
David Tardon57c439a2016-03-08 06:06:36 +0100669$(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams)
Tor Lillqvist503b2482013-05-22 19:50:22 +0300670
671endef
672
Markus Mohrhard36788e92014-01-08 13:17:28 +0100673define gb_ExternalProject__use_boost_iostreams
674$(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
675endef
676
677define gb_LinkTarget__use_boost_system
David Tardon57c439a2016-03-08 06:06:36 +0100678$(call gb_LinkTarget__use_boost_lib,$(1),boost_system)
Markus Mohrhard36788e92014-01-08 13:17:28 +0100679
680endef
681
682define gb_ExternalProject__use_boost_system
683$(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
Tor Lillqvist503b2482013-05-22 19:50:22 +0300684endef
685
Peter Foleye1f742a2012-11-12 18:37:10 -0500686define gb_LinkTarget__use_boost_headers
Christian Lohmaier1654a1e72012-11-14 18:11:30 +0100687$(call gb_LinkTarget_use_unpacked,$(1),boost)
Michael Stahla53586f2013-01-26 21:19:13 +0100688$(call gb_LinkTarget_set_include,$(1),\
Stephan Bergmannf51656c2016-05-31 13:32:15 +0200689 $(BOOST_CPPFLAGS) \
Michael Stahla53586f2013-01-26 21:19:13 +0100690 $$(INCLUDE) \
691)
Peter Foleye1f742a2012-11-12 18:37:10 -0500692
693endef
694
Peter Foleycdb6eca2012-11-10 08:56:12 -0500695define gb_ExternalProject__use_boost_headers
David Tardon682e3592015-06-24 15:11:40 +0200696$(call gb_ExternalProject_use_unpacked,$(1),boost)
Peter Foleycdb6eca2012-11-10 08:56:12 -0500697
698endef
David Tardond72a33c2016-03-08 05:57:40 +0100699
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200700endif # SYSTEM_BOOST
701
702
Michael Stahle3abec32014-02-11 15:57:18 +0100703ifneq ($(SYSTEM_CMIS),)
Matúš Kukan464b4332012-01-15 02:12:49 +0100704
705define gb_LinkTarget__use_cmis
706$(call gb_LinkTarget_set_include,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +0100707 $$(INCLUDE) \
Matúš Kukan707194e2012-09-06 18:19:34 +0200708 $(CMIS_CFLAGS) \
Matúš Kukan464b4332012-01-15 02:12:49 +0100709)
Matúš Kukan707194e2012-09-06 18:19:34 +0200710$(call gb_LinkTarget_add_libs,$(1),$(CMIS_LIBS))
Matúš Kukan464b4332012-01-15 02:12:49 +0100711
712endef
713
Bjoern Michaelsen88ed6d12013-02-19 11:10:16 +0100714else # !SYSTEM_CMIS
Matúš Kukan464b4332012-01-15 02:12:49 +0100715
Matúš Kukan464b4332012-01-15 02:12:49 +0100716define gb_LinkTarget__use_cmis
Michael Stahl759d02b2013-05-08 00:55:21 +0200717$(call gb_LinkTarget_set_include,$(1),\
718 -I$(call gb_UnpackedTarball_get_dir,cmis)/src \
719 $$(INCLUDE) \
720)
Michael Stahlc923f7d2012-04-07 23:22:08 +0200721$(call gb_LinkTarget_use_static_libraries,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +0100722 cmislib \
723)
724
725endef
726
Bjoern Michaelsen88ed6d12013-02-19 11:10:16 +0100727endif # SYSTEM_CMIS
Matúš Kukan464b4332012-01-15 02:12:49 +0100728
David Tardon32cd12c2014-04-26 19:46:40 +0200729ifeq ($(ENABLE_JAVA),TRUE)
David Tardon2a71e152014-04-26 16:08:07 +0200730
Peter Foleye5ccda42012-12-25 11:23:58 -0500731ifeq ($(OS)$(COM),WNTGCC)
732
733define gb_LinkTarget__use_jawt
David Tardon943dedc2014-04-26 15:50:10 +0200734$(call gb_LinkTarget_use_custom_headers,$(1),external/jawt)
735
736$(call gb_LinkTarget_add_ldflags,$(1),\
737 -L$(call gb_CustomTarget_get_workdir,external/jawt) \
738)
739
740$(call gb_LinkTarget_add_libs,$(1),\
David Tardon2a71e152014-04-26 16:08:07 +0200741 $(JAWTLIB) \
Peter Foleye5ccda42012-12-25 11:23:58 -0500742)
743
744endef
745
746else # $(OS)$(COM) != WNTGCC
747
David Tardon2a71e152014-04-26 16:08:07 +0200748define gb_LinkTarget__use_jawt
749$(call gb_LinkTarget_add_libs,$(1),\
750 $(JAWTLIB) \
751)
752
753endef
Peter Foleye5ccda42012-12-25 11:23:58 -0500754
755endif # $(OS)$(COM) = WNTGCC
756
David Tardon2a71e152014-04-26 16:08:07 +0200757else # !ENABLE_JAVA
758
759gb_LinkTarget__use_jawt :=
760
761endif # ENABLE_JAVA
Matúš Kukan464b4332012-01-15 02:12:49 +0100762
Michael Stahl23647592014-02-11 19:04:20 +0100763ifneq ($(SYSTEM_LIBATOMIC_OPS),)
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100764
765define gb_LinkTarget__use_libatomic_ops
766$(call gb_LinkTarget_set_include,$(1),\
767 $$(INCLUDE) \
768 $(LIBATOMIC_OPS_CFLAGS) \
769)
770$(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
771
772endef
773gb_ExternalProject__use_libatomic_ops :=
774
775else # !SYSTEM_LIBATOMIC_OPS
776
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100777define gb_LinkTarget__use_libatomic_ops
778$(call gb_LinkTarget_set_include,$(1),\
779$(LIBATOMIC_OPS_CFLAGS) \
780 $$(INCLUDE) \
781 $(LIBATOMIC_OPS_CFLAGS) \
782)
Michael Stahlb3085262013-10-24 12:22:58 +0200783$(call gb_LinkTarget_use_external_project,$(1),\
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100784 libatomic_ops \
785)
Andrzej J.R. Huntf479f622013-09-05 16:27:50 +0100786
Michael Stahlb3085262013-10-24 12:22:58 +0200787$(call gb_LinkTarget_add_libs,$(1),\
Andrzej J.R. Huntf479f622013-09-05 16:27:50 +0100788 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100789)
790
791endef
792
793define gb_ExternalProject__use_libatomic_ops
Michael Stahlb3085262013-10-24 12:22:58 +0200794$(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100795
796endef
797
798endif # SYSTEM_LIBATOMIC_OPS
799
800
Michael Stahle3abec32014-02-11 15:57:18 +0100801ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
Matúš Kukanbd030302011-12-03 15:06:52 +0100802
803define gb_LinkTarget__use_libexttextcat
804$(call gb_LinkTarget_set_include,$(1),\
805 $$(INCLUDE) \
806 $(LIBEXTTEXTCAT_CFLAGS) \
807)
Peter Foley31219f02012-11-09 17:25:56 -0500808$(call gb_LinkTarget_add_defs,$(1),\
809 -DSYSTEM_LIBEXTTEXTCAT \
810)
Matúš Kukanbd030302011-12-03 15:06:52 +0100811$(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
812
813endef
814
815else # !SYSTEM_LIBEXTTEXTCAT
816
Matúš Kukanbd030302011-12-03 15:06:52 +0100817define gb_LinkTarget__use_libexttextcat
Peter Foley31219f02012-11-09 17:25:56 -0500818$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200819 -I$(call gb_UnpackedTarball_get_dir,exttextcat/src) \
Peter Foley31219f02012-11-09 17:25:56 -0500820 $$(INCLUDE) \
821)
Matúš Kukanbd030302011-12-03 15:06:52 +0100822
Michael Stahl2f6261f2013-09-19 19:28:36 +0200823ifeq ($(COM),MSC)
824$(call gb_LinkTarget_use_static_libraries,$(1),\
825 exttextcat \
826)
827else
828$(call gb_LinkTarget_add_libs,$(1),\
829 $(call gb_UnpackedTarball_get_dir,exttextcat)/src/.libs/libexttextcat-2.0.a\
830)
David Tardon523a3042013-10-12 18:22:55 +0200831$(call gb_LinkTarget_use_external_project,$(1),exttextcat)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200832endif
833
834
Matúš Kukanbd030302011-12-03 15:06:52 +0100835endef
836
837endif # SYSTEM_LIBEXTTEXTCAT
838
839
Michael Stahl379f9782014-02-11 16:49:19 +0100840ifneq ($(SYSTEM_LIBXML),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000841
842define gb_LinkTarget__use_libxml2
Michael Stahla88ef232011-04-13 16:11:41 +0000843$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000844 -DSYSTEM_LIBXML \
845)
846$(call gb_LinkTarget_set_include,$(1),\
847 $$(INCLUDE) \
848 $(LIBXML_CFLAGS) \
849)
850$(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +0100851
Michael Stahlc74af0d2011-04-01 20:49:35 +0000852endef
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500853gb_ExternalProject__use_libxml2:=
Michael Stahlc74af0d2011-04-01 20:49:35 +0000854
855else # !SYSTEM_LIBXML
856
Michael Stahl64ea9942014-03-14 11:48:24 +0100857$(eval $(call gb_Helper_register_packages_for_install,ure,\
858 xml2 \
859))
860
Michael Stahlc74af0d2011-04-01 20:49:35 +0000861define gb_LinkTarget__use_libxml2
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500862$(call gb_LinkTarget_use_package,$(1),xml2)
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500863$(call gb_LinkTarget_set_include,$(1),\
864 $$(INCLUDE) \
David Tardon7515b1a2014-07-17 17:27:05 +0200865 $(LIBXML_CFLAGS) \
866)
867
868$(call gb_LinkTarget_add_libs,$(1),\
869 $(LIBXML_LIBS) \
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500870)
871
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200872ifeq ($(COM),MSC)
David Tardon7515b1a2014-07-17 17:27:05 +0200873$(call gb_LinkTarget_use_external,$(1),icu_headers)
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200874endif
875
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500876endef
877define gb_ExternalProject__use_libxml2
878$(call gb_ExternalProject_use_package,$(1),xml2)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100879
David Tardon7515b1a2014-07-17 17:27:05 +0200880ifeq ($(COM),MSC)
881$(call gb_ExternalProject_use_external_project,$(1),icu)
882endif
883
Michael Stahlc74af0d2011-04-01 20:49:35 +0000884endef
885
886endif # SYSTEM_LIBXML
887
888
Michael Stahle3abec32014-02-11 15:57:18 +0100889ifneq ($(SYSTEM_LIBXSLT),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000890
891define gb_LinkTarget__use_libxslt
892$(call gb_LinkTarget_set_include,$(1),\
893 $$(INCLUDE) \
894 $(LIBXSLT_CFLAGS) \
895)
896$(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +0100897
Michael Stahlc74af0d2011-04-01 20:49:35 +0000898endef
899
David Tardonab03e872012-08-15 07:20:13 +0200900define gb_LinkTarget__use_libexslt
901$(call gb_LinkTarget_set_include,$(1),\
902 $$(INCLUDE) \
903 $(LIBEXSLT_CFLAGS) \
904)
905
906$(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
907
908endef
909
Michael Stahlc74af0d2011-04-01 20:49:35 +0000910else # !SYSTEM_LIBXSLT
911
Michael Stahl32a617d2014-02-17 11:23:19 +0100912$(eval $(call gb_Helper_register_packages_for_install,ooo,\
913 xslt \
914))
915
Michael Stahlc74af0d2011-04-01 20:49:35 +0000916define gb_LinkTarget__use_libxslt
Peter Foley856c0752013-02-02 15:44:30 -0500917$(call gb_LinkTarget_use_package,$(1),xslt)
918$(call gb_LinkTarget_set_include,$(1),\
919 $$(INCLUDE) \
Michael Stahl70fcfee2013-04-01 12:47:16 +0200920 -I$(call gb_UnpackedTarball_get_dir,xslt) \
Peter Foley856c0752013-02-02 15:44:30 -0500921)
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200922
923ifeq ($(COM),MSC)
924$(call gb_LinkTarget_add_libs,$(1),\
925 $(call gb_UnpackedTarball_get_dir,xslt)/win32/bin.msvc/libxslt.lib \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000926)
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200927else
928$(call gb_LinkTarget_add_libs,$(1),\
929 -L$(call gb_UnpackedTarball_get_dir,xslt)/libxslt/.libs -lxslt \
930)
931endif
Caolán McNamara6bccd202011-07-25 22:10:33 +0100932
Michael Stahlc74af0d2011-04-01 20:49:35 +0000933endef
934
David Tardonab03e872012-08-15 07:20:13 +0200935define gb_LinkTarget__use_libexslt
Peter Foley856c0752013-02-02 15:44:30 -0500936$(call gb_LinkTarget_use_package,$(1),xslt)
937$(call gb_LinkTarget_set_include,$(1),\
938 $$(INCLUDE) \
Michael Stahl70fcfee2013-04-01 12:47:16 +0200939 -I$(call gb_UnpackedTarball_get_dir,xslt) \
Peter Foley856c0752013-02-02 15:44:30 -0500940)
941
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200942ifeq ($(COM),MSC)
943$(call gb_LinkTarget_add_libs,$(1),\
944 $(call gb_UnpackedTarball_get_dir,xslt)/win32/bin.msvc/libexslt.lib \
David Tardonab03e872012-08-15 07:20:13 +0200945)
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200946else
947$(call gb_LinkTarget_add_libs,$(1),\
948 -L$(call gb_UnpackedTarball_get_dir,xslt)/libexslt/.libs -lexslt \
949)
950endif
David Tardonab03e872012-08-15 07:20:13 +0200951
952endef
953
Michael Stahlc74af0d2011-04-01 20:49:35 +0000954endif # SYSTEM_LIBXSLT
955
Norbert Thiebaud587d9692013-08-29 10:38:00 -0500956ifeq ($(ENABLE_LIBLANGTAG),TRUE)
Jan Holesovsky6a7b32b02012-08-10 10:27:54 +0200957
Michael Stahl49dde4c2014-02-11 19:42:28 +0100958ifneq ($(SYSTEM_LIBLANGTAG),)
Eike Rathkea774a482012-08-06 19:22:43 +0200959
960define gb_LinkTarget__use_liblangtag
961$(call gb_LinkTarget_set_include,$(1),\
962 $$(INCLUDE) \
963 $(LIBLANGTAG_CFLAGS) \
964)
965
966$(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
967
968endef
969
David Tardonc2a119b2016-01-13 14:24:31 +0100970gb_ExternalProject__use_liblangtag :=
971
Eike Rathkea774a482012-08-06 19:22:43 +0200972else # !SYSTEM_LIBLANGTAG
973
Stephan Bergmann475e4b42016-10-25 16:46:35 +0200974$(eval $(call gb_Helper_register_packages_for_install,ure,\
Michael Stahl01adcd82014-03-18 17:38:06 +0100975 liblangtag_data \
976))
977
David Tardon7d93bb82016-01-13 15:45:17 +0100978ifeq ($(COM),MSC)
979
Eike Rathkea774a482012-08-06 19:22:43 +0200980define gb_LinkTarget__use_liblangtag
Peter Foley782151a2012-11-11 16:02:36 -0500981$(call gb_LinkTarget_set_include,$(1),\
David Tardon34513502016-01-13 14:21:10 +0100982 $(LIBLANGTAG_CFLAGS) \
Peter Foley782151a2012-11-11 16:02:36 -0500983 $$(INCLUDE) \
984)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200985$(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
986$(call gb_LinkTarget_use_external_project,$(1),langtag)
Eike Rathkea774a482012-08-06 19:22:43 +0200987
988endef
989
David Tardon7d93bb82016-01-13 15:45:17 +0100990else
991
Stephan Bergmann475e4b42016-10-25 16:46:35 +0200992$(eval $(call gb_Helper_register_packages_for_install,ure,\
David Tardon7d93bb82016-01-13 15:45:17 +0100993 liblangtag \
994))
995
996define gb_LinkTarget__use_liblangtag
997$(call gb_LinkTarget_set_include,$(1),\
998 $(LIBLANGTAG_CFLAGS) \
999 $$(INCLUDE) \
1000)
1001$(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1002$(call gb_LinkTarget_use_package,$(1),liblangtag)
1003
1004endef
1005
1006endif # MSC
1007
David Tardonc2a119b2016-01-13 14:24:31 +01001008define gb_ExternalProject__use_liblangtag
1009$(call gb_ExternalProject_use_external_project,$(1),langtag)
1010
1011endef
1012
Eike Rathkea774a482012-08-06 19:22:43 +02001013endif # SYSTEM_LIBLANGTAG
1014
Matúš Kukan51ba7db2013-05-02 12:19:35 +02001015else
1016
1017gb_LinkTarget__use_liblangtag :=
David Tardonc2a119b2016-01-13 14:24:31 +01001018gb_ExternalProject__use_liblangtag :=
Matúš Kukan51ba7db2013-05-02 12:19:35 +02001019
Jan Holesovsky6a7b32b02012-08-10 10:27:54 +02001020endif # ENABLE_LIBLANGTAG
1021
Matúš Kukandcae0502014-02-25 21:47:33 +01001022gb_ExternalProject__use_apr :=
1023
1024ifeq ($(WITH_WEBDAV),serf)
Matúš Kukan0b272532014-02-06 12:28:36 +01001025
1026define gb_LinkTarget__use_apr
1027$(call gb_LinkTarget_set_include,$(1),\
1028 $$(INCLUDE) \
1029 $(APR_CFLAGS) \
1030)
1031$(call gb_LinkTarget_add_libs,$(1),\
1032 $(APR_LIBS) \
Michael Stahl5cf22052014-06-05 13:35:14 +02001033 $(if $(filter $(OS),LINUX),-lpthread) \
1034 $(if $(filter $(OS),MACOSX),-liconv) \
Matúš Kukan0b272532014-02-06 12:28:36 +01001035)
1036
1037ifeq ($(SYSTEM_APR),)
1038$(call gb_LinkTarget_use_system_win32_libs,$(1),\
1039 mswsock \
1040 rpcrt4 \
1041 shell32 \
1042)
1043$(call gb_LinkTarget_add_defs,$(1),\
1044 -DAPR_DECLARE_STATIC \
1045 -DAPU_DECLARE_STATIC \
1046)
1047$(call gb_LinkTarget_use_external_project,$(1),apr_util)
1048endif
1049
1050endef
1051
1052define gb_ExternalProject__use_apr
1053ifeq ($(SYSTEM_APR),)
1054$(call gb_ExternalProject_use_external_project,$(1),apr_util)
1055endif
1056
1057endef
1058
1059define gb_LinkTarget__use_serf
1060$(call gb_LinkTarget_set_include,$(1),\
1061 $(SERF_CFLAGS) \
1062 $$(INCLUDE) \
1063)
1064$(call gb_LinkTarget_add_libs,$(1),\
1065 $(SERF_LIBS) \
1066)
1067
1068ifeq ($(SYSTEM_SERF),)
1069$(call gb_LinkTarget_use_external_project,$(1),serf)
1070endif
1071
1072endef
1073
Matúš Kukandcae0502014-02-25 21:47:33 +01001074else ifeq ($(WITH_WEBDAV),neon)
Eike Rathkea774a482012-08-06 19:22:43 +02001075
Michael Stahle3abec32014-02-11 15:57:18 +01001076ifneq ($(SYSTEM_NEON),)
Matúš Kukan464b4332012-01-15 02:12:49 +01001077
1078define gb_LinkTarget__use_neon
Matúš Kukan464b4332012-01-15 02:12:49 +01001079$(call gb_LinkTarget_add_defs,$(1),\
1080 -DNEON_VERSION=0x$(NEON_VERSION) \
David Tardonb74bf412013-08-12 09:39:59 +02001081 -DSYSTEM_NEON \
Matúš Kukan464b4332012-01-15 02:12:49 +01001082)
Matúš Kukan464b4332012-01-15 02:12:49 +01001083$(call gb_LinkTarget_set_include,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +01001084 $$(INCLUDE) \
Caolán McNamara1ac9ccf2012-01-16 08:57:38 +00001085 $(NEON_CFLAGS) \
Matúš Kukan464b4332012-01-15 02:12:49 +01001086)
1087
1088$(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
1089
1090endef
1091
1092else # !SYSTEM_NEON
1093
Marcos Paulo de Souzaf70343b2014-02-12 06:53:02 -02001094$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
Matúš Kukan464b4332012-01-15 02:12:49 +01001095 neon \
1096))
1097
1098define gb_LinkTarget__use_neon
Matúš Kukan7a030392012-10-29 23:29:37 +01001099$(call gb_LinkTarget_use_unpacked,$(1),neon)
Matúš Kukan464b4332012-01-15 02:12:49 +01001100$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001101 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
Matúš Kukan464b4332012-01-15 02:12:49 +01001102 $$(INCLUDE) \
1103)
Michael Stahlc923f7d2012-04-07 23:22:08 +02001104$(call gb_LinkTarget_use_libraries,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +01001105 neon \
1106)
1107
1108endef
1109
1110endif # SYSTEM_NEON
1111
Matúš Kukandcae0502014-02-25 21:47:33 +01001112endif # WITH_WEBDAV
Matúš Kukan464b4332012-01-15 02:12:49 +01001113
Michael Stahle3abec32014-02-11 15:57:18 +01001114ifneq ($(SYSTEM_REDLAND),)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001115
1116define gb_LinkTarget__use_librdf
Michael Stahla88ef232011-04-13 16:11:41 +00001117$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +00001118 -DSYSTEM_REDLAND \
1119)
1120$(call gb_LinkTarget_set_include,$(1),\
1121 $$(INCLUDE) \
1122 $(REDLAND_CFLAGS) \
1123)
1124$(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +01001125
Michael Stahlc74af0d2011-04-01 20:49:35 +00001126endef
1127
Peter Foley18bd1e72012-12-27 18:04:21 -05001128gb_LinkTarget__use_redland_headers:=
1129
1130gb_LinkTarget__use_raptor_headers:=
1131
1132gb_LinkTarget__use_rasqal_headers:=
1133
Michael Stahlc74af0d2011-04-01 20:49:35 +00001134else # !SYSTEM_REDLAND
1135
Peter Foley18bd1e72012-12-27 18:04:21 -05001136define gb_LinkTarget__use_redland_headers
1137$(call gb_LinkTarget_set_include,$(1),\
Michael Stahld719c012013-04-01 12:41:18 +02001138 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
Peter Foley18bd1e72012-12-27 18:04:21 -05001139 $$(INCLUDE) \
1140)
1141
1142endef
1143
1144define gb_LinkTarget__use_raptor_headers
1145$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001146 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
Peter Foley18bd1e72012-12-27 18:04:21 -05001147 $$(INCLUDE) \
1148)
1149
1150endef
1151
1152define gb_LinkTarget__use_rasqal_headers
1153$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001154 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
Peter Foley18bd1e72012-12-27 18:04:21 -05001155 $$(INCLUDE) \
1156)
1157
1158endef
1159
Tor Lillqvist9a42ca72012-04-19 21:45:14 +03001160ifneq ($(OS),ANDROID)
1161
Michael Stahl5f9cda22013-11-01 15:43:47 +01001162ifeq ($(COM),MSC)
Michael Stahlae8e5792014-01-10 12:07:31 +01001163$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
David Tardon491dea02013-05-01 11:23:50 +02001164 raptor2 \
1165 rasqal \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001166 rdf \
1167))
Michael Stahl5ae30d32014-03-13 19:32:13 +01001168else
1169$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1170 raptor \
1171 rasqal \
1172 redland \
1173))
Michael Stahl5f9cda22013-11-01 15:43:47 +01001174endif
Michael Stahlc74af0d2011-04-01 20:49:35 +00001175
1176define gb_LinkTarget__use_librdf
Michael Stahl831aaef2013-10-24 01:09:35 +02001177ifeq ($(COM),MSC)
1178$(call gb_LinkTarget_use_libraries,$(1),\
1179 raptor2 \
1180 rdf \
1181)
1182else
Matúš Kukan85d1e392013-12-14 11:17:30 +01001183$(call gb_LinkTarget_use_packages,$(1),raptor rasqal redland)
1184
Michael Stahl2793c542013-10-23 21:18:24 +02001185$(call gb_LinkTarget_add_libs,$(1),\
1186 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1187 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001188)
Michael Stahl831aaef2013-10-24 01:09:35 +02001189endif
Caolán McNamara6bccd202011-07-25 22:10:33 +01001190
Michael Stahlc74af0d2011-04-01 20:49:35 +00001191endef
1192
Tor Lillqvist9a42ca72012-04-19 21:45:14 +03001193else # ANDROID
1194
Tor Lillqvist9a42ca72012-04-19 21:45:14 +03001195define gb_LinkTarget__use_librdf
Michael Stahl95565d52013-05-07 12:17:20 +02001196$(call gb_LinkTarget_use_packages,$(1),raptor rasqal redland)
Tor Lillqvist9a42ca72012-04-19 21:45:14 +03001197
1198endef
1199
1200endif # ANDROID
1201
Michael Stahlc74af0d2011-04-01 20:49:35 +00001202endif # SYSTEM_REDLAND
1203
1204
Michael Stahlf7a6da22016-02-29 21:15:09 +01001205ifneq ($(USING_X11)$(ENABLE_CAIRO_CANVAS)$(ENABLE_HEADLESS),) # or
Michael Stahl32a617d2014-02-17 11:23:19 +01001206
Michael Stahl5c0e6d82014-02-11 17:03:53 +01001207ifneq ($(SYSTEM_CAIRO),)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001208
Michael Stahlc74af0d2011-04-01 20:49:35 +00001209define gb_LinkTarget__use_cairo
1210$(call gb_LinkTarget_set_include,$(1),\
1211 $$(INCLUDE) \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001212 $(CAIRO_CFLAGS) \
1213)
David Tardon962771f2013-05-24 14:35:18 +02001214$(call gb_LinkTarget_use_external,$(1),freetype_headers)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001215$(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +01001216
Michael Stahlc74af0d2011-04-01 20:49:35 +00001217endef
1218
Michael Stahl5c0e6d82014-02-11 17:03:53 +01001219else # !SYSTEM_CAIRO
Michael Stahlc74af0d2011-04-01 20:49:35 +00001220
Michael Stahl32a617d2014-02-17 11:23:19 +01001221$(eval $(call gb_Helper_register_packages_for_install,ooo,\
1222 cairo \
1223 $(if $(filter $(OS),WNT),,pixman) \
1224))
1225
Michael Stahlc74af0d2011-04-01 20:49:35 +00001226define gb_LinkTarget__use_cairo
Michael Stahlde142202012-11-20 22:05:36 +01001227$(call gb_LinkTarget_use_package,$(1),cairo)
1228$(call gb_LinkTarget_use_package,$(1),pixman)
David Tardon962771f2013-05-24 14:35:18 +02001229$(call gb_LinkTarget_use_external,$(1),freetype_headers)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001230$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001231 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1232 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
Matúš Kukan2cb7ba12012-11-10 22:14:42 +01001233 $$(INCLUDE) \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001234)
Michael Stahld89f48b2013-10-23 21:27:05 +02001235$(call gb_LinkTarget_add_libs,$(1),\
1236 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
Matúš Kukan2cb7ba12012-11-10 22:14:42 +01001237 $(if $(filter-out MACOSX WNT,$(OS)), \
Michael Stahld89f48b2013-10-23 21:27:05 +02001238 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
Matúš Kukan2cb7ba12012-11-10 22:14:42 +01001239 ) \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001240)
Caolán McNamara5bb76f62011-07-25 21:50:34 +01001241
Michael Stahlc74af0d2011-04-01 20:49:35 +00001242endef
1243
1244endif # SYSTEM_CAIRO
1245
Caolán McNamarafb7d4ba2015-11-16 13:40:22 +00001246else ifeq ($(OS),ANDROID)
1247
1248define gb_LinkTarget__use_cairo
1249$(call gb_LinkTarget_use_package,$(1),cairo)
1250$(call gb_LinkTarget_use_package,$(1),pixman)
1251$(call gb_LinkTarget_use_external,$(1),freetype_headers)
1252$(call gb_LinkTarget_set_include,$(1),\
1253 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1254 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1255 $$(INCLUDE) \
1256)
1257$(call gb_LinkTarget_add_libs,$(1),\
1258 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1259 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1260)
1261
1262endef
1263
Michael Stahl32a617d2014-02-17 11:23:19 +01001264endif # CAIRO
1265
Michael Stahl379f9782014-02-11 16:49:19 +01001266ifneq ($(SYSTEM_FREETYPE),)
David Tardon962771f2013-05-24 14:35:18 +02001267
1268define gb_LinkTarget__use_freetype_headers
Caolán McNamarab41ae462011-07-25 22:24:27 +01001269$(call gb_LinkTarget_set_include,$(1),\
1270 $$(INCLUDE) \
1271 $(FREETYPE_CFLAGS) \
1272)
Tor Lillqvist0d1c24e2012-04-19 21:10:00 +03001273
David Tardon962771f2013-05-24 14:35:18 +02001274endef
1275
1276define gb_LinkTarget__use_freetype
1277$(call gb_LinkTarget_use_external,$(1),freetype_headers)
Caolán McNamarab41ae462011-07-25 22:24:27 +01001278$(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1279
1280endef
1281
Michael Stahle568d2a2013-09-30 14:10:22 +02001282gb_ExternalProject__use_freetype :=
1283
Zolnai Tamás6403f2b2014-06-25 15:19:41 +02001284else ifeq ($(OS),ANDROID)
David Tardon962771f2013-05-24 14:35:18 +02001285
1286define gb_LinkTarget__use_freetype_headers
Michael Stahlb242cee82013-10-24 12:08:50 +02001287$(call gb_LinkTarget_use_external_project,$(1),freetype)
David Tardon962771f2013-05-24 14:35:18 +02001288$(call gb_LinkTarget_set_include,$(1),\
1289 -I$(call gb_UnpackedTarball_get_dir,freetype)/include \
1290 $$(INCLUDE) \
1291)
1292
David Tardon61695f12013-05-24 17:15:20 +02001293endef
1294
David Tardon962771f2013-05-24 14:35:18 +02001295define gb_LinkTarget__use_freetype
1296$(call gb_LinkTarget_use_external,$(1),freetype_headers)
Jan Holesovskyfe5dbe32014-04-22 00:41:57 +02001297$(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
David Tardon962771f2013-05-24 14:35:18 +02001298
1299endef
1300
Michael Stahle568d2a2013-09-30 14:10:22 +02001301define gb_ExternalProject__use_freetype
Michael Stahlb242cee82013-10-24 12:08:50 +02001302$(call gb_ExternalProject_use_external_project,$(1),freetype)
Michael Stahle568d2a2013-09-30 14:10:22 +02001303
1304endef
1305
David Tardon962771f2013-05-24 14:35:18 +02001306endif # SYSTEM_FREETYPE
1307
Michael Stahl04ff5352014-02-11 16:21:04 +01001308ifneq ($(SYSTEM_FONTCONFIG),)
David Tardon4eb68422013-05-24 14:16:03 +02001309
Caolán McNamarab41ae462011-07-25 22:24:27 +01001310define gb_LinkTarget__use_fontconfig
1311$(call gb_LinkTarget_set_include,$(1),\
1312 $$(INCLUDE) \
1313 $(FONTCONFIG_CFLAGS) \
1314)
Tor Lillqvist0d1c24e2012-04-19 21:10:00 +03001315
Caolán McNamarab41ae462011-07-25 22:24:27 +01001316$(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1317
1318endef
Michael Stahlc74af0d2011-04-01 20:49:35 +00001319
Matúš Kukanfb8d0a42013-09-25 10:13:09 +02001320else ifeq ($(OS),ANDROID)
David Tardon4eb68422013-05-24 14:16:03 +02001321
David Tardon4eb68422013-05-24 14:16:03 +02001322define gb_LinkTarget__use_fontconfig
Michael Stahl76596b32013-10-24 11:01:41 +02001323$(call gb_LinkTarget_use_external_project,$(1),fontconfig)
David Tardon4eb68422013-05-24 14:16:03 +02001324$(call gb_LinkTarget_set_include,$(1),\
1325 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1326 $$(INCLUDE) \
1327)
1328
David Tardon4eb68422013-05-24 14:16:03 +02001329endef
1330
1331endif # SYSTEM_FONTCONFIG
1332
Michael Stahle3abec32014-02-11 15:57:18 +01001333ifneq ($(SYSTEM_GRAPHITE),)
Michael Stahl87e44332011-04-13 16:11:39 +00001334
Michael Stahl87e44332011-04-13 16:11:39 +00001335define gb_LinkTarget__use_graphite
Michael Stahl87e44332011-04-13 16:11:39 +00001336$(call gb_LinkTarget_set_include,$(1),\
1337 $$(INCLUDE) \
1338 $(GRAPHITE_CFLAGS) \
1339)
1340$(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +01001341
Michael Stahl87e44332011-04-13 16:11:39 +00001342endef
1343
Khaled Hosny9de76cb2016-09-23 18:34:09 +02001344gb_ExternalProject__use_graphite:=
1345
Michael Stahle3abec32014-02-11 15:57:18 +01001346else # !SYSTEM_GRAPHITE
Michael Stahl87e44332011-04-13 16:11:39 +00001347
Michael Stahl87e44332011-04-13 16:11:39 +00001348define gb_LinkTarget__use_graphite
Matúš Kukan7a030392012-10-29 23:29:37 +01001349$(call gb_LinkTarget_use_unpacked,$(1),graphite)
Matúš Kukan1ceb47d2012-10-25 09:55:13 +02001350$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001351 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
Matúš Kukan1ceb47d2012-10-25 09:55:13 +02001352 $$(INCLUDE) \
1353)
Michael Stahlc923f7d2012-04-07 23:22:08 +02001354$(call gb_LinkTarget_use_static_libraries,$(1),\
Matúš Kukan1ceb47d2012-10-25 09:55:13 +02001355 graphite \
Michael Stahl87e44332011-04-13 16:11:39 +00001356)
Caolán McNamara6bccd202011-07-25 22:10:33 +01001357
Michael Stahl87e44332011-04-13 16:11:39 +00001358endef
1359
Khaled Hosny9de76cb2016-09-23 18:34:09 +02001360define gb_ExternalProject__use_graphite
David Tardonb5c566f2016-11-03 17:23:56 +01001361$(call gb_ExternalProject_use_static_libraries,$(1),\
1362 graphite \
1363)
Khaled Hosny9de76cb2016-09-23 18:34:09 +02001364
1365endef
Michael Stahl87e44332011-04-13 16:11:39 +00001366endif # SYSTEM_GRAPHITE
1367
Michael Stahl187194b2014-02-11 19:17:42 +01001368ifneq ($(SYSTEM_ICU),)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001369
Peter Foleyb92a0d92012-12-25 17:39:43 -05001370gb_LinkTarget__use_icu_headers:=
Fridrich Štrba8e9675d2013-01-25 10:55:04 +01001371gb_ExternalProject__use_icu:=
Peter Foleyb92a0d92012-12-25 17:39:43 -05001372
Matúš Kukan6fad1752011-08-11 12:42:39 +02001373define gb_LinkTarget__use_icudata
1374$(call gb_LinkTarget_add_libs,$(1),-licudata)
1375
1376endef
David Tardon1a852392011-07-26 09:58:54 +02001377define gb_LinkTarget__use_icui18n
1378$(call gb_LinkTarget_add_libs,$(1),-licui18n)
Matúš Kukan6fad1752011-08-11 12:42:39 +02001379
David Tardon1a852392011-07-26 09:58:54 +02001380endef
Michael Stahlc74af0d2011-04-01 20:49:35 +00001381define gb_LinkTarget__use_icuuc
1382$(call gb_LinkTarget_add_libs,$(1),-licuuc)
Caolán McNamara6bccd202011-07-25 22:10:33 +01001383
Michael Stahlc74af0d2011-04-01 20:49:35 +00001384endef
1385
1386else # !SYSTEM_ICU
1387
Michael Stahl057613c2014-07-24 00:22:51 +02001388$(eval $(call gb_Helper_register_packages_for_install,ure, \
1389 icu_ure \
1390))
1391
Michael Stahle7592692014-03-14 11:23:52 +01001392$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1393 icu \
1394))
1395
Tor Lillqvist084db5f2012-09-24 10:37:25 +03001396ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
Tor Lillqvist8a3ea752011-11-21 14:25:37 +02001397gb_ICU_suffix:=lo
1398else
1399gb_ICU_suffix:=
1400endif
1401
Peter Foleyb92a0d92012-12-25 17:39:43 -05001402define gb_LinkTarget__use_icu_headers
Peter Foleyce9bf0f2013-03-23 12:32:31 -04001403$(call gb_LinkTarget_use_unpacked,$(1),icu)
Peter Foleyb92a0d92012-12-25 17:39:43 -05001404$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001405 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1406 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1407 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
Peter Foleyb92a0d92012-12-25 17:39:43 -05001408 $$(INCLUDE) \
1409)
1410
1411endef
1412
Fridrich Štrba8e9675d2013-01-25 10:55:04 +01001413define gb_ExternalProject__use_icu
1414$(call gb_ExternalProject_use_package,$(1),icu)
Fridrich Štrba851ca9c2013-01-25 10:29:59 +01001415
1416endef
1417
Peter Foleyf7452122012-11-04 08:46:44 -05001418# icudata and icui18n is called icudt and icuin when built with MSVC :-/
Michael Stahla92f80f2013-10-23 15:00:29 +02001419define gb_LinkTarget__use_icudata
Stephan Bergmann475e4b42016-10-25 16:46:35 +02001420$(call gb_LinkTarget_use_package,$(1),icu_ure)
Michael Stahla92f80f2013-10-23 15:00:29 +02001421
1422ifeq ($(OS),WNT)
1423$(call gb_LinkTarget_add_libs,$(1),\
1424 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
Matúš Kukan6fad1752011-08-11 12:42:39 +02001425)
Michael Stahla92f80f2013-10-23 15:00:29 +02001426else
1427$(call gb_LinkTarget_add_libs,$(1),\
1428 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1429)
1430endif
Matúš Kukan6fad1752011-08-11 12:42:39 +02001431
1432endef
Michael Stahla92f80f2013-10-23 15:00:29 +02001433
1434define gb_LinkTarget__use_icui18n
1435$(call gb_LinkTarget_use_package,$(1),icu)
1436
1437ifeq ($(OS),WNT)
1438$(call gb_LinkTarget_add_libs,$(1),\
1439 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1440)
1441else
1442$(call gb_LinkTarget_add_libs,$(1),\
1443 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1444)
1445endif
1446
1447endef
1448
Michael Stahlc74af0d2011-04-01 20:49:35 +00001449define gb_LinkTarget__use_icuuc
Stephan Bergmann475e4b42016-10-25 16:46:35 +02001450$(call gb_LinkTarget_use_package,$(1),icu_ure)
Michael Stahla92f80f2013-10-23 15:00:29 +02001451
1452ifeq ($(OS),WNT)
1453$(call gb_LinkTarget_add_libs,$(1),\
1454 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001455)
Michael Stahla92f80f2013-10-23 15:00:29 +02001456else
1457$(call gb_LinkTarget_add_libs,$(1),\
1458 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1459)
1460endif
Caolán McNamara6bccd202011-07-25 22:10:33 +01001461
Michael Stahlc74af0d2011-04-01 20:49:35 +00001462endef
1463
1464endif # SYSTEM_ICU
1465
Michael Stahle3abec32014-02-11 15:57:18 +01001466ifneq ($(SYSTEM_HARFBUZZ),)
Khaled Hosny7e389f42013-04-20 13:00:56 +02001467
1468define gb_LinkTarget__use_harfbuzz
1469$(call gb_LinkTarget_set_include,$(1),\
1470 $$(INCLUDE) \
1471 $(HARFBUZZ_CFLAGS) \
1472)
1473$(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1474
1475endef
1476
Michael Stahle3abec32014-02-11 15:57:18 +01001477else # SYSTEM_HARFBUZZ != TRUE
Khaled Hosny7e389f42013-04-20 13:00:56 +02001478
Khaled Hosny7e389f42013-04-20 13:00:56 +02001479define gb_LinkTarget__use_harfbuzz
Michael Stahl8db02752013-05-07 23:28:45 +02001480$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl2f6261f2013-09-19 19:28:36 +02001481 $(HARFBUZZ_CFLAGS) \
Michael Stahl8db02752013-05-07 23:28:45 +02001482 $$(INCLUDE) \
1483)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001484$(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1485$(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
Khaled Hosny7e389f42013-04-20 13:00:56 +02001486
1487endef
1488
1489endif # SYSTEM_HARFBUZZ
Michael Stahl4a8919f2011-04-18 11:13:57 +00001490
Norbert Thiebaudbf6d1f72013-08-31 18:55:53 -05001491ifeq ($(DISABLE_OPENSSL),TRUE)
Andres Gomeze3f607e2013-04-11 10:24:25 +03001492
1493gb_ExternalProject__use_openssl:=
1494gb_LinkTarget__use_openssl_headers:=
1495gb_LinkTarget__use_openssl:=
1496
1497else # !DISABLE_OPENSSL
1498
Michael Stahle3abec32014-02-11 15:57:18 +01001499ifneq ($(SYSTEM_OPENSSL),)
Michael Stahl4a8919f2011-04-18 11:13:57 +00001500
Peter Foley9ddba662012-12-28 11:19:06 -05001501gb_LinkTarget__use_openssl_headers:=
1502gb_ExternalProject__use_openssl:=
1503
Michael Stahl4a8919f2011-04-18 11:13:57 +00001504define gb_LinkTarget__use_openssl
1505$(call gb_LinkTarget_set_include,$(1),\
1506 $$(INCLUDE) \
1507 $(OPENSSL_CFLAGS) \
1508)
1509$(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +01001510
Michael Stahl4a8919f2011-04-18 11:13:57 +00001511endef
1512
1513else # !SYSTEM_OPENSSL
1514
Michael Stahlf921e262014-03-13 19:36:48 +01001515$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1516 openssl \
1517))
1518
Peter Foley9ddba662012-12-28 11:19:06 -05001519define gb_ExternalProject__use_openssl
1520$(call gb_ExternalProject_use_package,$(1),openssl)
1521
1522endef
1523
1524define gb_LinkTarget__use_openssl_headers
Michael Stahlc7ca0712016-03-07 21:18:23 +01001525$(call gb_LinkTarget_use_external_project,$(1),openssl)
Peter Foley9ddba662012-12-28 11:19:06 -05001526$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001527 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
Peter Foley9ddba662012-12-28 11:19:06 -05001528 $$(INCLUDE) \
1529)
1530
1531endef
1532
Michael Stahl4a8919f2011-04-18 11:13:57 +00001533define gb_LinkTarget__use_openssl
Peter Foley9ddba662012-12-28 11:19:06 -05001534$(call gb_LinkTarget_use_package,$(1),openssl)
Michael Stahl4a8919f2011-04-18 11:13:57 +00001535ifeq ($(OS),WNT)
Michael Stahl5b906622013-10-24 00:22:20 +02001536$(call gb_LinkTarget_add_libs,$(1),\
1537 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/ssleay32.lib \
1538 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/libeay32.lib \
Michael Stahl4a8919f2011-04-18 11:13:57 +00001539)
1540else
Michael Stahl2f6261f2013-09-19 19:28:36 +02001541$(call gb_LinkTarget_add_libs,$(1),\
1542 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1543 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
Michael Stahl4a8919f2011-04-18 11:13:57 +00001544)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001545$(call gb_LinkTarget_use_external_project,$(1),openssl)
Michael Stahl4a8919f2011-04-18 11:13:57 +00001546ifeq ($(OS),SOLARIS)
Michael Stahl80374352012-09-28 12:25:50 +02001547$(call gb_LinkTarget_add_libs,$(1),\
1548 -lnsl \
1549 -lsocket \
Michael Stahl4a8919f2011-04-18 11:13:57 +00001550)
1551endif
1552endif
Caolán McNamara6bccd202011-07-25 22:10:33 +01001553
Michael Stahl4a8919f2011-04-18 11:13:57 +00001554endef
1555
1556endif # SYSTEM_OPENSSL
Andres Gomeze3f607e2013-04-11 10:24:25 +03001557endif # DISABLE_OPENSSL
Michael Stahl4a8919f2011-04-18 11:13:57 +00001558
Matúš Kukanc4560482011-07-28 01:03:23 +02001559
Norbert Thiebaudbf6d1f72013-08-31 18:55:53 -05001560ifeq ($(DISABLE_OPENSSL),TRUE)
Andres Gomez48d49752013-04-11 10:32:54 +03001561
1562define gb_LinkTarget__use_gnutls
1563$(call gb_LinkTarget_set_include,$(1),\
1564 $$(INCLUDE) \
1565 $(GNUTLS_CFLAGS) \
1566)
1567
1568$(call gb_LinkTarget_add_defs,$(1),\
1569 -DDISABLE_OPENSSL \
1570)
1571
1572$(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1573
1574endef
1575
1576define gb_LinkTarget__use_libgcrypt
1577$(call gb_LinkTarget_set_include,$(1),\
1578 $$(INCLUDE) \
1579 $(LIBGCRYPT_CFLAGS) \
1580)
1581
1582$(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1583
1584endef
1585
1586else # !DISABLE_OPENSSL
1587
1588gb_LinkTarget__use_gnutls:=
1589gb_LinkTarget__use_libgcrypt:=
1590
1591endif # DISABLE_OPENSSL
1592
1593
Michael Stahle3abec32014-02-11 15:57:18 +01001594ifneq ($(SYSTEM_CDR),)
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001595
1596define gb_LinkTarget__use_cdr
1597$(call gb_LinkTarget_set_include,$(1),\
1598 $$(INCLUDE) \
1599 $(CDR_CFLAGS) \
1600)
1601$(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1602
1603endef
1604
Bjoern Michaelsenfb455e52013-02-19 11:22:02 +01001605else # !SYSTEM_CDR
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001606
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001607define gb_LinkTarget__use_cdr
David Tardonf16f3662013-05-24 13:48:03 +02001608$(call gb_LinkTarget_set_include,$(1),\
1609 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1610 $$(INCLUDE) \
1611)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001612$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001613 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrbab8f39c52012-10-05 13:32:14 +02001614)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001615$(call gb_LinkTarget_use_external_project,$(1),libcdr)
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001616endef
1617
Bjoern Michaelsenfb455e52013-02-19 11:22:02 +01001618endif # SYSTEM_CDR
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001619
1620
Michael Stahle3abec32014-02-11 15:57:18 +01001621ifneq ($(SYSTEM_EBOOK),)
David Tardon316be1b2013-11-09 15:52:36 +01001622
1623define gb_LinkTarget__use_ebook
1624$(call gb_LinkTarget_set_include,$(1),\
1625 $$(INCLUDE) \
1626 $(EBOOK_CFLAGS) \
1627)
1628$(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1629
1630endef
1631
1632gb_ExternalProject__use_ebook :=
1633
1634else # !SYSTEM_EBOOK
1635
1636define gb_LinkTarget__use_ebook
1637$(call gb_LinkTarget_set_include,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001638 -I${WORKDIR}/UnpackedTarball/libebook/inc \
David Tardon316be1b2013-11-09 15:52:36 +01001639 $$(INCLUDE) \
1640)
1641$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001642 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
David Tardon316be1b2013-11-09 15:52:36 +01001643)
1644$(call gb_LinkTarget_use_external_project,$(1),libebook)
1645
1646endef
1647
1648define gb_ExternalProject__use_ebook
1649$(call gb_ExternalProject_use_external_project,$(1),libebook)
1650
1651endef
1652
1653endif # SYSTEM_EBOOK
1654
1655
Michael Stahle3abec32014-02-11 15:57:18 +01001656ifneq ($(SYSTEM_ETONYEK),)
David Tardon08ca3e42013-10-24 16:46:49 +02001657
1658define gb_LinkTarget__use_etonyek
1659$(call gb_LinkTarget_set_include,$(1),\
1660 $$(INCLUDE) \
1661 $(ETONYEK_CFLAGS) \
1662)
1663$(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1664
1665endef
1666
1667gb_ExternalProject__use_etonyek :=
1668
1669else # !SYSTEM_ETONYEK
1670
David Tardon78deb812015-05-19 16:12:08 +02001671ifeq ($(COM),MSC)
1672
1673$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1674 etonyek \
1675))
1676
David Tardon08ca3e42013-10-24 16:46:49 +02001677define gb_LinkTarget__use_etonyek
1678$(call gb_LinkTarget_set_include,$(1),\
David Tardon78deb812015-05-19 16:12:08 +02001679 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1680 $$(INCLUDE) \
1681)
1682$(call gb_LinkTarget_use_libraries,$(1),\
1683 etonyek \
1684)
1685
1686endef
1687
1688else # !MSC
1689
1690$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1691 libetonyek \
1692))
1693
1694define gb_LinkTarget__use_etonyek
1695$(call gb_LinkTarget_use_package,$(1),libetonyek)
1696
1697$(call gb_LinkTarget_set_include,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001698 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
David Tardon78deb812015-05-19 16:12:08 +02001699 -DLIBETONYEK_VISIBILITY \
David Tardon08ca3e42013-10-24 16:46:49 +02001700 $$(INCLUDE) \
1701)
1702$(call gb_LinkTarget_add_libs,$(1),\
David Tardon78deb812015-05-19 16:12:08 +02001703 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
David Tardon08ca3e42013-10-24 16:46:49 +02001704)
1705$(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1706
1707endef
1708
1709define gb_ExternalProject__use_etonyek
1710$(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1711
1712endef
1713
David Tardon78deb812015-05-19 16:12:08 +02001714endif
1715
David Tardon08ca3e42013-10-24 16:46:49 +02001716endif # SYSTEM_ETONYEK
1717
1718
Michael Stahle3abec32014-02-11 15:57:18 +01001719ifneq ($(SYSTEM_FREEHAND),)
Fridrich Štrba67153d72013-10-31 12:42:50 +01001720
1721define gb_LinkTarget__use_freehand
1722$(call gb_LinkTarget_set_include,$(1),\
1723 $$(INCLUDE) \
1724 $(FREEHAND_CFLAGS) \
1725)
1726$(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1727
1728endef
1729
1730gb_ExternalProject__use_freehand :=
1731
1732else # !SYSTEM_FREEHAND
1733
1734define gb_LinkTarget__use_freehand
1735$(call gb_LinkTarget_set_include,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001736 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
Fridrich Štrba67153d72013-10-31 12:42:50 +01001737 $$(INCLUDE) \
1738)
1739$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001740 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba67153d72013-10-31 12:42:50 +01001741)
1742$(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1743
1744endef
1745
1746define gb_ExternalProject__use_freehand
1747$(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1748
1749endef
1750
1751endif # SYSTEM_FREEHAND
1752
1753
Michael Stahle3abec32014-02-11 15:57:18 +01001754ifneq ($(SYSTEM_ODFGEN),)
Fridrich Štrba93848e12013-05-02 20:25:51 +02001755
1756define gb_LinkTarget__use_odfgen
1757$(call gb_LinkTarget_set_include,$(1),\
1758 $$(INCLUDE) \
1759 $(ODFGEN_CFLAGS) \
1760)
1761$(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1762
1763endef
1764
1765else # !SYSTEM_ODFGEN
1766
David Tardon36c3f912014-05-24 09:13:33 +02001767ifeq ($(COM),MSC)
1768
1769$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1770 odfgen \
1771))
1772
Fridrich Štrba93848e12013-05-02 20:25:51 +02001773define gb_LinkTarget__use_odfgen
David Tardon0f8a90c2013-05-24 13:49:11 +02001774$(call gb_LinkTarget_set_include,$(1),\
1775 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1776 $$(INCLUDE) \
1777)
David Tardon36c3f912014-05-24 09:13:33 +02001778$(call gb_LinkTarget_use_libraries,$(1),\
1779 odfgen \
Fridrich Štrba93848e12013-05-02 20:25:51 +02001780)
Fridrich Štrba93848e12013-05-02 20:25:51 +02001781
1782endef
1783
David Tardon36c3f912014-05-24 09:13:33 +02001784else # !MSC
1785
1786$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1787 libodfgen \
1788))
1789
1790define gb_LinkTarget__use_odfgen
1791$(call gb_LinkTarget_use_package,$(1),libodfgen)
1792
1793$(call gb_LinkTarget_set_include,$(1),\
1794 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
Stephan Bergmannb6ee5cf2015-01-26 15:09:13 +01001795 -DLIBODFGEN_VISIBILITY \
David Tardon36c3f912014-05-24 09:13:33 +02001796 $$(INCLUDE) \
1797)
1798$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001799 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
David Tardon36c3f912014-05-24 09:13:33 +02001800)
1801
1802endef
1803
1804endif
1805
Fridrich Štrba93848e12013-05-02 20:25:51 +02001806endif # SYSTEM_ODFGEN
1807
1808
David Tardonb421ce72014-05-24 08:39:54 +02001809ifneq ($(SYSTEM_REVENGE),)
1810
1811define gb_LinkTarget__use_revenge
1812$(call gb_LinkTarget_set_include,$(1),\
1813 $$(INCLUDE) \
1814 $(REVENGE_CFLAGS) \
1815)
1816$(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1817
1818endef
1819
David Tardon7c9c7792014-05-25 13:06:57 +02001820gb_ExternalProject__use_revenge :=
1821
David Tardonb421ce72014-05-24 08:39:54 +02001822else # !SYSTEM_REVENGE
1823
1824ifeq ($(COM),MSC)
1825
1826$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1827 revenge \
1828))
1829
1830define gb_LinkTarget__use_revenge
1831$(call gb_LinkTarget_set_include,$(1),\
David Tardon0b7d0a82014-05-25 13:19:31 +02001832 $(REVENGE_CFLAGS) \
David Tardonb421ce72014-05-24 08:39:54 +02001833 $$(INCLUDE) \
1834)
1835$(call gb_LinkTarget_use_libraries,$(1),\
1836 revenge \
1837)
1838
1839endef
1840
David Tardon7c9c7792014-05-25 13:06:57 +02001841define gb_ExternalProject__use_revenge
1842$(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1843
1844endef
1845
David Tardonb421ce72014-05-24 08:39:54 +02001846else # !MSC
1847
1848$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1849 librevenge \
1850))
1851
1852define gb_LinkTarget__use_revenge
1853$(call gb_LinkTarget_use_package,$(1),librevenge)
1854
1855$(call gb_LinkTarget_set_include,$(1),\
David Tardon0b7d0a82014-05-25 13:19:31 +02001856 $(REVENGE_CFLAGS) \
Stephan Bergmannb6ee5cf2015-01-26 15:09:13 +01001857 -DLIBREVENGE_VISIBILITY \
David Tardonb421ce72014-05-24 08:39:54 +02001858 $$(INCLUDE) \
1859)
1860$(call gb_LinkTarget_add_libs,$(1),\
David Tardon0b7d0a82014-05-25 13:19:31 +02001861 $(REVENGE_LIBS) \
David Tardonb421ce72014-05-24 08:39:54 +02001862)
1863endef
1864
David Tardon7c9c7792014-05-25 13:06:57 +02001865define gb_ExternalProject__use_revenge
1866$(call gb_ExternalProject_use_package,$(1),librevenge)
1867
1868endef
1869
David Tardonb421ce72014-05-24 08:39:54 +02001870endif # MSC
1871
1872endif # SYSTEM_REVENGE
1873
1874
Michael Stahle3abec32014-02-11 15:57:18 +01001875ifneq ($(SYSTEM_ABW),)
Fridrich Štrba10eaaac2014-01-13 17:01:32 +01001876
1877define gb_LinkTarget__use_abw
1878$(call gb_LinkTarget_set_include,$(1),\
1879 $$(INCLUDE) \
1880 $(ABW_CFLAGS) \
1881)
1882$(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1883
1884endef
1885gb_ExternalProject__use_abw :=
1886
1887else # !SYSTEM_ABW
1888
1889define gb_LinkTarget__use_abw
1890$(call gb_LinkTarget_set_include,$(1),\
1891 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1892 $$(INCLUDE) \
1893)
1894$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001895 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba10eaaac2014-01-13 17:01:32 +01001896)
1897$(call gb_LinkTarget_use_external_project,$(1),libabw)
1898
1899endef
1900define gb_ExternalProject__use_abw
1901$(call gb_ExternalProject_use_external_project,$(1),libabw)
1902
1903endef
1904
1905endif # SYSTEM_ABW
1906
1907
Michael Stahle3abec32014-02-11 15:57:18 +01001908ifneq ($(SYSTEM_MSPUB),)
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001909
1910define gb_LinkTarget__use_mspub
1911$(call gb_LinkTarget_set_include,$(1),\
1912 $$(INCLUDE) \
1913 $(MSPUB_CFLAGS) \
1914)
1915$(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
1916
1917endef
1918
Bjoern Michaelsena4c80752013-02-19 11:22:51 +01001919else # !SYSTEM_MSPUB
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001920
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001921define gb_LinkTarget__use_mspub
Michael Stahl35ac39e2013-05-16 13:09:11 +02001922$(call gb_LinkTarget_set_include,$(1),\
1923 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
1924 $$(INCLUDE) \
1925)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001926$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001927 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba093a5c92013-01-28 10:13:50 +01001928)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001929$(call gb_LinkTarget_use_external_project,$(1),libmspub)
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001930
1931endef
1932
Bjoern Michaelsena4c80752013-02-19 11:22:51 +01001933endif # SYSTEM_MSPUB
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001934
1935
David Tardon516fb342014-06-26 21:26:11 +02001936ifneq ($(SYSTEM_PAGEMAKER),)
1937
1938define gb_LinkTarget__use_pagemaker
1939$(call gb_LinkTarget_set_include,$(1),\
1940 $$(INCLUDE) \
1941 $(PAGEMAKER_CFLAGS) \
1942)
1943$(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
1944
1945endef
1946gb_ExternalProject__use_pagemaker :=
1947
1948else # !SYSTEM_PAGEMAKER
1949
1950define gb_LinkTarget__use_pagemaker
1951$(call gb_LinkTarget_set_include,$(1),\
1952 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
1953 $$(INCLUDE) \
1954)
1955$(call gb_LinkTarget_add_libs,$(1),\
1956 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
1957)
1958$(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
1959
1960endef
1961define gb_ExternalProject__use_pagemaker
1962$(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
1963
1964endef
1965
1966endif # SYSTEM_PAGEMAKER
1967
1968
Aleksas Pantechovskisaaed6fe2016-06-22 19:02:29 +03001969ifneq ($(SYSTEM_ZMF),)
1970
1971define gb_LinkTarget__use_zmf
1972$(call gb_LinkTarget_set_include,$(1),\
1973 $$(INCLUDE) \
1974 $(ZMF_CFLAGS) \
1975)
1976$(call gb_LinkTarget_add_libs,$(1),$(ZMF_LIBS))
1977
1978endef
1979gb_ExternalProject__use_zmf :=
1980
1981else # !SYSTEM_ZMF
1982
1983define gb_LinkTarget__use_zmf
1984$(call gb_LinkTarget_set_include,$(1),\
1985 -I$(call gb_UnpackedTarball_get_dir,libzmf)/inc \
1986 $$(INCLUDE) \
1987)
1988$(call gb_LinkTarget_add_libs,$(1),\
1989 $(call gb_UnpackedTarball_get_dir,libzmf)/src/lib/.libs/libzmf-0.0$(gb_StaticLibrary_PLAINEXT) \
1990)
1991$(call gb_LinkTarget_use_external_project,$(1),libzmf)
1992
1993endef
1994define gb_ExternalProject__use_zmf
1995$(call gb_ExternalProject_use_external_project,$(1),libzmf)
1996
1997endef
1998
1999endif # SYSTEM_ZMF
2000
2001
Michael Stahle3abec32014-02-11 15:57:18 +01002002ifneq ($(SYSTEM_VISIO),)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002003
2004define gb_LinkTarget__use_visio
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002005$(call gb_LinkTarget_set_include,$(1),\
2006 $$(INCLUDE) \
Fridrich Štrbae531e8a2011-10-05 10:21:08 +02002007 $(VISIO_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002008)
Fridrich Štrbae531e8a2011-10-05 10:21:08 +02002009$(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02002010
2011endef
2012
Bjoern Michaelsenfe8bcfa2013-02-19 11:14:46 +01002013else # !SYSTEM_VISIO
Matúš Kukanc6a63952011-07-28 17:29:44 +02002014
Matúš Kukanc6a63952011-07-28 17:29:44 +02002015define gb_LinkTarget__use_visio
Michael Stahlacc7f612013-05-16 13:14:37 +02002016$(call gb_LinkTarget_set_include,$(1),\
2017 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2018 $$(INCLUDE) \
2019)
Michael Stahl2f6261f2013-09-19 19:28:36 +02002020$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02002021 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba64ab6112012-11-05 11:43:55 +01002022)
Michael Stahl2f6261f2013-09-19 19:28:36 +02002023$(call gb_LinkTarget_use_external_project,$(1),libvisio)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002024
2025endef
2026
Bjoern Michaelsenfe8bcfa2013-02-19 11:14:46 +01002027endif # SYSTEM_VISIO
Matúš Kukanc6a63952011-07-28 17:29:44 +02002028
2029
Michael Stahle3abec32014-02-11 15:57:18 +01002030ifneq ($(SYSTEM_WPD),)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002031
2032define gb_LinkTarget__use_wpd
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002033$(call gb_LinkTarget_set_include,$(1),\
2034 $$(INCLUDE) \
Fridrich Štrba8703f3e2011-10-05 10:04:04 +02002035 $(WPD_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002036)
Fridrich Štrba8703f3e2011-10-05 10:04:04 +02002037$(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02002038
2039endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02002040gb_ExternalProject__use_wpd :=
Matúš Kukanc6a63952011-07-28 17:29:44 +02002041
Bjoern Michaelsen5de206a2013-02-19 11:20:31 +01002042else # !SYSTEM_WPD
Matúš Kukanc6a63952011-07-28 17:29:44 +02002043
David Tardonc868a0c2014-12-23 18:37:54 +01002044ifeq ($(COM),MSC)
2045
2046$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2047 wpd \
2048))
2049
Fridrich Štrba4425db62012-09-24 13:17:45 +02002050define gb_LinkTarget__use_wpd
Michael Stahldb5c8c52013-05-16 13:28:14 +02002051$(call gb_LinkTarget_set_include,$(1),\
2052 $(WPD_CFLAGS) \
2053 $$(INCLUDE) \
2054)
David Tardonc868a0c2014-12-23 18:37:54 +01002055$(call gb_LinkTarget_use_libraries,$(1),\
2056 wpd \
Michael Stahl34295432012-09-24 22:25:28 +02002057)
Fridrich Štrba4425db62012-09-24 13:17:45 +02002058
2059endef
David Tardonc868a0c2014-12-23 18:37:54 +01002060
Michael Stahl2b7536a2012-10-05 21:17:25 +02002061define gb_ExternalProject__use_wpd
David Tardonc868a0c2014-12-23 18:37:54 +01002062$(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
Michael Stahl2b7536a2012-10-05 21:17:25 +02002063
2064endef
Fridrich Štrba4425db62012-09-24 13:17:45 +02002065
David Tardonc868a0c2014-12-23 18:37:54 +01002066else # !MSC
2067
2068$(eval $(call gb_Helper_register_packages_for_install,ooo, \
2069 libwpd \
2070))
2071
2072define gb_LinkTarget__use_wpd
2073$(call gb_LinkTarget_use_package,$(1),libwpd)
2074
2075$(call gb_LinkTarget_set_include,$(1),\
2076 $(WPD_CFLAGS) \
2077 $$(INCLUDE) \
2078)
2079$(call gb_LinkTarget_add_libs,$(1),\
2080 $(WPD_LIBS) \
2081)
2082
2083endef
2084
2085define gb_ExternalProject__use_wpd
2086$(call gb_ExternalProject_use_package,$(1),libwpd)
2087
2088endef
2089
2090endif # MSC
2091
Bjoern Michaelsen5de206a2013-02-19 11:20:31 +01002092endif # SYSTEM_WPD
Matúš Kukanc6a63952011-07-28 17:29:44 +02002093
2094
Michael Stahle3abec32014-02-11 15:57:18 +01002095ifneq ($(SYSTEM_WPG),)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002096
2097define gb_LinkTarget__use_wpg
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002098$(call gb_LinkTarget_set_include,$(1),\
2099 $$(INCLUDE) \
Fridrich Štrba62c43b42011-10-05 10:15:40 +02002100 $(WPG_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002101)
Fridrich Štrba62c43b42011-10-05 10:15:40 +02002102$(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02002103
2104endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02002105gb_ExternalProject__use_wpg :=
Matúš Kukanc6a63952011-07-28 17:29:44 +02002106
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01002107else # !SYSTEM_WPG
Matúš Kukanc6a63952011-07-28 17:29:44 +02002108
David Tardonc868a0c2014-12-23 18:37:54 +01002109ifeq ($(COM),MSC)
2110
2111$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2112 wpg \
2113))
2114
Matúš Kukanc6a63952011-07-28 17:29:44 +02002115define gb_LinkTarget__use_wpg
David Tardonc51a2542013-05-24 14:53:37 +02002116$(call gb_LinkTarget_set_include,$(1),\
2117 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2118 $$(INCLUDE) \
2119)
David Tardonc868a0c2014-12-23 18:37:54 +01002120$(call gb_LinkTarget_use_libraries,$(1),\
2121 wpg \
Michael Stahl53b7bdc2012-10-05 17:19:47 +02002122)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002123
2124endef
David Tardonc868a0c2014-12-23 18:37:54 +01002125
2126else # !MSC
2127
2128$(eval $(call gb_Helper_register_packages_for_install,ooo, \
2129 libwpg \
2130))
2131
2132define gb_LinkTarget__use_wpg
2133$(call gb_LinkTarget_use_package,$(1),libwpg)
2134
2135$(call gb_LinkTarget_set_include,$(1),\
2136 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2137 $$(INCLUDE) \
2138)
2139$(call gb_LinkTarget_add_libs,$(1),\
2140 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2141)
Michael Stahl2b7536a2012-10-05 21:17:25 +02002142
2143endef
Matúš Kukanc6a63952011-07-28 17:29:44 +02002144
David Tardonc868a0c2014-12-23 18:37:54 +01002145endif # MSC
2146
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01002147endif # SYSTEM_WPG
Matúš Kukanc6a63952011-07-28 17:29:44 +02002148
2149
Michael Stahle3abec32014-02-11 15:57:18 +01002150ifneq ($(SYSTEM_WPS),)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002151
2152define gb_LinkTarget__use_wps
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002153$(call gb_LinkTarget_set_include,$(1),\
2154 $$(INCLUDE) \
Fridrich Štrbae991bba2011-10-05 10:18:53 +02002155 $(WPS_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002156)
Fridrich Štrbae991bba2011-10-05 10:18:53 +02002157$(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02002158
2159endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02002160gb_ExternalProject__use_wps :=
Matúš Kukanc6a63952011-07-28 17:29:44 +02002161
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01002162else # !SYSTEM_WPS
Matúš Kukanc6a63952011-07-28 17:29:44 +02002163
David Tardonf85d10f2014-05-30 15:35:48 +02002164ifeq ($(COM),MSC)
2165
2166$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2167 wps \
2168))
2169
Matúš Kukanc6a63952011-07-28 17:29:44 +02002170define gb_LinkTarget__use_wps
David Tardon6f9d8212013-05-24 14:58:31 +02002171$(call gb_LinkTarget_set_include,$(1),\
2172 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2173 $$(INCLUDE) \
2174)
David Tardonf85d10f2014-05-30 15:35:48 +02002175
2176$(call gb_LinkTarget_use_libraries,$(1),\
2177 wps \
Fridrich Štrba8c07bd32013-04-19 12:06:58 +02002178)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002179
2180endef
David Tardonf85d10f2014-05-30 15:35:48 +02002181
2182else # !MSC
2183
2184$(eval $(call gb_Helper_register_packages_for_install,ooo, \
2185 libwps \
2186))
2187
2188define gb_LinkTarget__use_wps
2189$(call gb_LinkTarget_use_package,$(1),libwps)
2190
2191$(call gb_LinkTarget_set_include,$(1),\
2192 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2193 $$(INCLUDE) \
2194)
2195$(call gb_LinkTarget_add_libs,$(1),\
osnolaf9568332015-05-18 10:21:10 +02002196 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
David Tardonf85d10f2014-05-30 15:35:48 +02002197)
Michael Stahl2b7536a2012-10-05 21:17:25 +02002198
2199endef
Matúš Kukanc6a63952011-07-28 17:29:44 +02002200
David Tardonf85d10f2014-05-30 15:35:48 +02002201endif # MSC
2202
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01002203endif # SYSTEM_WPS
Matúš Kukanc6a63952011-07-28 17:29:44 +02002204
2205
Michael Stahle3abec32014-02-11 15:57:18 +01002206ifneq ($(SYSTEM_MWAW),)
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002207
2208define gb_LinkTarget__use_mwaw
2209$(call gb_LinkTarget_set_include,$(1),\
2210 $$(INCLUDE) \
2211 $(MWAW_CFLAGS) \
2212)
2213$(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2214
2215endef
2216
2217else # !SYSTEM_MWAW
2218
David Tardon79211c12014-05-30 13:55:20 +02002219ifeq ($(COM),MSC)
2220
2221$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2222 mwaw \
2223))
2224
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002225define gb_LinkTarget__use_mwaw
Michael Stahlff718952013-05-16 13:11:36 +02002226$(call gb_LinkTarget_set_include,$(1),\
2227 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2228 $$(INCLUDE) \
2229)
David Tardon79211c12014-05-30 13:55:20 +02002230
2231$(call gb_LinkTarget_use_libraries,$(1),\
2232 mwaw \
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002233)
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002234
2235endef
2236
David Tardon79211c12014-05-30 13:55:20 +02002237else # !MSC
2238
2239$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2240 libmwaw \
2241))
2242
2243define gb_LinkTarget__use_mwaw
2244$(call gb_LinkTarget_use_package,$(1),libmwaw)
2245
2246$(call gb_LinkTarget_set_include,$(1),\
2247 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2248 $$(INCLUDE) \
2249)
2250$(call gb_LinkTarget_add_libs,$(1),\
2251 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2252)
2253
2254endef
2255
2256endif # MSC
2257
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002258endif # SYSTEM_MWAW
2259
osnola1faae1f2016-08-10 12:43:56 +02002260ifneq ($(SYSTEM_STAROFFICE),)
2261
2262define gb_LinkTarget__use_staroffice
2263$(call gb_LinkTarget_set_include,$(1),\
2264 $$(INCLUDE) \
2265 $(STAROFFICE_CFLAGS) \
2266)
2267$(call gb_LinkTarget_add_libs,$(1),$(STAROFFICE_LIBS))
2268
2269endef
2270
2271else # !SYSTEM_STAROFFICE
2272
2273ifeq ($(COM),MSC)
2274
2275$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2276 staroffice \
2277))
2278
2279define gb_LinkTarget__use_staroffice
2280$(call gb_LinkTarget_set_include,$(1),\
2281 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2282 $$(INCLUDE) \
2283)
2284
2285$(call gb_LinkTarget_use_libraries,$(1),\
2286 staroffice \
2287)
2288
2289endef
2290
2291else # !MSC
2292
2293$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2294 libstaroffice \
2295))
2296
2297define gb_LinkTarget__use_staroffice
2298$(call gb_LinkTarget_use_package,$(1),libstaroffice)
2299
2300$(call gb_LinkTarget_set_include,$(1),\
2301 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2302 $$(INCLUDE) \
2303)
2304$(call gb_LinkTarget_add_libs,$(1),\
2305 -L$(call gb_UnpackedTarball_get_dir,libstaroffice)/src/lib/.libs -lstaroffice-0.0 \
2306)
2307
2308endef
2309
2310endif # MSC
2311
2312endif # SYSTEM_STAROFFICE
2313
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002314
Michael Stahle3abec32014-02-11 15:57:18 +01002315ifneq ($(SYSTEM_LCMS2),)
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002316
2317define gb_LinkTarget__use_lcms2
2318$(call gb_LinkTarget_set_include,$(1),\
2319 $$(INCLUDE) \
Peter Foleyf7452122012-11-04 08:46:44 -05002320 $(LCMS2_CFLAGS) \
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002321)
2322$(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2323
2324endef
2325
Peter Foley8905c0e2012-11-08 21:00:30 -05002326gb_ExternalProject__use_lcms2 :=
2327
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002328else # !SYSTEM_LCMS2
2329
Michael Stahl32a617d2014-02-17 11:23:19 +01002330$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2331 lcms2 \
2332))
2333
Peter Foley8905c0e2012-11-08 21:00:30 -05002334define gb_ExternalProject__use_lcms2
2335$(call gb_ExternalProject_use_package,$(1),lcms2)
2336
2337endef
2338
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03002339ifeq ($(OS),ANDROID)
2340
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03002341define gb_LinkTarget__use_lcms2
Christian Lohmaier3dee92e2012-11-13 19:44:44 +01002342$(call gb_LinkTarget_use_package,$(1),lcms2)
Matúš Kukan3790e842012-09-04 22:00:15 +02002343$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002344 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
Matúš Kukan3790e842012-09-04 22:00:15 +02002345 $$(INCLUDE) \
2346)
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03002347
2348endef
2349
2350else
2351
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002352define gb_LinkTarget__use_lcms2
Christian Lohmaier3dee92e2012-11-13 19:44:44 +01002353$(call gb_LinkTarget_use_package,$(1),lcms2)
Matúš Kukan3790e842012-09-04 22:00:15 +02002354$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002355 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
Matúš Kukan3790e842012-09-04 22:00:15 +02002356 $$(INCLUDE) \
2357)
Michael Stahl25f65f22013-10-23 22:04:36 +02002358$(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002359
2360endef
2361
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03002362endif # ANDROID
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002363endif # SYSTEM_LCMS2
2364
Matúš Kukan8dc394d2014-03-31 19:36:41 +02002365ifneq ($(ENABLE_LPSOLVE),)
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002366
Michael Stahlab586f12014-02-11 19:25:30 +01002367ifneq ($(SYSTEM_LPSOLVE),)
Matúš Kukanc4560482011-07-28 01:03:23 +02002368
Peter Foley085346f2012-11-03 19:19:30 -04002369define gb_LinkTarget__use_lpsolve
Matúš Kukanc4560482011-07-28 01:03:23 +02002370$(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
Peter Foley085346f2012-11-03 19:19:30 -04002371$(call gb_LinkTarget_add_defs,$(1),\
2372 -DSYSTEM_LPSOLVE \
Peter Foley29d5e292012-11-07 18:18:08 -05002373)
Matúš Kukanc4560482011-07-28 01:03:23 +02002374
2375endef
2376
2377else # !SYSTEM_LPSOLVE
2378
Peter Foley085346f2012-11-03 19:19:30 -04002379define gb_LinkTarget__use_lpsolve
Michael Stahl53b381e2016-12-09 17:23:11 +01002380$(call gb_LinkTarget_use_external_project,$(1),lpsolve)
Michael Stahlb7d8ca82013-10-24 01:25:59 +02002381ifeq ($(COM),MSC)
2382$(call gb_LinkTarget_add_libs,$(1),\
2383 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2384)
2385else
Michael Stahlb177b302013-10-23 21:33:51 +02002386$(call gb_LinkTarget_add_libs,$(1),\
2387 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
Matúš Kukanc4560482011-07-28 01:03:23 +02002388)
Michael Stahlb7d8ca82013-10-24 01:25:59 +02002389endif
Peter Foley085346f2012-11-03 19:19:30 -04002390$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002391 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
Peter Foley085346f2012-11-03 19:19:30 -04002392 $$(INCLUDE) \
2393)
Matúš Kukanc4560482011-07-28 01:03:23 +02002394
2395endef
2396
Matúš Kukan083fa762014-02-27 17:08:09 +01002397$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2398 lpsolve \
2399))
2400
Matúš Kukanc4560482011-07-28 01:03:23 +02002401endif # SYSTEM_LPSOLVE
Matúš Kukan4f7b9682014-02-28 10:39:19 +01002402
Matúš Kukan077bdc72014-03-27 14:51:46 +01002403else
2404
2405gb_LinkTarget__use_lpsolve :=
2406
Matúš Kukan8dc394d2014-03-31 19:36:41 +02002407endif # ENABLE_LPSOLVE
2408
2409ifneq ($(ENABLE_COINMP),)
Matúš Kukan4f7b9682014-02-28 10:39:19 +01002410
Rene Engelhardd85f5132014-08-06 00:03:21 +02002411ifneq ($(SYSTEM_COINMP),TRUE)
2412
Matúš Kukan4f7b9682014-02-28 10:39:19 +01002413define gb_LinkTarget__use_coinmp
2414$(call gb_LinkTarget_use_package,$(1),coinmp)
2415ifeq ($(COM),MSC)
2416$(call gb_LinkTarget_add_libs,$(1),\
David Ostrovsky152e2a22014-11-30 18:26:01 +01002417 $(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 +01002418)
2419else
2420$(call gb_LinkTarget_add_libs,$(1),\
2421 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2422 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2423 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2424 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2425 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2426 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2427 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2428)
2429endif
2430$(call gb_LinkTarget_set_include,$(1),\
2431 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
Caolán McNamara67b4b342014-06-06 14:32:09 +01002432 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
Matúš Kukan4f7b9682014-02-28 10:39:19 +01002433 $$(INCLUDE) \
2434)
2435
2436endef
2437
2438$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2439 coinmp \
2440))
2441
Rene Engelhardd85f5132014-08-06 00:03:21 +02002442else # SYSTEM_COINMP
2443
2444define gb_LinkTarget__use_coinmp
2445$(call gb_LinkTarget_set_include,$(1),\
2446 $$(INCLUDE) \
2447 $(COINMP_CFLAGS) \
2448)
2449$(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2450
2451endef
2452
2453endif
2454
Matúš Kukan077bdc72014-03-27 14:51:46 +01002455else
2456
2457gb_LinkTarget__use_coinmp :=
2458
Matúš Kukan8dc394d2014-03-31 19:36:41 +02002459endif # ENABLE_COINMP
Matúš Kukanc4560482011-07-28 01:03:23 +02002460
Michael Stahl9ec0e6d2015-11-27 23:54:40 +01002461ifneq (,$(filter MDNSRESPONDER,$(BUILD_TYPE)))
2462
2463define gb_LinkTarget__use_mDNSResponder
2464$(call gb_LinkTarget_set_include,$(1),\
2465 -I$(call gb_UnpackedTarball_get_dir,mDNSResponder)/mDNSShared \
2466 $$(INCLUDE) \
2467)
2468$(call gb_LinkTarget_use_static_libraries,$(1),mDNSResponder)
2469endef
2470
2471endif # MDNSRESPONDER
2472
Caolán McNamaraaabc73d2012-08-30 13:58:15 +01002473ifeq ($(ENABLE_GIO),TRUE)
Matúš Kukanc4560482011-07-28 01:03:23 +02002474
Matúš Kukan464b4332012-01-15 02:12:49 +01002475define gb_LinkTarget__use_gio
2476$(call gb_LinkTarget_set_include,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +01002477 $$(INCLUDE) \
Caolán McNamara1ac9ccf2012-01-16 08:57:38 +00002478 $(GIO_CFLAGS) \
Matúš Kukan464b4332012-01-15 02:12:49 +01002479)
2480
2481$(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2482
2483endef
2484
Caolán McNamaraaabc73d2012-08-30 13:58:15 +01002485else # ENABLE_GIO
2486
2487define gb_LinkTarget__use_gio
Caolán McNamara1e98bb42012-11-06 20:09:57 +00002488
Caolán McNamaraaabc73d2012-08-30 13:58:15 +01002489endef
2490
2491endif # ENABLE_GIO
2492
Siqid0419802013-07-24 11:16:31 +02002493ifeq ($(ENABLE_AVAHI),TRUE)
2494
2495define gb_LinkTarget__use_avahi
2496$(call gb_LinkTarget_set_include,$(1),\
2497 $$(INCLUDE) \
2498 $(AVAHI_CFLAGS) \
2499)
2500
2501$(call gb_LinkTarget_add_defs,$(1),\
2502 -DENABLE_AVAHI \
2503)
2504
2505$(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2506
2507endef
2508
2509else # ENABLE_AVAHI
2510
David Tardon9ce38ef2013-11-05 07:03:08 +01002511gb_LinkTarget__use_avahi :=
Siqid0419802013-07-24 11:16:31 +02002512
2513endif # ENABLE_AVAHI
2514
2515
Bjoern Michaelsene7cc9e02011-07-26 14:51:35 +02002516define gb_LinkTarget__use_gtk
2517$(call gb_LinkTarget_set_include,$(1),\
2518 $$(INCLUDE) \
2519 $(GTK_CFLAGS) \
2520)
2521
2522$(call gb_LinkTarget_add_libs,$(1),$(GTK_LIBS))
2523
David Tardonadb11052011-12-01 13:39:09 +01002524ifeq ($(ENABLE_GTK_PRINT),TRUE)
2525
2526$(call gb_LinkTarget_add_defs,$(1),-DENABLE_GTK_PRINT)
2527
2528$(call gb_LinkTarget_set_include,$(1),\
2529 $$(INCLUDE) \
2530 $(GTK_PRINT_CFLAGS) \
2531)
2532
2533$(call gb_LinkTarget_add_libs,$(1),$(GTK_PRINT_LIBS))
2534
2535endif
2536
Bjoern Michaelsene7cc9e02011-07-26 14:51:35 +02002537endef
Michael Stahl4a8919f2011-04-18 11:13:57 +00002538
Bjoern Michaelsen54dd3072011-07-26 15:15:41 +02002539define gb_LinkTarget__use_gthread
Rene Engelhardac3c7ba2012-11-06 20:38:47 +01002540$(call gb_LinkTarget_add_libs,$(1),$(GTHREAD_LIBS))
Bjoern Michaelsen54dd3072011-07-26 15:15:41 +02002541endef
2542
Caolán McNamara68ffb332012-09-14 11:31:50 +01002543ifeq ($(ENABLE_CUPS),TRUE)
2544
2545define gb_LinkTarget__use_cups
2546$(call gb_LinkTarget_add_defs,$(1),\
2547 -DENABLE_CUPS \
2548)
2549
2550$(call gb_LinkTarget_add_libs,$(1),\
2551 -lcups \
2552)
2553
2554endef
2555
2556else # ENABLE_CUPS
2557
2558define gb_LinkTarget__use_cups
2559
2560endef
2561
2562endif # ENABLE_DBUS
David Tardon1b717ce2011-11-02 13:00:48 +01002563
Caolán McNamara9ec0a3e2012-08-30 13:44:53 +01002564ifeq ($(ENABLE_DBUS),TRUE)
David Tardon1b717ce2011-11-02 13:00:48 +01002565
2566define gb_LinkTarget__use_dbus
2567$(call gb_LinkTarget_set_include,$(1),\
2568 $$(INCLUDE) \
2569 $(DBUS_CFLAGS) \
2570)
2571
David Tardon1b717ce2011-11-02 13:00:48 +01002572$(call gb_LinkTarget_add_libs,$(1),\
2573 $(DBUS_LIBS) \
2574)
2575
2576endef
2577
2578else # ENABLE_DBUS
2579
2580define gb_LinkTarget__use_dbus
2581
2582endef
2583
2584endif # ENABLE_DBUS
2585
2586
Bjoern Michaelsendd321062011-07-26 16:04:15 +02002587define gb_LinkTarget__use_dbusmenugtk
2588$(call gb_LinkTarget_set_include,$(1),\
2589 $$(INCLUDE) \
2590 $(DBUSMENUGTK_CFLAGS) \
2591)
2592
2593$(call gb_LinkTarget_add_libs,$(1),$(DBUSMENUGTK_LIBS))
2594
2595endef
2596
Eike Rathkea3a8b802012-03-16 22:14:54 +01002597
2598ifeq ($(ENABLE_TELEPATHY),TRUE)
2599
2600define gb_LinkTarget__use_telepathy
2601$(call gb_LinkTarget_set_include,$(1),\
2602 $$(INCLUDE) \
2603 $(TELEPATHY_CFLAGS) \
2604)
2605
Eike Rathkea3a8b802012-03-16 22:14:54 +01002606$(call gb_LinkTarget_add_libs,$(1),\
2607 $(TELEPATHY_LIBS) \
2608)
2609
2610endef
2611
2612else # !ENABLE_TELEPATHY
2613
Matúš Kukanfe327622012-08-09 00:15:52 +02002614gb_LinkTarget__use_telepathy :=
Eike Rathkea3a8b802012-03-16 22:14:54 +01002615
2616endif # ENABLE_TELEPATHY
2617
Michael Stahle3abec32014-02-11 15:57:18 +01002618ifneq ($(SYSTEM_LIBPNG),)
David Tardon6df9c472011-09-15 14:44:34 +02002619
2620define gb_LinkTarget__use_png
2621$(call gb_LinkTarget_set_include,$(1),\
2622 $$(INCLUDE) \
2623 $(LIBPNG_CFLAGS) \
2624)
2625
2626$(call gb_LinkTarget_add_libs,$(1),\
2627 $(LIBPNG_LIBS) \
2628)
2629
2630endef
2631
David Tardon5955e7b2016-11-03 13:58:29 +01002632gb_ExternalProject__use_png :=
2633
David Tardon6df9c472011-09-15 14:44:34 +02002634else # !SYSTEM_LIBPNG
2635
David Tardon6df9c472011-09-15 14:44:34 +02002636define gb_LinkTarget__use_png
Michael Stahl416b3212013-05-08 17:22:22 +02002637$(call gb_LinkTarget_set_include,$(1),\
2638 $(LIBPNG_CFLAGS) \
2639 $$(INCLUDE) \
2640)
Matúš Kukanf96d58b2012-09-08 18:13:20 +02002641$(call gb_LinkTarget_use_static_libraries,$(1),\
David Tardon6df9c472011-09-15 14:44:34 +02002642 png \
2643)
Michael Stahl398ce442012-09-28 21:47:29 +02002644$(call gb_LinkTarget__use_zlib,$(1))
David Tardon6df9c472011-09-15 14:44:34 +02002645
2646endef
2647
David Tardon5955e7b2016-11-03 13:58:29 +01002648define gb_ExternalProject__use_png
2649$(call gb_ExternalProject_use_static_libraries,$(1),\
2650 png \
2651)
2652
2653endef
2654
David Tardon6df9c472011-09-15 14:44:34 +02002655endif # !SYSTEM_LIBPNG
2656
Michael Stahl50471a82011-12-06 19:17:52 +01002657
Michael Stahle3abec32014-02-11 15:57:18 +01002658ifneq ($(SYSTEM_CURL),)
Michael Stahl50471a82011-12-06 19:17:52 +01002659
2660define gb_LinkTarget__use_curl
Cédric Bosdonnat89361fa2014-07-16 17:02:01 +02002661$(call gb_LinkTarget_add_defs,$(1),\
2662 -DSYSTEM_CURL \
2663)
Michael Stahl50471a82011-12-06 19:17:52 +01002664$(call gb_LinkTarget_set_include,$(1),\
2665 $$(INCLUDE) \
2666 $(CURL_CFLAGS) \
2667)
2668$(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2669
2670endef
2671
2672else # !SYSTEM_CURL
2673
Michael Stahl32a617d2014-02-17 11:23:19 +01002674$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2675 curl \
2676))
2677
Michael Stahl50471a82011-12-06 19:17:52 +01002678define gb_LinkTarget__use_curl
Christian Lohmaier3dee92e2012-11-13 19:44:44 +01002679$(call gb_LinkTarget_use_package,$(1),curl)
Matúš Kukan9f3a3ab2012-10-29 22:57:34 +01002680$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002681 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
Matúš Kukan9f3a3ab2012-10-29 22:57:34 +01002682 $$(INCLUDE) \
2683)
Michael Stahl936a1a92013-10-23 22:37:11 +02002684
2685ifeq ($(COM),MSC)
Michael Stahl714b93b2013-10-24 00:32:04 +02002686$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahl548da052014-06-02 01:35:41 +02002687 $(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 +01002688)
Michael Stahl936a1a92013-10-23 22:37:11 +02002689else
2690$(call gb_LinkTarget_add_libs,$(1),\
2691 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2692)
2693endif
Michael Stahl50471a82011-12-06 19:17:52 +01002694
2695endef
2696
2697endif # SYSTEM_CURL
2698
Stephan Bergmann49313b02012-11-27 15:35:02 +01002699ifeq ($(ENABLE_VALGRIND),TRUE)
David Tardon3446cda2011-12-23 12:21:19 +01002700
2701define gb_LinkTarget__use_valgrind
2702$(call gb_LinkTarget_add_defs,$(1),\
Stephan Bergmann49313b02012-11-27 15:35:02 +01002703 -DHAVE_VALGRIND_HEADERS \
David Tardon3446cda2011-12-23 12:21:19 +01002704)
2705
2706$(call gb_LinkTarget_set_include,$(1),\
2707 $$(INCLUDE) \
2708 $(VALGRIND_CFLAGS) \
2709)
2710
2711endef
2712
Stephan Bergmann49313b02012-11-27 15:35:02 +01002713else # !ENABLE_VALGRIND
David Tardon3446cda2011-12-23 12:21:19 +01002714
2715define gb_LinkTarget__use_valgrind
2716
2717endef
2718
Stephan Bergmann49313b02012-11-27 15:35:02 +01002719endif # ENABLE_VALGRIND
David Tardon3446cda2011-12-23 12:21:19 +01002720
Michael Stahl32db4992014-02-11 19:35:22 +01002721ifneq ($(SYSTEM_POPPLER),)
David Tardondba2d322012-02-18 18:54:35 +01002722
2723define gb_LinkTarget__use_poppler
David Tardondba2d322012-02-18 18:54:35 +01002724$(call gb_LinkTarget_set_include,$(1),\
2725 $(POPPLER_CFLAGS) \
2726 $$(INCLUDE) \
2727)
2728
2729$(call gb_LinkTarget_add_libs,$(1),\
2730 $(POPPLER_LIBS) \
2731)
2732
2733endef
2734
2735else # !SYSTEM_POPPLER
2736
David Tardondba2d322012-02-18 18:54:35 +01002737define gb_LinkTarget__use_poppler
David Tardoncad68c62015-09-29 18:09:16 +02002738$(call gb_LinkTarget_use_external_project,$(1),poppler,full)
Peter Foleyfb1d11d2013-02-17 09:26:01 -05002739
David Tardon548b61a2012-02-21 06:58:02 +01002740$(call gb_LinkTarget_set_include,$(1),\
Fridrich Štrbaeb276d12013-07-08 14:01:17 +02002741 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2742 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2743 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
David Tardon548b61a2012-02-21 06:58:02 +01002744 $$(INCLUDE) \
David Tardondba2d322012-02-18 18:54:35 +01002745)
2746
Michael Stahl2f6261f2013-09-19 19:28:36 +02002747$(call gb_LinkTarget_add_libs,$(1),\
2748 $(call gb_UnpackedTarball_get_dir,poppler)/fofi/.libs/libfofi$(gb_StaticLibrary_PLAINEXT) \
2749 $(call gb_UnpackedTarball_get_dir,poppler)/goo/.libs/libgoo$(gb_StaticLibrary_PLAINEXT) \
2750 $(call gb_UnpackedTarball_get_dir,poppler)/poppler/.libs/libpoppler$(gb_StaticLibrary_PLAINEXT) \
David Tardon548b61a2012-02-21 06:58:02 +01002751)
2752
Michael Stahl43532a02016-11-03 15:58:08 +01002753$(call gb_LinkTarget_use_external,$(1),jpeg)
2754
David Tardon548b61a2012-02-21 06:58:02 +01002755ifeq ($(OS),MACOSX)
Michael Stahl967986b2012-09-28 00:54:49 +02002756$(call gb_LinkTarget_add_libs,$(1),\
2757 -lobjc \
David Tardon548b61a2012-02-21 06:58:02 +01002758)
Caolán McNamara0d5cc8c2014-08-30 15:12:53 +01002759else ifeq ($(OS),LINUX)
2760$(call gb_LinkTarget_add_libs,$(1),\
2761 -pthread \
2762)
David Tardon548b61a2012-02-21 06:58:02 +01002763else ifeq ($(OS),WNT)
Michael Stahldc397aae2012-09-28 15:31:46 +02002764$(call gb_LinkTarget_use_system_win32_libs,$(1),\
David Tardon548b61a2012-02-21 06:58:02 +01002765 advapi32 \
2766 gdi32 \
2767)
2768endif
2769
David Tardondba2d322012-02-18 18:54:35 +01002770endef
2771
2772endif # SYSTEM_POPPLER
2773
David Tardon3446cda2011-12-23 12:21:19 +01002774
Michael Stahl46648152014-02-11 16:33:18 +01002775ifneq ($(SYSTEM_CLUCENE),)
David Tardon22c60cb2012-04-07 15:50:47 +02002776
2777define gb_LinkTarget__use_clucene
2778$(call gb_LinkTarget_add_defs,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02002779 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
David Tardon22c60cb2012-04-07 15:50:47 +02002780)
2781
2782$(call gb_LinkTarget_set_include,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02002783 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
David Tardon22c60cb2012-04-07 15:50:47 +02002784 $$(INCLUDE) \
2785)
2786
2787$(call gb_LinkTarget_add_libs,$(1),\
2788 $(CLUCENE_LIBS) \
2789)
2790
2791endef
2792
2793else # !SYSTEM_CLUCENE
2794
2795define gb_LinkTarget__use_clucene
Michael Stahl28cde0c2013-05-07 23:47:27 +02002796$(call gb_LinkTarget_set_include,$(1),\
2797 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2798 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2799 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2800 $$(INCLUDE) \
2801)
2802
Michael Stahlc923f7d2012-04-07 23:22:08 +02002803$(call gb_LinkTarget_use_libraries,$(1),\
David Tardon22c60cb2012-04-07 15:50:47 +02002804 clucene \
2805)
2806
2807endef
2808
Marcos Paulo de Souzaf70343b2014-02-12 06:53:02 -02002809$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
David Tardon22c60cb2012-04-07 15:50:47 +02002810 clucene \
2811))
2812
2813endif # SYSTEM_CLUCENE
2814
Peter Foley64402842011-12-22 16:34:35 -05002815define gb_LinkTarget__use_gobject
Rene Engelhardac3c7ba2012-11-06 20:38:47 +01002816$(call gb_LinkTarget_add_libs,$(1),\
2817 $(GOBJECT_LIBS) \
2818)
2819
2820$(call gb_LinkTarget_set_include,$(1),\
2821 $$(INCLUDE) \
2822 $(GOBJECT_CFLAGS) \
2823)
Peter Foley64402842011-12-22 16:34:35 -05002824endef
2825
Michael Stahl5866b332014-02-11 18:56:33 +01002826ifneq ($(SYSTEM_HSQLDB),)
David Tardon579f52d2012-03-27 16:36:31 +02002827
2828define gb_LinkTarget__use_hsqldb
2829
2830$(call gb_LinkTarget_add_defs,$(1),\
2831 -DSYSTEM_HSQLDB \
2832 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2833)
2834
2835endef
2836
2837else # !SYSTEM_HSQLDB
2838
2839define gb_LinkTarget__use_hsqldb
2840
2841endef
2842
2843endif # SYSTEM_HSQLDB
2844
David Tardon8bc7afb2012-04-05 10:53:08 +02002845
Michael Stahl5378dea2014-02-11 19:11:47 +01002846ifneq ($(SYSTEM_OPENLDAP),)
Michael Stahle0ee0d42012-07-16 19:00:07 +02002847
2848define gb_LinkTarget__use_openldap
2849
2850$(call gb_LinkTarget_add_libs,$(1),\
2851 -lldap \
2852 -llber \
2853)
2854
2855endef
2856
Michael Stahl2f6261f2013-09-19 19:28:36 +02002857gb_ExternalProject__use_openldap :=
2858
Michael Stahl5378dea2014-02-11 19:11:47 +01002859else # !SYSTEM_OPENLDAP
Michael Stahle0ee0d42012-07-16 19:00:07 +02002860
Michael Stahle0ee0d42012-07-16 19:00:07 +02002861define gb_LinkTarget__use_openldap
Matúš Kukan7a030392012-10-29 23:29:37 +01002862$(call gb_LinkTarget_use_unpacked,$(1),openldap)
Michael Stahle0ee0d42012-07-16 19:00:07 +02002863$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002864 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
Michael Stahle0ee0d42012-07-16 19:00:07 +02002865 $$(INCLUDE) \
2866)
Stephan Bergmann6b4c4352015-10-09 09:21:48 +02002867$(call gb_LinkTarget_use_external_project,$(1),openldap,full)
Michael Stahl2f6261f2013-09-19 19:28:36 +02002868$(call gb_LinkTarget_add_libs,$(1), \
2869 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2870 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
Michael Stahle0ee0d42012-07-16 19:00:07 +02002871)
2872
2873endef
2874
Michael Stahl2f6261f2013-09-19 19:28:36 +02002875define gb_ExternalProject__use_openldap
2876$(call gb_ExternalProject_use_external_project,$(1),openldap)
2877
2878endef
2879
Michael Stahle0ee0d42012-07-16 19:00:07 +02002880endif # SYSTEM_OPENLDAP
2881
Wastack45f42682016-07-28 17:16:19 +02002882ifneq ($(SYSTEM_LIBTOMMATH),)
2883
2884define gb_LinkTarget__use_libtommath
2885$(call gb_LinkTarget_set_include,$(1),\
2886 $(LIBTOMMATH_CFLAGS) \
2887 $$(INCLUDE) \
2888)
2889$(call gb_LinkTarget_add_libs,$(1),$(LIBTOMMATH_LIBS))
2890
2891endef
2892
2893else # !SYSTEM_LIBTOMMATH
2894define gb_LinkTarget__use_libtommath
2895$(call gb_LinkTarget_set_include,$(1),\
2896 -I${WORKDIR}/UnpackedTarball/libtommath \
2897 $$(INCLUDE) \
2898)
2899$(call gb_LinkTarget_add_libs,$(1),\
2900 $(call gb_UnpackedTarball_get_dir,libtommath)/libtommath$(gb_StaticLibrary_PLAINEXT) \
2901)
2902$(call gb_LinkTarget_use_external_project,$(1),libtommath)
2903
2904endef
2905
2906endif # SYSTEM_LIBTOMMATH
2907
2908define gb_ExternalProject__use_libtommath
2909$(call gb_ExternalProject_use_external_project,$(1),libtommath)
2910
2911endef
Michael Stahle0ee0d42012-07-16 19:00:07 +02002912
Javier Fernandezf53228c2013-05-10 18:21:30 +00002913ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2914
Michael Stahl23647592014-02-11 19:04:20 +01002915ifneq ($(SYSTEM_FIREBIRD),)
Javier Fernandezf53228c2013-05-10 18:21:30 +00002916
Rene Engelhard0b68d702013-07-16 21:50:14 +02002917define gb_LinkTarget__use_libfbembed
Javier Fernandezf53228c2013-05-10 18:21:30 +00002918$(call gb_LinkTarget_set_include,$(1),\
2919 $(FIREBIRD_CFLAGS) \
2920 $$(INCLUDE) \
2921)
2922$(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
2923
2924endef
2925
Javier Fernandezf53228c2013-05-10 18:21:30 +00002926else # !SYSTEM_FIREBIRD
2927
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +01002928#$(call gb_LinkTarget__use_libatomic_ops,$(1))
Wastack45f42682016-07-28 17:16:19 +02002929#$(call gb_LinkTarget__use_libtommath,$(1))
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +01002930
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +01002931define gb_LinkTarget__use_libfbembed
2932$(call gb_LinkTarget_use_package,$(1),firebird)
Javier Fernandezf53228c2013-05-10 18:21:30 +00002933$(call gb_LinkTarget_set_include,$(1),\
Stephan Bergmann416c5522016-10-17 08:39:09 +02002934 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/include \
Javier Fernandezf53228c2013-05-10 18:21:30 +00002935 $$(INCLUDE) \
2936)
Michael Stahl37563db2013-10-22 22:22:49 +02002937ifeq ($(COM),MSC)
2938$(call gb_LinkTarget_add_libs,$(1),\
Stephan Bergmann416c5522016-10-17 08:39:09 +02002939 $(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/bin/ifbclient.lib \
Javier Fernandezf53228c2013-05-10 18:21:30 +00002940)
Michael Stahl37563db2013-10-22 22:22:49 +02002941else
2942$(call gb_LinkTarget_add_libs,$(1),\
Stephan Bergmann416c5522016-10-17 08:39:09 +02002943 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib -lfbclient \
Michael Stahl37563db2013-10-22 22:22:49 +02002944)
2945endif
Javier Fernandezf53228c2013-05-10 18:21:30 +00002946
2947endef
2948
Javier Fernandezf53228c2013-05-10 18:21:30 +00002949
2950# endef
2951
2952endif # SYSTEM_FIREBIRD
2953
2954else # !ENABLE_FIREBIRD_SDBC
Michael Stahl6fa0b372014-02-12 17:01:35 +01002955
Javier Fernandezf53228c2013-05-10 18:21:30 +00002956gb_LinkTarget__use_firebird :=
2957# gb_LinkTarget__use_atomic_ops :=
Wastack45f42682016-07-28 17:16:19 +02002958# gb_LinkTarget__use_libtommath :=
Javier Fernandezf53228c2013-05-10 18:21:30 +00002959
2960endif # ENABLE_FIREBIRD_SDBC
2961
2962
Michael Stahl5866b332014-02-11 18:56:33 +01002963ifneq ($(SYSTEM_POSTGRESQL),)
David Tardon8bc7afb2012-04-05 10:53:08 +02002964
2965define gb_LinkTarget__use_postgresql
2966
David Tardon8bc7afb2012-04-05 10:53:08 +02002967$(call gb_LinkTarget_set_include,$(1),\
2968 $(POSTGRESQL_INC) \
2969 $$(INCLUDE) \
2970)
2971
2972$(call gb_LinkTarget_add_libs,$(1),\
2973 -lpq \
2974)
2975
2976$(call gb_LinkTarget_add_ldflags,$(1),\
2977 $(POSTGRESQL_LIB) \
2978)
2979
2980endef
2981
2982else # !SYSTEM_POSTGRESQL
2983
2984define gb_LinkTarget__use_postgresql
2985
Michael Stahl2f6261f2013-09-19 19:28:36 +02002986$(call gb_LinkTarget_use_external_project,$(1),postgresql)
David Tardoncb9823b2012-10-22 06:33:00 +02002987
David Tardon8bc7afb2012-04-05 10:53:08 +02002988$(call gb_LinkTarget_set_include,$(1),\
Michael Stahlee8323e2013-05-08 00:19:40 +02002989 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
2990 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
David Tardon8bc7afb2012-04-05 10:53:08 +02002991 $$(INCLUDE) \
2992)
2993
Michael Stahl2f6261f2013-09-19 19:28:36 +02002994$(call gb_LinkTarget_add_libs,$(1),\
2995 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
David Tardon8bc7afb2012-04-05 10:53:08 +02002996)
2997
Tor Lillqvistc2909892012-12-12 01:07:09 +02002998ifeq ($(OS)$(COM),WNTMSC)
Matúš Kukan5e32d152012-05-27 00:21:12 +02002999$(call gb_LinkTarget_use_external,$(1),openssl)
3000
Michael Stahldc397aae2012-09-28 15:31:46 +02003001$(call gb_LinkTarget_use_system_win32_libs,$(1),\
David Tardon8bc7afb2012-04-05 10:53:08 +02003002 secur32 \
3003 ws2_32 \
David Tardon8bc7afb2012-04-05 10:53:08 +02003004)
David Tardon8af6aa62012-05-30 12:06:42 +02003005
David Tardon8bc7afb2012-04-05 10:53:08 +02003006endif
3007
3008endef
3009
David Tardon8bc7afb2012-04-05 10:53:08 +02003010endif # SYSTEM_POSTGRESQL
3011
David Tardond4efa8b2012-04-28 20:48:14 +02003012ifeq ($(ENABLE_KDE4),TRUE)
3013
3014define gb_LinkTarget__use_kde4
3015$(call gb_LinkTarget_set_include,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02003016 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS)))) \
David Tardond4efa8b2012-04-28 20:48:14 +02003017 $$(INCLUDE) \
3018)
3019
3020$(call gb_LinkTarget_add_defs,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02003021 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS))) \
David Tardond4efa8b2012-04-28 20:48:14 +02003022)
3023
3024$(call gb_LinkTarget_add_libs,$(1),\
3025 $(KDE4_LIBS) \
3026)
3027
David Tardond4efa8b2012-04-28 20:48:14 +02003028endef
3029
3030else # !ENABLE_KDE4
3031
3032define gb_LinkTarget__use_kde4
3033
3034endef
3035
3036endif # ENABLE_KDE4
3037
3038
Caolán McNamara9ec0a3e2012-08-30 13:44:53 +01003039ifeq ($(ENABLE_TDE),TRUE)
David Tardond4efa8b2012-04-28 20:48:14 +02003040
3041define gb_LinkTarget__use_tde
3042$(call gb_LinkTarget_add_libs,$(1),\
3043 $(TDE_LIBS) \
3044)
3045
3046$(call gb_LinkTarget_set_include,$(1),\
3047 $$(INCLUDE) \
3048 $(TDE_CFLAGS) \
3049)
3050endef
3051
3052else # ! ENABLE_TDE
3053
3054define gb_LinkTarget__use_tde
3055
3056endef
3057
3058endif # ENABLE_TDE
3059
3060
David Ostrovskye16ac692012-05-27 22:50:41 +02003061# PYTHON
Michael Stahl91926332012-11-27 15:50:53 +01003062# extra python_headers external because pyuno wrapper must not link python
Michael Stahl0443d0a2014-02-11 16:57:35 +01003063ifneq ($(SYSTEM_PYTHON),)
David Ostrovskye16ac692012-05-27 22:50:41 +02003064
Michael Stahl91926332012-11-27 15:50:53 +01003065define gb_LinkTarget__use_python_headers
David Ostrovskye16ac692012-05-27 22:50:41 +02003066$(call gb_LinkTarget_add_defs,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02003067 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYHTON_CFLAGS)))) \
David Ostrovskye16ac692012-05-27 22:50:41 +02003068)
3069
3070$(call gb_LinkTarget_set_include,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02003071 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
David Ostrovskye16ac692012-05-27 22:50:41 +02003072 $$(INCLUDE) \
3073)
3074
Michael Stahl91926332012-11-27 15:50:53 +01003075endef
3076
3077define gb_LinkTarget__use_python
3078$(call gb_LinkTarget__use_python_headers,$(1))
3079
David Ostrovskye16ac692012-05-27 22:50:41 +02003080$(call gb_LinkTarget_add_libs,$(1),\
3081 $(PYTHON_LIBS) \
3082)
3083
3084endef
3085
3086else # !SYSTEM_PYTHON
3087
Michael Stahl720ca8e2014-03-18 18:24:15 +01003088$(eval $(call gb_Helper_register_packages_for_install,python,\
3089 python3 \
3090))
3091
Michael Stahl91926332012-11-27 15:50:53 +01003092define gb_LinkTarget__use_python_headers
David Tardoncad68c62015-09-29 18:09:16 +02003093$(call gb_LinkTarget_use_external_project,$(1),python3,full)
Michael Stahl91926332012-11-27 15:50:53 +01003094$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02003095 -I$(call gb_UnpackedTarball_get_dir,python3) \
3096 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3097 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
Michael Stahl91926332012-11-27 15:50:53 +01003098 $$(INCLUDE) \
3099)
3100
3101endef
3102
David Ostrovskye16ac692012-05-27 22:50:41 +02003103define gb_LinkTarget__use_python
Michael Stahl91926332012-11-27 15:50:53 +01003104$(call gb_LinkTarget__use_python_headers,$(1))
Michael Stahld9162d22015-07-29 12:17:03 +02003105ifeq ($(OS),MACOSX)
3106$(call gb_LinkTarget_use_generated_package,$(1),python3)
3107else
Michael Stahl57dd4d02015-07-29 10:56:57 +02003108$(call gb_LinkTarget_use_package,$(1),python3)
Michael Stahld9162d22015-07-29 12:17:03 +02003109endif
David Ostrovskye16ac692012-05-27 22:50:41 +02003110
3111ifeq ($(OS),WNT)
3112$(call gb_LinkTarget_add_libs,$(1),\
David Ostrovskye04c7342016-02-27 14:14:12 +01003113 $(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 +02003114)
3115else ifeq ($(OS),MACOSX)
3116$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahl9d921ba2012-11-27 15:32:36 +01003117 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
David Ostrovskye16ac692012-05-27 22:50:41 +02003118)
3119else
Michael Stahlb6bcbb62013-04-21 14:34:50 +02003120$(call gb_LinkTarget_add_libs,$(1),\
3121 -L$(call gb_UnpackedTarball_get_dir,python3) \
3122 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
David Ostrovskye16ac692012-05-27 22:50:41 +02003123)
3124endif
3125
David Ostrovskye16ac692012-05-27 22:50:41 +02003126endef
3127
David Ostrovskye16ac692012-05-27 22:50:41 +02003128endif # SYSTEM_PYTHON
3129
Kohei Yoshida49b0b692012-09-04 15:05:35 -04003130# ORCUS
Kohei Yoshida02346aa2013-09-18 19:06:20 -04003131ifeq ($(ENABLE_ORCUS),TRUE)
3132
Michael Stahle3abec32014-02-11 15:57:18 +01003133ifneq ($(SYSTEM_LIBORCUS),)
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003134
3135define gb_LinkTarget__use_orcus
3136$(call gb_LinkTarget_set_include,$(1),\
3137 $$(INCLUDE) \
Matúš Kukana2d63fe2012-09-09 16:29:10 +02003138 $(ORCUS_CFLAGS) \
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003139)
Rene Engelhard26b80fc2013-04-13 19:29:33 +02003140$(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
Rene Engelhardfb360f52013-04-13 16:17:29 +02003141endef
3142
3143define gb_LinkTarget__use_orcus-parser
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003144
3145endef
3146
Kohei Yoshida31f589b2012-08-30 23:26:59 -04003147else # !SYSTEM_LIBORCUS
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003148
David Tardonedb38d72015-06-04 16:09:48 +02003149ifeq ($(COM),MSC)
3150
3151$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3152 orcus \
3153 orcus-parser \
3154))
3155
Kohei Yoshidac8b7e982012-08-31 10:11:32 -04003156define gb_LinkTarget__use_orcus
Matúš Kukan1ee76032012-09-09 15:29:43 +02003157$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl10fc13c2013-05-06 23:35:13 +02003158 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
Matúš Kukan1ee76032012-09-09 15:29:43 +02003159 $$(INCLUDE) \
3160)
David Tardonf1035c12012-11-23 06:49:21 +01003161
David Tardonedb38d72015-06-04 16:09:48 +02003162$(call gb_LinkTarget_use_libraries,$(1),\
3163 orcus \
Stephan Bergmann3743cdb2013-02-17 22:58:21 +01003164)
David Tardonf1035c12012-11-23 06:49:21 +01003165
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003166endef
3167
Kohei Yoshida4d9c2fb2013-04-11 23:11:21 -04003168define gb_LinkTarget__use_orcus-parser
Kohei Yoshidaecc884e2013-12-17 21:18:46 -05003169$(call gb_LinkTarget_set_include,$(1),\
3170 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3171 $$(INCLUDE) \
3172)
David Tardonedb38d72015-06-04 16:09:48 +02003173
3174$(call gb_LinkTarget_use_libraries,$(1),\
3175 orcus-parser \
Kohei Yoshida4d9c2fb2013-04-11 23:11:21 -04003176)
3177
3178endef
3179
David Tardonedb38d72015-06-04 16:09:48 +02003180else # !MSC
3181
3182$(eval $(call gb_Helper_register_packages_for_install,ooo,\
3183 liborcus \
3184))
3185
3186define gb_LinkTarget__use_orcus
3187$(call gb_LinkTarget_use_package,$(1),liborcus)
3188
3189$(call gb_LinkTarget_set_include,$(1),\
3190 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3191 $$(INCLUDE) \
3192)
3193
3194$(call gb_LinkTarget_add_libs,$(1),\
Jaskaran Singh92be10c2016-06-24 19:53:11 +05303195 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.12 \
David Tardonedb38d72015-06-04 16:09:48 +02003196)
3197
3198$(if $(SYSTEM_BOOST), \
3199 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3200 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3201)
3202
3203endef
3204
3205define gb_LinkTarget__use_orcus-parser
3206$(call gb_LinkTarget_use_package,$(1),liborcus)
3207
3208$(call gb_LinkTarget_set_include,$(1),\
3209 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3210 $$(INCLUDE) \
3211)
3212
3213$(call gb_LinkTarget_add_libs,$(1),\
Jaskaran Singh92be10c2016-06-24 19:53:11 +05303214 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.12 \
David Tardonedb38d72015-06-04 16:09:48 +02003215)
3216
3217endef
3218
3219endif # MSC
3220
Kohei Yoshida31f589b2012-08-30 23:26:59 -04003221endif # SYSTEM_LIBORCUS
David Ostrovskye16ac692012-05-27 22:50:41 +02003222
Kohei Yoshida02346aa2013-09-18 19:06:20 -04003223else # ENABLE_ORCUS != TRUE
3224
3225gb_LinkTarget__use_orcus :=
3226gb_LinkTarget__use_orcus-parser :=
3227
3228endif
Michael Stahl78b59b82012-09-27 21:45:47 +02003229
David Tardon49a4d362013-11-12 16:44:40 +01003230ifeq ($(ENABLE_EOT),TRUE)
3231
Michael Stahle3abec32014-02-11 15:57:18 +01003232ifneq ($(SYSTEM_LIBEOT),)
David Tardon49a4d362013-11-12 16:44:40 +01003233
3234define gb_LinkTarget__use_libeot
3235$(call gb_LinkTarget_set_include,$(1),\
3236 $$(INCLUDE) \
3237 $(LIBEOT_CFLAGS) \
3238)
3239$(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3240
3241endef
3242
3243gb_ExternalProject__use_libeot :=
3244
3245else # !SYSTEM_LIBEOT
3246
3247define gb_LinkTarget__use_libeot
3248$(call gb_LinkTarget_set_include,$(1),\
3249 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3250 $$(INCLUDE) \
3251)
3252$(call gb_LinkTarget_add_libs,$(1),\
3253 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3254)
3255$(call gb_LinkTarget_use_external_project,$(1),libeot)
3256
3257endef
3258
3259define gb_ExternalProject__use_libeot
3260$(call gb_ExternalProject_use_external_project,$(1),libeot)
3261
3262endef
3263
3264endif # SYSTEM_LIBEOT
3265
3266else # !ENABLE_EOT
3267
3268gb_LinkTarget__use_libeot :=
3269gb_ExternalProject__use_libeot :=
3270
3271endif # ENABLE_EOT
3272
Michael Stahl78b59b82012-09-27 21:45:47 +02003273### X11 stuff ###
3274
Samuel Mehrbrodtc29ea222015-09-18 14:12:08 +02003275ifeq ($(USING_X11), TRUE)
Michael Stahl78b59b82012-09-27 21:45:47 +02003276
Michael Stahl78b59b82012-09-27 21:45:47 +02003277define gb_LinkTarget__use_Xrandr
Michael Stahl78b59b82012-09-27 21:45:47 +02003278$(call gb_LinkTarget_set_include,$(1),\
3279 $$(INCLUDE) \
3280 $(XRANDR_CFLAGS) \
3281)
3282
3283$(call gb_LinkTarget_add_libs,$(1),\
3284 $(XRANDR_LIBS) \
3285)
3286endef
3287
Michael Stahl78b59b82012-09-27 21:45:47 +02003288define gb_LinkTarget__use_Xrender
Michael Stahl78b59b82012-09-27 21:45:47 +02003289$(call gb_LinkTarget_set_include,$(1),\
3290 $$(INCLUDE) \
3291 $(XRENDER_CFLAGS) \
3292)
3293
3294$(call gb_LinkTarget_add_libs,$(1),\
3295 $(XRENDER_LIBS) \
3296)
3297endef
3298
Samuel Mehrbrodtc29ea222015-09-18 14:12:08 +02003299endif # USING_X11
Michael Stahl78b59b82012-09-27 21:45:47 +02003300
Tor Lillqvist35491072011-08-02 21:22:35 +03003301
Michael Meeksb440cfc2013-02-28 12:05:07 +00003302gb_ExternalProject__use_nss3:=
3303
Tor Lillqvist3442b002014-08-12 16:50:17 +03003304ifeq ($(OS),ANDROID)
Tor Lillqvist9dc7f052012-08-13 09:19:35 +03003305
Peter Foleyc003d252013-01-01 09:39:36 -05003306gb_LinkTarget__use_nss3:=
Tor Lillqvist801408c2014-12-12 23:51:17 +02003307gb_LinkTarget__use_plc4:=
Tor Lillqvist9dc7f052012-08-13 09:19:35 +03003308
3309else
3310
Michael Stahle3abec32014-02-11 15:57:18 +01003311ifneq ($(SYSTEM_NSS),)
David Tardonb6aa4842011-08-11 13:10:14 +02003312
David Tardon2b9dbc82012-08-13 06:57:51 +02003313define gb_LinkTarget__use_nss3
3314$(call gb_LinkTarget_add_defs,$(1),\
Stephan Bergmannea641222012-11-19 16:40:33 +01003315 -DSYSTEM_NSS \
David Tardon2b9dbc82012-08-13 06:57:51 +02003316)
3317
David Tardonb6aa4842011-08-11 13:10:14 +02003318$(call gb_LinkTarget_set_include,$(1),\
3319 $$(INCLUDE) \
Tomas Chvatal75f77e62011-11-02 21:16:53 +01003320 $(NSS_CFLAGS) \
David Tardonb6aa4842011-08-11 13:10:14 +02003321)
3322
3323$(call gb_LinkTarget_add_libs,$(1),\
Tomas Chvatal75f77e62011-11-02 21:16:53 +01003324 $(NSS_LIBS) \
David Tardonb6aa4842011-08-11 13:10:14 +02003325)
Caolán McNamara24ae3ab2011-08-11 12:47:00 +01003326
David Tardonb6aa4842011-08-11 13:10:14 +02003327endef
3328
David Tardon2b9dbc82012-08-13 06:57:51 +02003329define gb_LinkTarget__use_plc4
3330$(call gb_LinkTarget__use_nss3,$(1))
3331
3332endef
3333
David Tardon6ef46562013-02-04 10:04:07 +01003334define gb_LinkTarget__use_ssl3
3335$(call gb_LinkTarget__use_nss3,$(1))
3336
3337endef
3338
Michael Stahle3abec32014-02-11 15:57:18 +01003339else # !SYSTEM_NSS
David Tardonb6aa4842011-08-11 13:10:14 +02003340
Michael Stahlffae67c2014-03-13 19:51:19 +01003341$(eval $(call gb_Helper_register_packages_for_install,ooo, \
3342 nss \
3343))
3344
David Tardon2b9dbc82012-08-13 06:57:51 +02003345define gb_LinkTarget__use_nss3
Peter Foleyc003d252013-01-01 09:39:36 -05003346$(call gb_LinkTarget_use_package,$(1),nss)
David Tardon2b9dbc82012-08-13 06:57:51 +02003347$(call gb_LinkTarget_set_include,$(1),\
3348 $$(INCLUDE) \
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003349 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3350 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
David Tardon2b9dbc82012-08-13 06:57:51 +02003351)
3352
Michael Stahld2f62c32013-10-23 00:14:01 +02003353ifeq ($(COM),MSC)
3354$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003355 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3356 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3357 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
David Tardon2b9dbc82012-08-13 06:57:51 +02003358)
Michael Stahld2f62c32013-10-23 00:14:01 +02003359else
3360$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003361 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
Michael Stahld2f62c32013-10-23 00:14:01 +02003362 -lnspr4 \
3363 -lnss3 \
3364 -lsmime3 \
3365)
3366endif
David Tardon2b9dbc82012-08-13 06:57:51 +02003367
3368endef
3369
Caolán McNamara24ae3ab2011-08-11 12:47:00 +01003370define gb_LinkTarget__use_plc4
Peter Foleyc003d252013-01-01 09:39:36 -05003371$(call gb_LinkTarget_use_package,$(1),nss)
Michael Stahld2f62c32013-10-23 00:14:01 +02003372ifeq ($(COM),MSC)
3373$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003374 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
David Tardonb6aa4842011-08-11 13:10:14 +02003375)
Michael Stahld2f62c32013-10-23 00:14:01 +02003376else
3377$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003378 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
Michael Stahld2f62c32013-10-23 00:14:01 +02003379)
3380endif
Caolán McNamara24ae3ab2011-08-11 12:47:00 +01003381
David Tardonb6aa4842011-08-11 13:10:14 +02003382endef
3383
David Tardon6ef46562013-02-04 10:04:07 +01003384define gb_LinkTarget__use_ssl3
3385$(call gb_LinkTarget_use_package,$(1),nss)
Michael Stahld2f62c32013-10-23 00:14:01 +02003386ifeq ($(COM),MSC)
3387$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003388 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
David Tardon6ef46562013-02-04 10:04:07 +01003389)
Michael Stahld2f62c32013-10-23 00:14:01 +02003390else
3391$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003392 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
Michael Stahld2f62c32013-10-23 00:14:01 +02003393)
3394endif
David Tardon6ef46562013-02-04 10:04:07 +01003395
3396endef
3397
Michael Meeksb440cfc2013-02-28 12:05:07 +00003398define gb_ExternalProject__use_nss3
3399$(call gb_ExternalProject_use_package,$(1),nss)
Michael Meeksb440cfc2013-02-28 12:05:07 +00003400
3401endef
3402
Michael Stahle3abec32014-02-11 15:57:18 +01003403endif # SYSTEM_NSS
3404
Tor Lillqvist9dc7f052012-08-13 09:19:35 +03003405endif # DESKTOP
David Tardonb6aa4842011-08-11 13:10:14 +02003406
Markus Mohrharda46ef632015-11-15 04:39:24 +01003407ifeq ($(ENABLE_BREAKPAD),TRUE)
3408
Markus Mohrharda46ef632015-11-15 04:39:24 +01003409define gb_LinkTarget__use_breakpad
3410$(call gb_LinkTarget_set_include,$(1),\
3411 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3412 $$(INCLUDE) \
3413)
3414
3415ifeq ($(COM),MSC)
Markus Mohrhardff9b7d12016-03-31 00:00:03 +02003416$(call gb_LinkTarget_use_static_libraries,$(1),\
3417 breakpad \
Markus Mohrharda46ef632015-11-15 04:39:24 +01003418)
3419else
3420$(call gb_LinkTarget_add_libs,$(1),\
3421 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3422)
3423endif
3424
3425$(call gb_LinkTarget_use_external_project,$(1),breakpad)
3426
Michael Stahlb4d3a0d2016-02-23 15:08:47 +01003427endef
3428
Markus Mohrhard133a5d872016-02-27 14:50:13 +01003429endif # ENABLE_BREAKPAD
Markus Mohrharda46ef632015-11-15 04:39:24 +01003430
Zolnai Tamás62fd6302014-04-18 12:55:56 +02003431ifeq ($(ENABLE_GLTF),TRUE)
3432
Rene Engelhard97bda8e2014-08-05 20:05:35 +02003433ifneq ($(SYSTEM_LIBGLTF),TRUE)
3434
Zolnai Tamás62fd6302014-04-18 12:55:56 +02003435define gb_LinkTarget__use_libgltf
3436$(call gb_LinkTarget_set_include,$(1),\
3437 -I$(call gb_UnpackedTarball_get_dir,libgltf)/inc \
3438 $$(INCLUDE) \
3439)
3440
Zolnai Tamás6403f2b2014-06-25 15:19:41 +02003441ifeq ($(COM),MSC)
3442$(call gb_LinkTarget_add_libs,$(1),\
David Ostrovskyac06ab22015-02-18 22:17:49 +01003443 $(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 +02003444)
Zolnai Tamás6403f2b2014-06-25 15:19:41 +02003445else
3446$(call gb_LinkTarget_add_libs,$(1),\
3447 $(call gb_UnpackedTarball_get_dir,libgltf)/src/.libs/libgltf-0.0$(gb_StaticLibrary_PLAINEXT) \
3448)
3449endif
3450
3451$(call gb_LinkTarget_use_external_project,$(1),libgltf)
3452
3453endef
3454
Rene Engelhard97bda8e2014-08-05 20:05:35 +02003455else # SYSTEM_LIBGLTF
3456
3457define gb_LinkTarget__use_libgltf
3458$(call gb_LinkTarget_set_include,$(1),\
3459 $$(INCLUDE) \
3460 $(LIBGLTF_CFLAGS) \
3461)
3462$(call gb_LinkTarget_add_libs,$(1),$(LIBGLTF_LIBS))
Rene Engelhard97bda8e2014-08-05 20:05:35 +02003463
3464endef
3465
Julien Nabet3ee2edf2016-05-07 22:43:37 +02003466endif # SYSTEM_LIBGLTF
Rene Engelhard97bda8e2014-08-05 20:05:35 +02003467
Zolnai Tamás191f0942014-08-07 15:21:41 +02003468ifeq ($(ENABLE_COLLADA),TRUE)
3469
David Tardonf24c6082014-10-20 14:21:22 +02003470ifeq ($(SYSTEM_OPENCOLLADA),TRUE)
3471
3472define gb_LinkTarget__use_opencollada_parser
3473$(call gb_LinkTarget_set_include,$(1),\
3474 $$(INCLUDE) \
3475 $(OPENCOLLADA_CFLAGS) \
3476)
3477
3478$(call gb_LinkTarget_add_libs,$(1),$(OPENCOLLADA_LIBS))
3479
3480endef
3481
3482else # !SYSTEM_OPENCOLLADA
3483
Zolnai Tamásaa5fe792014-04-10 13:33:58 +02003484define gb_LinkTarget__use_opencollada_parser
3485$(call gb_LinkTarget_set_include,$(1),\
3486 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADABaseUtils/include \
3487 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADAFramework/include \
3488 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADASaxFrameworkLoader/include \
3489 -I$(call gb_UnpackedTarball_get_dir,opencollada)/GeneratedSaxParser/include \
3490 $$(INCLUDE) \
3491)
3492
3493$(call gb_LinkTarget_use_static_libraries,$(1),\
3494 opencollada_parser \
3495)
3496endef
3497
David Tardonf24c6082014-10-20 14:21:22 +02003498endif # SYSTEM_OPENCOLLADA
3499
David Tardon8840fd32015-04-13 15:31:41 +02003500ifeq ($(SYSTEM_COLLADA2GLTF),TRUE)
3501
3502define gb_LinkTarget__use_collada2gltf
3503$(call gb_LinkTarget_set_include,$(1),\
3504 $$(INCLUDE) \
3505 $(COLLADA2GLTF_CFLAGS) \
3506)
3507
3508$(call gb_LinkTarget_add_libs,$(1),$(COLLADA2GLTF_LIBS))
3509
3510endef
3511
3512else # !SYSTEM_COLLADA2GLTF
3513
Zolnai Tamásd57591702014-04-10 13:37:38 +02003514define gb_LinkTarget__use_collada2gltf
3515$(call gb_LinkTarget_set_include,$(1),\
3516 -I$(call gb_UnpackedTarball_get_dir,collada2gltf) \
3517 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/assetModifiers \
3518 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/GLTF \
3519 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/helpers \
3520 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/JSON \
3521 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/dependencies/json/include/rapidjson/ \
3522 $$(INCLUDE) \
3523)
3524
3525$(call gb_LinkTarget_use_static_libraries,$(1),\
3526 collada2gltf \
3527)
3528endef
3529
David Tardon8840fd32015-04-13 15:31:41 +02003530endif # SYSTEM_COLLADA2GLTF
3531
Zolnai Tamás191f0942014-08-07 15:21:41 +02003532endif # ENABLE_COLLADA
3533
3534endif # ENABLE_GLTF
Zolnai Tamás62fd6302014-04-18 12:55:56 +02003535
Stephan Bergmannecc617e2015-07-08 11:20:19 +02003536define gb_LinkTarget__use_dconf
3537$(call gb_LinkTarget_add_defs,$(1),$(DCONF_CFLAGS))
3538$(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3539endef
3540
Michael Stahl2ee5f242011-09-15 14:01:27 +02003541### Jars ############################################################
3542
Michael Stahl5866b332014-02-11 18:56:33 +01003543ifneq ($(SYSTEM_HSQLDB),)
Michael Stahl666173b2012-08-15 20:24:59 +02003544
3545define gb_Jar__use_hsqldb
3546$(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3547endef
Michael Stahlb254f4f2012-08-17 11:47:29 +02003548define gb_JunitTest__use_hsqldb
3549$(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3550endef
Michael Stahl666173b2012-08-15 20:24:59 +02003551
3552else # !SYSTEM_HSQLDB
3553
David Tardon2dec0672014-05-19 10:20:37 +02003554ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl376d1b52014-03-18 20:25:04 +01003555$(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003556 hsqldb \
3557))
David Tardon2dec0672014-05-19 10:20:37 +02003558endif
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003559
Michael Stahl666173b2012-08-15 20:24:59 +02003560define gb_Jar__use_hsqldb
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003561$(call gb_Jar_use_jar,$(1),hsqldb)
Michael Stahl666173b2012-08-15 20:24:59 +02003562endef
Michael Stahlb254f4f2012-08-17 11:47:29 +02003563define gb_JunitTest__use_hsqldb
3564$(call gb_JunitTest_use_jar,$(1),hsqldb)
3565endef
Michael Stahl666173b2012-08-15 20:24:59 +02003566
3567endif # SYSTEM_HSQLDB
3568
Michael Stahl2ee5f242011-09-15 14:01:27 +02003569
Rene Engelhard40facc42014-05-23 07:43:19 +02003570ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3571
Michael Stahl7d2f7c62014-02-11 19:39:18 +01003572ifneq ($(SYSTEM_BSH),)
David Tardon3bcf9102011-10-04 09:44:48 +02003573
Michael Stahla4551262012-08-15 17:41:25 +02003574define gb_Jar__use_bsh
3575$(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
David Tardon3bcf9102011-10-04 09:44:48 +02003576endef
3577
3578else # !SYSTEM_BSH
3579
David Tardon2dec0672014-05-19 10:20:37 +02003580ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl8475eb92014-03-18 20:38:30 +01003581$(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003582 bsh \
3583))
David Tardon2dec0672014-05-19 10:20:37 +02003584endif
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003585
Michael Stahla4551262012-08-15 17:41:25 +02003586define gb_Jar__use_bsh
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003587$(call gb_Jar_use_jar,$(1),bsh)
David Tardon3bcf9102011-10-04 09:44:48 +02003588endef
3589
3590endif # SYSTEM_BSH
3591
Rene Engelhard40facc42014-05-23 07:43:19 +02003592endif
3593
3594ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
Michael Stahl2ee5f242011-09-15 14:01:27 +02003595
Michael Stahl49dde4c2014-02-11 19:42:28 +01003596ifneq ($(SYSTEM_RHINO),)
Tomas Chvatal32af02b2012-05-06 12:49:33 +02003597
Michael Stahla4551262012-08-15 17:41:25 +02003598define gb_Jar__use_rhino
3599$(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
Tomas Chvatal32af02b2012-05-06 12:49:33 +02003600endef
3601
3602else # !SYSTEM_RHINO
3603
David Tardon2dec0672014-05-19 10:20:37 +02003604ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl6474d1c2014-03-18 20:50:02 +01003605$(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003606 js \
3607))
David Tardon2dec0672014-05-19 10:20:37 +02003608endif
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003609
Michael Stahla4551262012-08-15 17:41:25 +02003610define gb_Jar__use_rhino
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003611$(call gb_Jar_use_jar,$(1),js)
Tomas Chvatal32af02b2012-05-06 12:49:33 +02003612endef
3613
3614endif # SYSTEM_RHINO
3615
Rene Engelhard40facc42014-05-23 07:43:19 +02003616endif
3617
Michael Stahl7d2f7c62014-02-11 19:39:18 +01003618ifneq ($(SYSTEM_APACHE_COMMONS),)
David Tardon9b530e12012-04-07 10:07:35 +02003619
Michael Stahla4551262012-08-15 17:41:25 +02003620define gb_Jar__use_commons-logging
3621$(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003622endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02003623gb_ExternalProject__use_commons-logging :=
David Tardon9b530e12012-04-07 10:07:35 +02003624
3625else # !SYSTEM_APACHE_COMMONS
3626
David Tardon2dec0672014-05-19 10:20:37 +02003627ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl2bec9f42014-03-18 21:54:33 +01003628$(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
rbujd8a7f722014-08-18 13:52:32 +02003629 commons-logging-$(COMMONS_LOGGING_VERSION) \
Michael Stahldb23d4b2013-10-24 23:10:27 +02003630))
David Tardon2dec0672014-05-19 10:20:37 +02003631endif
David Tardon9b530e12012-04-07 10:07:35 +02003632
Michael Stahla4551262012-08-15 17:41:25 +02003633define gb_Jar__use_commons-logging
Michael Stahl461d8302013-10-25 18:40:48 +02003634$(call gb_Jar_use_external_project,$(1),apache_commons_logging)
rbujd8a7f722014-08-18 13:52:32 +02003635$(call gb_Jar_use_jar,$(1),commons-logging-$(COMMONS_LOGGING_VERSION))
David Tardon9b530e12012-04-07 10:07:35 +02003636endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02003637define gb_ExternalProject__use_commons-logging
Michael Stahla60427e2013-10-26 20:17:52 +02003638$(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
Michael Stahl2b7536a2012-10-05 21:17:25 +02003639endef
David Tardon9b530e12012-04-07 10:07:35 +02003640
3641endif # SYSTEM_APACHE_COMMONS
3642
3643
Michael Stahl32db4992014-02-11 19:35:22 +01003644ifneq ($(SYSTEM_JFREEREPORT),)
David Tardon9b530e12012-04-07 10:07:35 +02003645
Michael Stahla4551262012-08-15 17:41:25 +02003646define gb_Jar__use_flow-engine
3647$(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003648endef
3649
Michael Stahla4551262012-08-15 17:41:25 +02003650define gb_Jar__use_flute
3651$(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003652endef
3653
Michael Stahla4551262012-08-15 17:41:25 +02003654define gb_Jar__use_libbase
3655$(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003656endef
3657
Michael Stahla4551262012-08-15 17:41:25 +02003658define gb_Jar__use_libfonts
3659$(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003660endef
3661
Michael Stahla4551262012-08-15 17:41:25 +02003662define gb_Jar__use_libformula
3663$(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003664endef
3665
Michael Stahla4551262012-08-15 17:41:25 +02003666define gb_Jar__use_liblayout
3667$(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003668endef
3669
Michael Stahla4551262012-08-15 17:41:25 +02003670define gb_Jar__use_libloader
3671$(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003672endef
3673
Michael Stahla4551262012-08-15 17:41:25 +02003674define gb_Jar__use_librepository
3675$(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003676endef
3677
Michael Stahla4551262012-08-15 17:41:25 +02003678define gb_Jar__use_libserializer
3679$(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003680endef
3681
Michael Stahla4551262012-08-15 17:41:25 +02003682define gb_Jar__use_libxml
3683$(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003684endef
3685
Michael Stahla4551262012-08-15 17:41:25 +02003686define gb_Jar__use_sac
3687$(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003688endef
3689
3690else # !SYSTEM_JFREEREPORT
3691
David Tardon2dec0672014-05-19 10:20:37 +02003692ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl4c3626af2014-03-18 22:03:00 +01003693$(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
Michael Stahl070ca1e2013-10-25 21:01:58 +02003694 flow-engine \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003695 flute-1.1.6 \
3696 libbase-1.1.6 \
3697 libfonts-1.1.6 \
3698 libformula-1.1.7 \
Michael Stahl070ca1e2013-10-25 21:01:58 +02003699 liblayout \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003700 libloader-1.1.6 \
3701 librepository-1.1.6 \
3702 libserializer-1.1.6 \
3703 libxml-1.1.7 \
3704 sac \
3705))
David Tardon2dec0672014-05-19 10:20:37 +02003706endif
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003707
Michael Stahla4551262012-08-15 17:41:25 +02003708define gb_Jar__use_flow-engine
Michael Stahl070ca1e2013-10-25 21:01:58 +02003709$(call gb_Jar_use_jar,$(1),flow-engine)
David Tardon9b530e12012-04-07 10:07:35 +02003710endef
3711
Michael Stahla4551262012-08-15 17:41:25 +02003712define gb_Jar__use_flute
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003713$(call gb_Jar_use_jar,$(1),flute-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003714endef
3715
Michael Stahla4551262012-08-15 17:41:25 +02003716define gb_Jar__use_libbase
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003717$(call gb_Jar_use_jar,$(1),libbase-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003718endef
3719
Michael Stahla4551262012-08-15 17:41:25 +02003720define gb_Jar__use_libfonts
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003721$(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003722endef
3723
Michael Stahla4551262012-08-15 17:41:25 +02003724define gb_Jar__use_libformula
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003725$(call gb_Jar_use_jar,$(1),libformula-1.1.7)
David Tardon9b530e12012-04-07 10:07:35 +02003726endef
3727
Michael Stahla4551262012-08-15 17:41:25 +02003728define gb_Jar__use_liblayout
Michael Stahl070ca1e2013-10-25 21:01:58 +02003729$(call gb_Jar_use_jar,$(1),liblayout)
David Tardon9b530e12012-04-07 10:07:35 +02003730endef
3731
Michael Stahla4551262012-08-15 17:41:25 +02003732define gb_Jar__use_libloader
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003733$(call gb_Jar_use_jar,$(1),libloader-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003734endef
3735
Michael Stahla4551262012-08-15 17:41:25 +02003736define gb_Jar__use_librepository
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003737$(call gb_Jar_use_jar,$(1),librepository-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003738endef
3739
Michael Stahla4551262012-08-15 17:41:25 +02003740define gb_Jar__use_libserializer
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003741$(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003742endef
3743
Michael Stahla4551262012-08-15 17:41:25 +02003744define gb_Jar__use_libxml
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003745$(call gb_Jar_use_jar,$(1),libxml-1.1.7)
David Tardon9b530e12012-04-07 10:07:35 +02003746endef
3747
Michael Stahla4551262012-08-15 17:41:25 +02003748define gb_Jar__use_sac
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003749$(call gb_Jar_use_jar,$(1),sac)
David Tardon9b530e12012-04-07 10:07:35 +02003750endef
3751
3752endif # SYSTEM_JFREEREPORT
3753
David Tardonc2eca352012-12-02 10:51:37 +01003754
3755# Executables
3756
David Tardonedf67302012-12-30 12:27:04 +01003757# FIXME: the library target should be for build too
3758define gb_Executable__register_bestreversemap
3759$(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3760 $(if $(filter-out ANDROID,$(OS)),$(call gb_Library_get_target,sal_textenc)) \
3761)
3762endef
3763
David Tardonceb0d062012-12-30 13:11:43 +01003764# TODO depending on the whole URE might be overkill, but I do not have a
3765# Windows machine to debug it...
3766# FIXME: the library target should be for build too
3767define gb_Executable__register_climaker
3768$(call gb_Executable_add_runtime_dependencies,climaker,\
3769 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
Michael Stahl4e6b4fb2015-11-27 12:49:34 +01003770 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
Tor Lillqviste4c6fe52013-04-24 15:11:39 +03003771 $(call gb_UnoApi_get_target,udkapi) \
Michael Stahl4e6b4fb2015-11-27 12:49:34 +01003772 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
David Tardonceb0d062012-12-30 13:11:43 +01003773)
3774endef
3775
David Tardon6c1614a2014-01-08 13:49:46 +01003776define gb_Executable__register_cppumaker
3777$(call gb_Executable_add_runtime_dependencies,cppumaker,\
3778 $(if $(filter-out ANDROID,$(OS)),$(call gb_Library_get_target,sal_textenc)) \
3779)
3780endef
3781
Matúš Kukanbae52ee2013-05-16 09:17:57 +02003782# This is used to determine what we need for 'build' platform.
Michael Stahl4e6b4fb2015-11-27 12:49:34 +01003783# FIXME: the library target should be for build too
Matúš Kukan9555b5b2013-06-14 12:48:20 +02003784define gb_Executable__register_gengal
Matúš Kukan94b68822013-06-17 10:41:18 +02003785$(call gb_Executable_add_runtime_dependencies,gengal,\
David Tardon1546c292013-05-07 20:41:41 +02003786 $(call gb_AllLangResTarget_get_target,ofa) \
David Tardon1546c292013-05-07 20:41:41 +02003787 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
David Tardone59420d2014-08-04 17:23:54 +02003788 $(call gb_Package_get_target_for_build,postprocess_images) \
Matúš Kukan8b162f22013-09-27 10:58:28 +02003789 $(call gb_Package_get_target_for_build,postprocess_registry) \
Matúš Kukan15614c82015-12-05 07:05:37 +01003790 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3791 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3792 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
Michael Stahl4e6b4fb2015-11-27 12:49:34 +01003793 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3794 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
David Tardon1546c292013-05-07 20:41:41 +02003795 $(call gb_UnoApi_get_target,offapi) \
3796 $(call gb_UnoApi_get_target,udkapi) \
3797)
3798endef
3799
Michael Stahl187194b2014-02-11 19:17:42 +01003800ifeq ($(SYSTEM_ICU),)
David Tardonedf67302012-12-30 12:27:04 +01003801
3802define gb_Executable__register_gendict
3803$(call gb_Executable_add_runtime_dependencies,gendict,\
3804 $(call gb_Package_get_target_for_build,icu) \
Stephan Bergmann475e4b42016-10-25 16:46:35 +02003805 $(call gb_Package_get_target_for_build,icu_ure) \
David Tardonedf67302012-12-30 12:27:04 +01003806)
3807endef
3808
3809endif
3810
David Tardonceb0d062012-12-30 13:11:43 +01003811define gb_Executable__register_idlc
3812$(call gb_Executable_add_runtime_dependencies,idlc,\
David Tardonce038cf2013-10-20 20:43:46 +02003813 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
David Tardonceb0d062012-12-30 13:11:43 +01003814)
3815endef
3816
David Tardonedf67302012-12-30 12:27:04 +01003817define gb_Executable__register_localize
3818$(call gb_Executable_add_runtime_dependencies,localize,\
3819 $(foreach exec,cfgex helpex propex transex3 treex uiex ulfex xrmex,\
3820 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3821 ) \
3822)
3823endef
3824
Michael Stahl4c51feb2013-09-21 01:39:41 +02003825# FIXME ure/services.rdb needs cleanup
Stephan Bergmannab149c72013-04-24 10:42:40 +02003826# The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
David Tardonedf67302012-12-30 12:27:04 +01003827# due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3828# FIXME: the library target should be for build too
3829define gb_Executable__register_saxparser
3830$(call gb_Executable_add_runtime_dependencies,saxparser,\
3831 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
David Tardon92f66c52014-10-13 16:59:33 +02003832 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
Matúš Kukanb469cd22013-05-24 12:24:27 +02003833 $(call gb_Rdb_get_target_for_build,saxparser) \
Tor Lillqvistcb872392016-08-17 01:14:54 +03003834 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
Tor Lillqviste4c6fe52013-04-24 15:11:39 +03003835 $(call gb_UnoApi_get_target,udkapi) \
David Tardonedf67302012-12-30 12:27:04 +01003836)
3837endef
3838
Stephan Bergmannab149c72013-04-24 10:42:40 +02003839# NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
David Tardonedf67302012-12-30 12:27:04 +01003840# required due to the settings for URE_SERVICES and URE_TYPES in
3841# cppuhelper/source/unorc
3842# FIXME: the library target should be for build too
3843define gb_Executable__register_uno
3844$(call gb_Executable_add_runtime_dependencies,uno,\
3845 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
Michael Stahl4e6b4fb2015-11-27 12:49:34 +01003846 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
Tor Lillqviste4c6fe52013-04-24 15:11:39 +03003847 $(call gb_UnoApi_get_target,udkapi) \
David Tardonedf67302012-12-30 12:27:04 +01003848)
3849endef
3850
3851
3852# External executables
3853
Michael Stahl379f9782014-02-11 16:49:19 +01003854ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
David Tardonc2eca352012-12-02 10:51:37 +01003855
3856gb_ExternalExecutable__register_xmllint :=
3857
3858else # ! SYSTEM_LIBXML_FOR_BUILD
3859
3860define gb_ExternalExecutable__register_xmllint
David Tardondbac8f52014-04-18 18:34:40 +02003861$(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 +02003862$(call gb_ExternalExecutable_add_dependencies,xmllint,\
3863 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3864 $(call gb_Package_get_target,xml2) \
3865)
David Tardonc2eca352012-12-02 10:51:37 +01003866
3867endef
3868
3869endif # SYSTEM_LIBXML_FOR_BUILD
3870
Michael Stahle3abec32014-02-11 15:57:18 +01003871ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
David Tardonc2eca352012-12-02 10:51:37 +01003872
3873gb_ExternalExecutable__register_xsltproc :=
3874
3875else # ! SYSTEM_LIBXSLT_FOR_BUILD
3876
3877define gb_ExternalExecutable__register_xsltproc
David Tardondbac8f52014-04-18 18:34:40 +02003878$(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 +02003879$(call gb_ExternalExecutable_add_dependencies,xsltproc,\
3880 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
Michael Stahl56b2bb52015-07-31 11:08:04 +02003881 $(call gb_Package_get_target,xml2) \
David Tardon5b660242014-07-28 10:38:49 +02003882 $(call gb_Package_get_target,xslt) \
3883)
David Tardonc2eca352012-12-02 10:51:37 +01003884
3885endef
3886
3887endif # SYSTEM_LIBXSLT_FOR_BUILD
3888
David Tardonce038cf2013-10-20 20:43:46 +02003889ifneq (,$(SYSTEM_UCPP))
3890
3891gb_ExternalExecutable__register_ucpp :=
3892
3893else # ! SYSTEM_UCPP
3894
3895define gb_ExternalExecutable__register_ucpp
David Tardon489d2ea2013-10-21 08:17:32 +02003896$(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
David Tardonce038cf2013-10-20 20:43:46 +02003897
3898endef
3899
3900endif # SYSTEM_UCPP
3901
Matúš Kukane4826722013-03-05 22:03:38 +01003902ifeq (,$(PYTHON_FOR_BUILD))
David Tardonc2eca352012-12-02 10:51:37 +01003903
3904define gb_ExternalExecutable__register_python
Christian Lohmaier04032bd2013-03-19 17:27:01 +01003905ifeq ($(OS),MACOSX)
3906
3907# use set_external, to avoid having the command added as prerequisite for the
3908# targets that make use of it. (Otherwise make will choke as it doesn't have a
3909# matching rule to build that specific file)
3910$(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))
3911# the Zip ensures that internal python has been built (cannot use the Package
3912# target, as that is not used on Mac)
David Tardon45a5c262013-05-16 13:36:24 +02003913$(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
Christian Lohmaier04032bd2013-03-19 17:27:01 +01003914
3915else
3916
Tor Lillqvist4c63fd102013-09-22 19:59:37 +03003917$(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 +01003918$(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
Christian Lohmaier04032bd2013-03-19 17:27:01 +01003919$(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
3920
3921endif
David Tardonc2eca352012-12-02 10:51:37 +01003922
3923endef
3924
Matúš Kukane4826722013-03-05 22:03:38 +01003925else
3926
3927define gb_ExternalExecutable__register_python
3928$(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
3929
3930endef
3931
3932endif # PYTHON_FOR_BUILD
David Tardonc2eca352012-12-02 10:51:37 +01003933
David Tardon63069262012-12-29 12:56:24 +01003934ifneq ($(SYSTEM_GENBRK),)
3935
3936define gb_ExternalExecutable__register_genbrk
3937$(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
3938
3939endef
3940
3941else # ! SYSTEM_GENBRK
3942
3943define gb_ExternalExecutable__register_genbrk
David Tardondbac8f52014-04-18 18:34:40 +02003944$(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 +01003945$(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
David Tardon63069262012-12-29 12:56:24 +01003946$(call gb_ExternalExecutable_add_dependencies,genbrk,\
3947 $(call gb_Package_get_target_for_build,icu) \
Stephan Bergmann475e4b42016-10-25 16:46:35 +02003948 $(call gb_Package_get_target_for_build,icu_ure) \
David Tardon63069262012-12-29 12:56:24 +01003949)
3950
3951endef
3952
3953endif
3954
3955ifneq ($(SYSTEM_GENCCODE),)
3956
3957define gb_ExternalExecutable__register_genccode
3958$(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
3959
3960endef
3961
3962else # ! SYSTEM_GENCCODE
3963
3964define gb_ExternalExecutable__register_genccode
David Tardondbac8f52014-04-18 18:34:40 +02003965$(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 +01003966$(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
David Tardon63069262012-12-29 12:56:24 +01003967$(call gb_ExternalExecutable_add_dependencies,genccode,\
3968 $(call gb_Package_get_target_for_build,icu) \
Stephan Bergmann475e4b42016-10-25 16:46:35 +02003969 $(call gb_Package_get_target_for_build,icu_ure) \
David Tardon63069262012-12-29 12:56:24 +01003970)
3971
3972endef
3973
3974endif
3975
3976ifneq ($(SYSTEM_GENCMN),)
3977
3978define gb_ExternalExecutable__register_gencmn
3979$(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
3980
3981endef
3982
3983else # ! SYSTEM_GENCMN
3984
3985define gb_ExternalExecutable__register_gencmn
David Tardondbac8f52014-04-18 18:34:40 +02003986$(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 +01003987$(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
David Tardon63069262012-12-29 12:56:24 +01003988$(call gb_ExternalExecutable_add_dependencies,gencmn,\
3989 $(call gb_Package_get_target_for_build,icu) \
Stephan Bergmann475e4b42016-10-25 16:46:35 +02003990 $(call gb_Package_get_target_for_build,icu_ure) \
David Tardon63069262012-12-29 12:56:24 +01003991)
3992
3993endef
3994
3995endif
3996
Jacobo Aragunde Péreze6fe5082015-02-02 19:49:37 +00003997ifeq (OWNCLOUD_ANDROID_LIB,$(filter OWNCLOUD_ANDROID_LIB,$(BUILD_TYPE)))
3998
3999$(eval $(call gb_Helper_register_jars,OXT,\
4000 owncloud-android-library \
4001))
4002
4003define gb_Jar__use_owncloud_android_lib
4004$(call gb_Jar_use_external_project,$(1),owncloud-android-lib)
4005$(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,owncloud-android-lib)/bin/owncloud-android-library.jar)
4006endef
4007define gb_ExternalProject__use_owncloud_android_lib
4008$(call gb_ExternalProject_use_external_project,$(1),owncloud_android_lib)
4009endef
4010
4011endif
4012
Nathan Yee7eb863d2015-07-03 11:58:27 +02004013ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
4014ifneq ($(SYSTEM_BZIP2),)
4015
4016define gb_LinkTarget__use_bzip2
4017$(call gb_LinkTarget_set_include,$(1),\
4018 $(BZIP2_CFLAGS) \
4019 $$(INCLUDE) \
4020)
4021$(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
4022
4023endef
Jan Holesovsky025952f2015-07-03 13:46:38 +02004024
Nathan Yee7eb863d2015-07-03 11:58:27 +02004025gb_ExternalProject__use_bzip2 :=
4026
4027else # !SYSTEM_BZIP2
4028
4029define gb_LinkTarget__use_bzip2
Nathan Yee7eb863d2015-07-03 11:58:27 +02004030$(call gb_LinkTarget_set_include,$(1),\
4031 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
4032 $$(INCLUDE) \
4033)
Nathan Yeeb59955b2015-07-14 14:36:37 -07004034
4035ifeq ($(COM),MSC)
4036$(call gb_LinkTarget_add_libs,$(1),\
4037 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
4038)
4039else
Jan Holesovsky025952f2015-07-03 13:46:38 +02004040$(call gb_LinkTarget_add_libs,$(1),\
4041 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
4042)
Nathan Yeeb59955b2015-07-14 14:36:37 -07004043endif
4044
Jan Holesovskyec477172015-07-07 09:24:45 +02004045$(call gb_LinkTarget_use_external_project,$(1),bzip2)
Nathan Yee7eb863d2015-07-03 11:58:27 +02004046endef
4047
4048define gb_ExternalProject__use_bzip2
4049$(call gb_ExternalProject_use_external_project,$(1),bzip2)
4050endef
4051
4052endif
4053endif
4054
Stephan Bergmannec53ac62016-04-12 20:06:04 +02004055define gb_LinkTarget__use_clew
4056$(call gb_LinkTarget_set_include,$(1), \
4057 -I$(SRCDIR)/external/clew/source/include \
4058 $$(INCLUDE) \
4059)
4060$(call gb_LinkTarget_use_libraries,$(1),clew)
4061endef
4062
Michael Stahlc74af0d2011-04-01 20:49:35 +00004063# vim: set noet sw=4 ts=4: