Conditional xmlsec support
[shibboleth/cpp-xmltooling.git] / xmltoolingtest / Makefile.am
1 AUTOMAKE_OPTIONS = foreign
2
3 if BUILD_UNITTEST
4 bin_PROGRAMS = xmltoolingtest
5 xmltoolingtest_CXXFLAGS = $(CXXFLAGS) $(CXXTESTFLAGS)
6 else
7 bin_PROGRAMS = 
8 endif
9
10 if BUILD_XMLSEC
11 xmlsec_sources = \
12     Signature.h
13 else
14 xmlsec_sources =
15 endif
16
17 xmltoolingtest_h = \
18     ComplexXMLObjectTest.h \
19     MarshallingTest.h \
20     UnknownTest.h \
21     UnmarshallingTest.h \
22     xmltoolingtest.h \
23     ${xmlsec_sources}
24
25 noinst_HEADERS = \
26     XMLObjectBaseTestCase.h
27
28 nodist_xmltoolingtest_SOURCES = $(xmltoolingtest_h:.h=.cpp)
29
30 CLEANFILES = $(nodist_xmltoolingtest_SOURCES)
31
32 do-cxxtestgen:
33         if test $(HFILE) = "xmltoolingtest.h"; then \
34                 $(CXXTEST) --error-printer --have-eh --have-std --abort-on-fail -o $(CPPFILE) $(HFILE); \
35         else \
36                 $(CXXTEST) --part --have-eh --have-std --abort-on-fail -o $(CPPFILE) $(HFILE); \
37         fi;
38
39 $(nodist_xmltoolingtest_SOURCES): %.cpp: %.h
40         $(MAKE) do-cxxtestgen HFILE=$< CPPFILE=$@
41
42 xmltoolingtest_LDADD = $(top_builddir)/xmltooling/libxmltooling.la
43
44 EXTRA_DIST = xmltoolingtest.vcproj $(xmltoolingtest_h) data