aboutsummaryrefslogtreecommitdiffstats
path: root/src/Makefile_Evas_Cxx.am
blob: 40ec40fe5d111ae377d8695541b139efe2bc252a (plain) (blame)
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

if HAVE_CXX11

### Generated headers

generated_evas_canvas_cxx_bindings = $(evas_eolian_files:%.eo=%.eo.hh)
generated_evas_canvas_cxx_impl_bindings = $(evas_eolian_files:%.eo=%.eo.impl.hh)

lib/evas/Evas.hh: $(generated_evas_canvas_cxx_bindings)
	@echo @ECHO_E@ "#ifndef EFL_CXX_EVAS_HH\n#define EFL_CXX_EVAS_HH\n" > $(top_builddir)/src/lib/evas/Evas.hh
	@echo @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 @ECHO_E@ "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/evas/Evas.hh

generated_evas_canvas_cxx_all = \
  $(generated_evas_canvas_cxx_bindings) \
  $(generated_evas_canvas_cxx_impl_bindings) \
  lib/evas/Evas.hh

CLEANFILES += $(generated_evas_canvas_cxx_all)

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_all)

### 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 \
 -I$(top_builddir)/src/lib/efl/interfaces/ \
 -I$(top_builddir)/src/lib/evas/canvas/ \
 -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