summaryrefslogtreecommitdiff
path: root/external/libwpg
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-12-23 18:37:54 +0100
committerDavid Tardon <dtardon@redhat.com>2014-12-24 14:48:24 +0100
commitc868a0c772a980dcc3045315c1e6f97f1433e88d (patch)
tree508908663af2a4c66f99b37d79b3cccee989f1b5 /external/libwpg
parentbaa6458c8b1063e3b06f3d6d6ccef54f7e9250dd (diff)
build bundled libwpd and libwpg as shared libs
Change-Id: I7a00dfaa3252e2a0ab145ef8a4355f9bd14570da
Diffstat (limited to 'external/libwpg')
-rw-r--r--external/libwpg/ExternalPackage_libwpg.mk22
-rw-r--r--external/libwpg/ExternalProject_libwpg.mk4
-rw-r--r--external/libwpg/Library_wpg.mk46
-rw-r--r--external/libwpg/Module_libwpg.mk16
4 files changed, 85 insertions, 3 deletions
diff --git a/external/libwpg/ExternalPackage_libwpg.mk b/external/libwpg/ExternalPackage_libwpg.mk
new file mode 100644
index 000000000000..c03a5cfd9e99
--- /dev/null
+++ b/external/libwpg/ExternalPackage_libwpg.mk
@@ -0,0 +1,22 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_ExternalPackage_ExternalPackage,libwpg,libwpg))
+
+$(eval $(call gb_ExternalPackage_use_external_project,libwpg,libwpg))
+
+ifeq ($(OS),MACOSX)
+$(eval $(call gb_ExternalPackage_add_file,libwpg,$(LIBO_LIB_FOLDER)/libwpg-0.3.3.dylib,src/lib/.libs/libwpg-0.3.3.dylib))
+else ifeq ($(OS),WNT)
+$(eval $(call gb_ExternalPackage_add_file,libwpg,$(LIBO_LIB_FOLDER)/libwpg-0.3.dll,src/lib/.libs/libwpg-0.3.dll))
+else ifeq ($(filter IOS ANDROID,$(OS)),)
+$(eval $(call gb_ExternalPackage_add_file,libwpg,$(LIBO_LIB_FOLDER)/libwpg-0.3.so.3,src/lib/.libs/libwpg-0.3.so.3.0.0))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libwpg/ExternalProject_libwpg.mk b/external/libwpg/ExternalProject_libwpg.mk
index 908af2c8d3dd..6375c17c1911 100644
--- a/external/libwpg/ExternalProject_libwpg.mk
+++ b/external/libwpg/ExternalProject_libwpg.mk
@@ -25,8 +25,8 @@ $(call gb_ExternalProject_get_state_target,libwpg,build) :
export PKG_CONFIG="" \
&& MAKE=$(MAKE) ./configure \
--with-pic \
- --enable-static \
- --disable-shared \
+ --enable-shared \
+ --disable-static \
--without-docs \
--disable-tools \
--disable-debug \
diff --git a/external/libwpg/Library_wpg.mk b/external/libwpg/Library_wpg.mk
new file mode 100644
index 000000000000..f1ac9919a9d0
--- /dev/null
+++ b/external/libwpg/Library_wpg.mk
@@ -0,0 +1,46 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Library_Library,wpg))
+
+$(eval $(call gb_Library_use_unpacked,wpg,libwpg))
+
+$(eval $(call gb_Library_use_externals,wpg,\
+ revenge \
+ wpd \
+))
+
+$(eval $(call gb_Library_set_warnings_not_errors,wpg))
+
+$(eval $(call gb_Library_set_include,wpg,\
+ -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_Library_add_defs,wpg,\
+ -DBOOST_ALL_NO_LIB \
+ -DDLL_EXPORT \
+ -DLIBWPG_BUILD \
+ -DNDEBUG \
+))
+
+$(eval $(call gb_Library_set_generated_cxx_suffix,wpg,cpp))
+
+$(eval $(call gb_Library_add_generated_exception_objects,wpg,\
+ UnpackedTarball/libwpg/src/lib/WPG1Parser \
+ UnpackedTarball/libwpg/src/lib/WPG2Parser \
+ UnpackedTarball/libwpg/src/lib/WPGBitmap \
+ UnpackedTarball/libwpg/src/lib/WPGColor \
+ UnpackedTarball/libwpg/src/lib/WPGDashArray \
+ UnpackedTarball/libwpg/src/lib/WPGHeader \
+ UnpackedTarball/libwpg/src/lib/WPGXParser \
+ UnpackedTarball/libwpg/src/lib/WPGraphics \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libwpg/Module_libwpg.mk b/external/libwpg/Module_libwpg.mk
index 9e468a58a9cb..668ae8404967 100644
--- a/external/libwpg/Module_libwpg.mk
+++ b/external/libwpg/Module_libwpg.mk
@@ -10,8 +10,22 @@
$(eval $(call gb_Module_Module,libwpg))
$(eval $(call gb_Module_add_targets,libwpg,\
- ExternalProject_libwpg \
UnpackedTarball_libwpg \
))
+ifeq ($(COM),MSC)
+
+$(eval $(call gb_Module_add_targets,libwpg,\
+ Library_wpg \
+))
+
+else
+
+$(eval $(call gb_Module_add_targets,libwpg,\
+ ExternalPackage_libwpg \
+ ExternalProject_libwpg \
+))
+
+endif
+
# vim: set noet sw=4 ts=4: