diff --git a/src/bin/eolian_cxx/eolian_cxx.cc b/src/bin/eolian_cxx/eolian_cxx.cc index 3774c497a6..1e0842873d 100644 --- a/src/bin/eolian_cxx/eolian_cxx.cc +++ b/src/bin/eolian_cxx/eolian_cxx.cc @@ -305,7 +305,26 @@ run(options_type const& opts) } else { - std::abort(); + if (!types_generate(base, opts, cpp_types_header)) + { + EINA_CXX_DOM_LOG_ERR(eolian_cxx::domain) + << "Error generating: " << ::eolian_class_short_name_get(klass) + << std::endl; + assert(false && "error generating class"); + } + else + { + std::ofstream header_decl; + header_decl.open(opts.out_file); + if (!header_decl.good()) + { + EINA_CXX_DOM_LOG_ERR(eolian_cxx::domain) + << "Can't open output file: " << opts.out_file << std::endl; + assert(false && "error opening file"); + } + std::copy (cpp_types_header.begin(), cpp_types_header.end() + , std::ostream_iterator(header_decl)); + } } } else @@ -336,6 +355,10 @@ run(options_type const& opts) headers.insert(filename + std::string(".hh")); eo_files.insert(filename); } + else + { + headers.insert (base + std::string(".hh")); + } } using efl::eolian::grammar::header_include_directive; diff --git a/src/bindings/cxx/meson.build b/src/bindings/cxx/meson.build index 3401a43c3f..e62b7a2387 100644 --- a/src/bindings/cxx/meson.build +++ b/src/bindings/cxx/meson.build @@ -38,6 +38,24 @@ foreach lib : cxx_sublibs eo_file_subdirs = get_variable(package_name + '_eo_subdirs') #generate files for each .eo files foreach eo_file_subdir : eo_file_subdirs + if eo_file_subdir != '' + cxx_pub_eot_files = get_variable(package_name + '_' + eo_file_subdir +'_eot_files') + else + cxx_pub_eot_files = get_variable(package_name +'_eot_files') + endif + subdir_file_location = join_paths(file_location, eo_file_subdir) + foreach cxx_gen_file : cxx_pub_eot_files + cxx_generator_target += custom_target('eolian_cxx_gen_'+cxx_gen_file.underscorify()+'', + input : join_paths(subdir_file_location, cxx_gen_file), + output : [cxx_gen_file + '.hh'], + install : true, + install_dir : join_paths(dir_include, package_version_name, eo_file_subdir), + command : [eolian_cxx_gen, '-I', meson.current_source_dir(), eolian_include_directories, + '-o', join_paths(meson.current_build_dir(), cxx_gen_file + '.hh'), + '@INPUT@']) + eo_file_list += files(join_paths(subdir_file_location, cxx_gen_file)) + endforeach + if eo_file_subdir != '' cxx_pub_eo_files = get_variable(package_name + '_' + eo_file_subdir +'_eo_files') else