gtkdoc() and generate_gir() methods assumes there is a C compiler, but pure C++ projects might not add it explicitly. Fixes: #12162pull/11546/head
parent
4eb9c84cf9
commit
494bdbd334
11 changed files with 85 additions and 0 deletions
@ -0,0 +1,16 @@ |
||||
<?xml version="1.0"?> |
||||
<!DOCTYPE book PUBLIC '-//OASIS//DTD DocBook XML V4.5//EN' |
||||
'http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd' [ |
||||
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'"> |
||||
<!ENTITY version SYSTEM "version.xml"> |
||||
]> |
||||
<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude"> |
||||
<bookinfo> |
||||
<title>Foo Reference Manual</title> |
||||
</bookinfo> |
||||
|
||||
<chapter id="foo"> |
||||
<title>GLib Core Application Support</title> |
||||
<xi:include href="xml/foo.xml" /> |
||||
</chapter> |
||||
</book> |
@ -0,0 +1,5 @@ |
||||
#include "foo.h" |
||||
|
||||
int foo_do_something(void) { |
||||
return 42; |
||||
} |
@ -0,0 +1 @@ |
||||
int foo_do_something(void); |
@ -0,0 +1,13 @@ |
||||
project('gnome module without C', 'cpp') |
||||
|
||||
gtkdoc = find_program('gtkdoc-scan', required: false) |
||||
if not gtkdoc.found() |
||||
error('MESON_SKIP_TEST gtkdoc not found.') |
||||
endif |
||||
|
||||
gnome = import('gnome') |
||||
|
||||
lib = library('foo++', 'foo.cpp') |
||||
gnome.gtkdoc('foo', |
||||
src_dir: '.', |
||||
main_xml : 'foo-docs.xml',) |
@ -0,0 +1,17 @@ |
||||
{ |
||||
"installed": [ |
||||
{"type": "file", "file": "usr/share/gtk-doc/html/foo/up-insensitive.png"}, |
||||
{"type": "file", "file": "usr/share/gtk-doc/html/foo/home.png"}, |
||||
{"type": "file", "file": "usr/share/gtk-doc/html/foo/foo.html"}, |
||||
{"type": "file", "file": "usr/share/gtk-doc/html/foo/foo-foo.html"}, |
||||
{"type": "file", "file": "usr/share/gtk-doc/html/foo/style.css"}, |
||||
{"type": "file", "file": "usr/share/gtk-doc/html/foo/index.html"}, |
||||
{"type": "file", "file": "usr/share/gtk-doc/html/foo/foo.devhelp2"}, |
||||
{"type": "file", "file": "usr/share/gtk-doc/html/foo/left.png"}, |
||||
{"type": "file", "file": "usr/share/gtk-doc/html/foo/left-insensitive.png"}, |
||||
{"type": "file", "file": "usr/share/gtk-doc/html/foo/right-insensitive.png"}, |
||||
{"type": "file", "file": "usr/share/gtk-doc/html/foo/up.png"}, |
||||
{"type": "file", "file": "usr/share/gtk-doc/html/foo/right.png"} |
||||
], |
||||
"skip_on_jobname": ["azure", "msys2"] |
||||
} |
@ -0,0 +1,5 @@ |
||||
#include "foo.h" |
||||
|
||||
int foo_do_something(void) { |
||||
return 42; |
||||
} |
@ -0,0 +1 @@ |
||||
int foo_do_something(void); |
@ -0,0 +1,16 @@ |
||||
project('gnome module without C', 'cpp') |
||||
|
||||
gi = dependency('gobject-introspection-1.0', required: false) |
||||
if not gi.found() |
||||
error('MESON_SKIP_TEST gobject-introspection not found.') |
||||
endif |
||||
|
||||
gnome = import('gnome') |
||||
|
||||
lib = library('foo++', 'foo.cpp') |
||||
gnome.generate_gir( |
||||
lib, |
||||
sources: ['foo.cpp', 'foo.h'], |
||||
namespace: 'foo', |
||||
nsversion: meson.project_version(), |
||||
) |
@ -0,0 +1,3 @@ |
||||
{ |
||||
"skip_on_jobname": ["azure", "macos", "msys2"] |
||||
} |
Loading…
Reference in new issue