build libwps as shared lib
Change-Id: Ic30d54461f799b745d0887b830445f00efeb6faa
This commit is contained in:
parent
79211c1abe
commit
f85d10fdf6
5 changed files with 140 additions and 8 deletions
|
@ -2003,22 +2003,45 @@ gb_ExternalProject__use_wps :=
|
|||
|
||||
else # !SYSTEM_WPS
|
||||
|
||||
ifeq ($(COM),MSC)
|
||||
|
||||
$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
|
||||
wps \
|
||||
))
|
||||
|
||||
define gb_LinkTarget__use_wps
|
||||
$(call gb_LinkTarget_set_include,$(1),\
|
||||
-I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
|
||||
$$(INCLUDE) \
|
||||
)
|
||||
$(call gb_LinkTarget_add_libs,$(1),\
|
||||
$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs/libwps-0.3$(gb_StaticLibrary_PLAINEXT) \
|
||||
|
||||
$(call gb_LinkTarget_use_libraries,$(1),\
|
||||
wps \
|
||||
)
|
||||
$(call gb_LinkTarget_use_external_project,$(1),libwps)
|
||||
|
||||
endef
|
||||
define gb_ExternalProject__use_wps
|
||||
$(call gb_ExternalProject_use_external_project,$(1),libwps)
|
||||
|
||||
else # !MSC
|
||||
|
||||
$(eval $(call gb_Helper_register_packages_for_install,ooo, \
|
||||
libwps \
|
||||
))
|
||||
|
||||
define gb_LinkTarget__use_wps
|
||||
$(call gb_LinkTarget_use_package,$(1),libwps)
|
||||
|
||||
$(call gb_LinkTarget_set_include,$(1),\
|
||||
-I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
|
||||
$$(INCLUDE) \
|
||||
)
|
||||
$(call gb_LinkTarget_add_libs,$(1),\
|
||||
-L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.3 \
|
||||
)
|
||||
|
||||
endef
|
||||
|
||||
endif # MSC
|
||||
|
||||
endif # SYSTEM_WPS
|
||||
|
||||
|
||||
|
|
22
external/libwps/ExternalPackage_libwps.mk
vendored
Normal file
22
external/libwps/ExternalPackage_libwps.mk
vendored
Normal file
|
@ -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,libwps,libwps))
|
||||
|
||||
$(eval $(call gb_ExternalPackage_use_external_project,libwps,libwps))
|
||||
|
||||
ifeq ($(OS),MACOSX)
|
||||
$(eval $(call gb_ExternalPackage_add_file,libwps,$(LIBO_LIB_FOLDER)/libwps-0.3.3.dylib,src/lib/.libs/libwps-0.3.dylib))
|
||||
else ifeq ($(OS),WNT)
|
||||
$(eval $(call gb_ExternalPackage_add_file,libwps,$(LIBO_LIB_FOLDER)/libwps-0.3.dll,src/lib/.libs/libwps-0.3.dll))
|
||||
else ifeq ($(filter IOS ANDROID,$(OS)),)
|
||||
$(eval $(call gb_ExternalPackage_add_file,libwps,$(LIBO_LIB_FOLDER)/libwps-0.3.so.3,src/lib/.libs/libwps-0.3.so.3.0.0))
|
||||
endif
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
8
external/libwps/ExternalProject_libwps.mk
vendored
8
external/libwps/ExternalProject_libwps.mk
vendored
|
@ -25,8 +25,11 @@ $(call gb_ExternalProject_get_state_target,libwps,build) :
|
|||
export PKG_CONFIG="" \
|
||||
&& ./configure \
|
||||
--with-pic \
|
||||
--enable-static \
|
||||
--disable-shared \
|
||||
$(if $(DISABLE_DYNLOADING), \
|
||||
--enable-static --disable-shared \
|
||||
, \
|
||||
--enable-shared --disable-static \
|
||||
) \
|
||||
--without-docs \
|
||||
--disable-tools \
|
||||
--disable-debug \
|
||||
|
@ -34,6 +37,7 @@ $(call gb_ExternalProject_get_state_target,libwps,build) :
|
|||
$(if $(VERBOSE)$(verbose),--disable-silent-rules,--enable-silent-rules) \
|
||||
CXXFLAGS="$(if $(SYSTEM_BOOST),$(BOOST_CPPFLAGS),-I$(call gb_UnpackedTarball_get_dir,boost) -I$(BUILDDIR)/config_$(gb_Side))" \
|
||||
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
|
||||
$(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \
|
||||
&& $(MAKE) \
|
||||
)
|
||||
|
||||
|
|
69
external/libwps/Library_wps.mk
vendored
Normal file
69
external/libwps/Library_wps.mk
vendored
Normal file
|
@ -0,0 +1,69 @@
|
|||
# -*- 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,wps))
|
||||
|
||||
$(eval $(call gb_Library_use_unpacked,wps,libwps))
|
||||
|
||||
$(eval $(call gb_Library_use_externals,wps,\
|
||||
boost_headers \
|
||||
revenge \
|
||||
))
|
||||
|
||||
$(eval $(call gb_Library_set_warnings_not_errors,wps))
|
||||
|
||||
$(eval $(call gb_Library_set_include,wps,\
|
||||
-I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
|
||||
$$(INCLUDE) \
|
||||
))
|
||||
|
||||
$(eval $(call gb_Library_add_defs,wps,\
|
||||
-DBOOST_ALL_NO_LIB \
|
||||
-DBUILD_WPS\
|
||||
-DDLL_EXPORT \
|
||||
-DNDEBUG \
|
||||
))
|
||||
|
||||
$(eval $(call gb_Library_set_generated_cxx_suffix,wps,cpp))
|
||||
|
||||
$(eval $(call gb_Library_add_generated_exception_objects,wps,\
|
||||
UnpackedTarball/libwps/src/lib/WKS4 \
|
||||
UnpackedTarball/libwps/src/lib/WKS4Spreadsheet \
|
||||
UnpackedTarball/libwps/src/lib/WKSContentListener \
|
||||
UnpackedTarball/libwps/src/lib/WKSParser \
|
||||
UnpackedTarball/libwps/src/lib/WKSSubDocument \
|
||||
UnpackedTarball/libwps/src/lib/WPS4 \
|
||||
UnpackedTarball/libwps/src/lib/WPS4Graph \
|
||||
UnpackedTarball/libwps/src/lib/WPS4Text \
|
||||
UnpackedTarball/libwps/src/lib/WPS8 \
|
||||
UnpackedTarball/libwps/src/lib/WPS8Graph \
|
||||
UnpackedTarball/libwps/src/lib/WPS8Struct \
|
||||
UnpackedTarball/libwps/src/lib/WPS8Table \
|
||||
UnpackedTarball/libwps/src/lib/WPS8Text \
|
||||
UnpackedTarball/libwps/src/lib/WPS8TextStyle \
|
||||
UnpackedTarball/libwps/src/lib/WPSCell \
|
||||
UnpackedTarball/libwps/src/lib/WPSContentListener \
|
||||
UnpackedTarball/libwps/src/lib/WPSDebug \
|
||||
UnpackedTarball/libwps/src/lib/WPSDocument \
|
||||
UnpackedTarball/libwps/src/lib/WPSFont \
|
||||
UnpackedTarball/libwps/src/lib/WPSHeader \
|
||||
UnpackedTarball/libwps/src/lib/WPSList \
|
||||
UnpackedTarball/libwps/src/lib/WPSOLEParser \
|
||||
UnpackedTarball/libwps/src/lib/WPSPageSpan \
|
||||
UnpackedTarball/libwps/src/lib/WPSParagraph \
|
||||
UnpackedTarball/libwps/src/lib/WPSParser \
|
||||
UnpackedTarball/libwps/src/lib/WPSSubDocument \
|
||||
UnpackedTarball/libwps/src/lib/WPSTable \
|
||||
UnpackedTarball/libwps/src/lib/WPSTextParser \
|
||||
UnpackedTarball/libwps/src/lib/WPSTextSubDocument \
|
||||
UnpackedTarball/libwps/src/lib/libwps_internal \
|
||||
UnpackedTarball/libwps/src/lib/libwps_tools_win \
|
||||
))
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
16
external/libwps/Module_libwps.mk
vendored
16
external/libwps/Module_libwps.mk
vendored
|
@ -10,8 +10,22 @@
|
|||
$(eval $(call gb_Module_Module,libwps))
|
||||
|
||||
$(eval $(call gb_Module_add_targets,libwps,\
|
||||
ExternalProject_libwps \
|
||||
UnpackedTarball_libwps \
|
||||
))
|
||||
|
||||
ifeq ($(COM),MSC)
|
||||
|
||||
$(eval $(call gb_Module_add_targets,libwps,\
|
||||
Library_wps \
|
||||
))
|
||||
|
||||
else
|
||||
|
||||
$(eval $(call gb_Module_add_targets,libwps,\
|
||||
ExternalPackage_libwps \
|
||||
ExternalProject_libwps \
|
||||
))
|
||||
|
||||
endif
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
||||
|
|
Loading…
Reference in a new issue