summaryrefslogtreecommitdiff
path: root/src/Makefile_Evas_Cxx.am
blob: 57da81ee4e272e04a087e855880d7461aa4bb138 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63

if HAVE_CXX11

### Generated headers

generated_evas_canvas_cxx_bindings = \
lib/evas/canvas/evas_line.eo.hh \
lib/evas/canvas/evas_polygon.eo.hh \
lib/evas/canvas/evas_rectangle.eo.hh \
lib/evas/canvas/evas_text.eo.hh \
lib/evas/canvas/evas_textblock.eo.hh \
lib/evas/canvas/evas_textgrid.eo.hh \
lib/evas/canvas/evas_signal_interface.eo.hh \
lib/evas/canvas/evas_object_smart.eo.hh \
lib/evas/canvas/evas_smart_clipped.eo.hh \
lib/evas/canvas/evas_table.eo.hh \
lib/evas/canvas/evas_common_interface.eo.hh \
lib/evas/canvas/evas_object.eo.hh \
lib/evas/canvas/evas_canvas.eo.hh \
lib/evas/canvas/evas_grid.eo.hh \
lib/evas/canvas/evas_image.eo.hh \
lib/evas/canvas/evas_out.eo.hh \
lib/evas/canvas/evas_draggable_interface.eo.hh \
lib/evas/canvas/evas_clickable_interface.eo.hh \
lib/evas/canvas/evas_scrollable_interface.eo.hh \
lib/evas/canvas/evas_selectable_interface.eo.hh \
lib/evas/canvas/evas_zoomable_interface.eo.hh \
lib/evas/canvas/evas_box.eo.hh

lib/evas/Evas.hh: $(generated_evas_canvas_cxx_bindings)
	@echo -e "#ifndef EFL_CXX_EVAS_HH\n#define EFL_CXX_EVAS_HH\n" > $(top_builddir)/src/lib/evas/Evas.hh
	@echo -e "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/evas/Evas.hh
	@for i in $(generated_evas_canvas_cxx_bindings); do echo "#include <canvas/$$(basename $$i)>" >> $(top_builddir)/src/lib/evas/Evas.hh; done
	@echo -e "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/evas/Evas.hh

CLEANFILES += \
$(generated_evas_canvas_cxx_bindings) \
lib/evas/Evas.hh

installed_evascxxmainheadersdir = $(includedir)/evas-cxx-@VMAJ@/
nodist_installed_evascxxmainheaders_DATA = lib/evas/Evas.hh

installed_evascxxcanvasheadersdir = $(includedir)/evas-cxx-@VMAJ@/canvas
nodist_installed_evascxxcanvasheaders_DATA = $(generated_evas_canvas_cxx_bindings)

### Unit tests

if EFL_ENABLE_TESTS

check_PROGRAMS += tests/evas_cxx/cxx_compile_test
TESTS += tests/evas_cxx/cxx_compile_test

tests_evas_cxx_cxx_compile_test_SOURCES = tests/evas_cxx/cxx_compile_test.cc
tests_evas_cxx_cxx_compile_test_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
 -DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/evas_cxx\" \
 -DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/evas_cxx\" \
 @CHECK_CFLAGS@ @ECORE_CXX_CFLAGS@ @EINA_CXX_CFLAGS@ @EVAS_CXX_CFLAGS@ @EO_CXX_CFLAGS@ \
 @ECORE_CFLAGS@ @EINA_CFLAGS@ @EVAS_CFLAGS@ @EO_CFLAGS@
tests_evas_cxx_cxx_compile_test_LDADD = @CHECK_LIBS@ @USE_EVAS_LIBS@
tests_evas_cxx_cxx_compile_test_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@

endif
endif