[Libreoffice-commits] .: RepositoryExternal.mk Repository.mk solenv/gbuild
David Tardon
dtardon at kemper.freedesktop.org
Mon Jul 25 01:35:25 PDT 2011
Repository.mk | 1 -
RepositoryExternal.mk | 26 ++++++++++++++++++++++++++
solenv/gbuild/CppunitTest.mk | 2 +-
3 files changed, 27 insertions(+), 2 deletions(-)
New commits:
commit 7660ca0a23712292bf90eebee3df0063f68a7393
Author: David Tardon <dtardon at redhat.com>
Date: Mon Jul 25 10:34:22 2011 +0200
cppunit can be system
diff --git a/Repository.mk b/Repository.mk
index 3169c2e..69ea9f0 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -140,7 +140,6 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_URE, \
$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
test \
- cppunit \
fileacc \
icui18n \
))
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index cc6c36e..791c5d5 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -35,6 +35,32 @@
# in the system case, no libraries should be registered, but the target-local
# variable LIBS should be set to FOO_LIBS, and INCLUDES to FOO_CFLAGS.
+ifeq ($(SYSTEM_CPPUNIT),YES)
+
+define gb_LinkTarget__use_cppunit
+$(call gb_LinkTarget_set_include,$(1),\
+ $$(INCLUDE) \
+ $(CPPUNIT_CFLAGS) \
+)
+
+$(call gb_LinkTarget_add_libs,$(1),\
+ $(CPPUNIT_LIBS) \
+)
+endef
+
+else
+
+$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO,\
+ cppunit \
+))
+
+define gb_LinkTarget__use_cppunit
+$(call gb_LinkTarget_add_linked_libs,$(1),\
+ cppunit \
+)
+endef
+
+endif
ifeq ($(SYSTEM_ZLIB),YES)
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index d267d92..e67d06c 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -98,7 +98,7 @@ $(call gb_LinkTarget_set_targettype,$(2),CppunitTest)
$(call gb_LinkTarget_add_defs,$(2),\
$(gb_CppunitTest_DEFS) \
)
-$(call gb_LinkTarget_add_linked_libs,$(2),cppunit)
+$(call gb_LinkTarget_use_external,$(2),cppunit)
$(call gb_LinkTarget_add_includes,$(2),$(filter -I%,$(CPPUNIT_CFLAGS)))
$(call gb_LinkTarget_add_defs,$(2), \
$(filter-out -I%,$(CPPUNIT_CFLAGS)) \
More information about the Libreoffice-commits
mailing list