meson: Add an option to disabling installing assemblies
This is useful when used as a subproject which is generating a Nuget.
This commit is contained in:
parent
63264db8f3
commit
44d2af717a
17 changed files with 97 additions and 72 deletions
|
@ -123,6 +123,6 @@ api_xml = custom_target(pkg + '_api_xml',
|
||||||
output: pkg + '-api.xml',
|
output: pkg + '-api.xml',
|
||||||
command: [generate_api, '--fakeglue'],
|
command: [generate_api, '--fakeglue'],
|
||||||
depends: [source_gen],
|
depends: [source_gen],
|
||||||
install: true,
|
install: install,
|
||||||
install_dir: gapi_xml_installdir)
|
install_dir: gapi_xml_installdir)
|
||||||
atk_api_includes = join_paths(meson.current_build_dir(), 'atk-api.xml')
|
atk_api_includes = join_paths(meson.current_build_dir(), 'atk-api.xml')
|
||||||
|
|
|
@ -27,7 +27,7 @@ sources = [
|
||||||
atk_sharp = library(assembly_name, source_gen, sources,
|
atk_sharp = library(assembly_name, source_gen, sources,
|
||||||
cs_args: ['-unsafe', '-keyfile:' + snk],
|
cs_args: ['-unsafe', '-keyfile:' + snk],
|
||||||
link_with: glib_sharp,
|
link_with: glib_sharp,
|
||||||
install: true,
|
install: install,
|
||||||
install_dir: lib_install_dir
|
install_dir: lib_install_dir
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ gluegen = custom_target('atkgluegen',
|
||||||
|
|
||||||
library('atksharpglue-3', gluegen,
|
library('atksharpglue-3', gluegen,
|
||||||
dependencies: [glib_dep, gio_dep, atk_dep],
|
dependencies: [glib_dep, gio_dep, atk_dep],
|
||||||
install: true)
|
install: install)
|
||||||
|
|
||||||
install_infos += [assembly_name, atk_sharp.full_path()]
|
install_infos += [assembly_name, atk_sharp.full_path()]
|
||||||
atk_sharp_dep = declare_dependency(link_with: [glib_sharp, atk_sharp])
|
atk_sharp_dep = declare_dependency(link_with: [glib_sharp, atk_sharp])
|
||||||
|
|
|
@ -65,12 +65,15 @@ sources = [
|
||||||
|
|
||||||
cairo_sharp = library(assembly_name, sources,
|
cairo_sharp = library(assembly_name, sources,
|
||||||
cs_args: ['-keyfile:' + snk],
|
cs_args: ['-keyfile:' + snk],
|
||||||
install: true,
|
install: install,
|
||||||
install_dir: lib_install_dir
|
install_dir: lib_install_dir
|
||||||
)
|
)
|
||||||
|
|
||||||
install_infos += [assembly_name, cairo_sharp.full_path()]
|
install_infos += [assembly_name, cairo_sharp.full_path()]
|
||||||
cairo_api_includes = join_paths(meson.current_source_dir(), 'cairo-api.xml')
|
cairo_api_includes = join_paths(meson.current_source_dir(), 'cairo-api.xml')
|
||||||
install_data(cairo_api_includes, install_dir: gapi_xml_installdir)
|
|
||||||
|
if install
|
||||||
|
install_data(cairo_api_includes, install_dir: gapi_xml_installdir)
|
||||||
|
endif
|
||||||
|
|
||||||
cairo_sharp_dep = declare_dependency(link_with: cairo_sharp)
|
cairo_sharp_dep = declare_dependency(link_with: cairo_sharp)
|
||||||
|
|
|
@ -221,6 +221,6 @@ api_xml = custom_target(pkg + '_api_xml',
|
||||||
output: pkg + '-api.xml',
|
output: pkg + '-api.xml',
|
||||||
command: [generate_api, '--fakeglue'],
|
command: [generate_api, '--fakeglue'],
|
||||||
depends: [source_gen],
|
depends: [source_gen],
|
||||||
install: true,
|
install: install,
|
||||||
install_dir: gapi_xml_installdir)
|
install_dir: gapi_xml_installdir)
|
||||||
gdk_api_includes = join_paths(meson.current_build_dir(), 'gdk-api.xml')
|
gdk_api_includes = join_paths(meson.current_build_dir(), 'gdk-api.xml')
|
||||||
|
|
|
@ -12,11 +12,12 @@ configure_file(input: assembly_name + '.dll.config.in',
|
||||||
output: assembly_name + '.dll.config',
|
output: assembly_name + '.dll.config',
|
||||||
configuration : remap_dl_data)
|
configuration : remap_dl_data)
|
||||||
|
|
||||||
configure_file(input: assembly_name + '-3.0.pc.in',
|
if install
|
||||||
|
configure_file(input: assembly_name + '-3.0.pc.in',
|
||||||
output: assembly_name + '-3.0.pc',
|
output: assembly_name + '-3.0.pc',
|
||||||
configuration : version_data,
|
configuration : version_data,
|
||||||
install_dir: pkg_install_dir,
|
install_dir: pkg_install_dir)
|
||||||
install: true)
|
endif
|
||||||
|
|
||||||
subdir('generated')
|
subdir('generated')
|
||||||
|
|
||||||
|
@ -68,7 +69,7 @@ deps = [glib_sharp, pango_sharp, cairo_sharp, gio_sharp]
|
||||||
gdk_sharp = library(assembly_name, source_gen, sources,
|
gdk_sharp = library(assembly_name, source_gen, sources,
|
||||||
cs_args: ['-unsafe', '-keyfile:' + snk],
|
cs_args: ['-unsafe', '-keyfile:' + snk],
|
||||||
link_with: deps,
|
link_with: deps,
|
||||||
install: true,
|
install: install,
|
||||||
install_dir: lib_install_dir
|
install_dir: lib_install_dir
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -80,7 +81,7 @@ gluegen = custom_target('gdkgluegen',
|
||||||
|
|
||||||
library('gdksharpglue-3', gluegen,
|
library('gdksharpglue-3', gluegen,
|
||||||
dependencies: [glib_dep, gio_dep, atk_dep, gdk_dep],
|
dependencies: [glib_dep, gio_dep, atk_dep, gdk_dep],
|
||||||
install: true)
|
install: install)
|
||||||
|
|
||||||
install_infos += [assembly_name, gdk_sharp.full_path()]
|
install_infos += [assembly_name, gdk_sharp.full_path()]
|
||||||
gdk_sharp_dep = declare_dependency(link_with: deps + [gdk_sharp])
|
gdk_sharp_dep = declare_dependency(link_with: deps + [gdk_sharp])
|
||||||
|
|
|
@ -1,13 +1,6 @@
|
||||||
gapi_fixup = executable('gapi-fixup', 'gapi-fixup.cs',
|
gapi_fixup = executable('gapi-fixup', 'gapi-fixup.cs',
|
||||||
install_dir : gapi_installdir,
|
install_dir : gapi_installdir,
|
||||||
install: true)
|
install: install)
|
||||||
|
|
||||||
configure_file(input: 'gapi3-fixup.in',
|
|
||||||
output: 'gapi3-fixup',
|
|
||||||
configuration : gapi_parser_data,
|
|
||||||
install_dir: get_option('bindir'),
|
|
||||||
install: true)
|
|
||||||
|
|
||||||
|
|
||||||
gapi_codegen = executable('gapi_codegen',
|
gapi_codegen = executable('gapi_codegen',
|
||||||
'AliasGen.cs',
|
'AliasGen.cs',
|
||||||
|
@ -73,10 +66,22 @@ gapi_codegen = executable('gapi_codegen',
|
||||||
'VMSignature.cs',
|
'VMSignature.cs',
|
||||||
'XmlElementExtensions.cs',
|
'XmlElementExtensions.cs',
|
||||||
install_dir : gapi_installdir,
|
install_dir : gapi_installdir,
|
||||||
install: true)
|
install: install)
|
||||||
|
|
||||||
configure_file(input: 'gapi3-codegen.in',
|
if install
|
||||||
|
configure_file(input: 'gapi3-fixup.in',
|
||||||
|
output: 'gapi3-fixup',
|
||||||
|
configuration : gapi_parser_data,
|
||||||
|
install_dir: get_option('bindir'))
|
||||||
|
configure_file(input: 'gapi3-codegen.in',
|
||||||
output: 'gapi3-codegen',
|
output: 'gapi3-codegen',
|
||||||
configuration : gapi_parser_data,
|
configuration : gapi_parser_data,
|
||||||
install_dir: get_option('bindir'),
|
install_dir: get_option('bindir'))
|
||||||
install: true)
|
else
|
||||||
|
configure_file(input: 'gapi3-fixup.in',
|
||||||
|
output: 'gapi3-fixup',
|
||||||
|
configuration : gapi_parser_data)
|
||||||
|
configure_file(input: 'gapi3-codegen.in',
|
||||||
|
output: 'gapi3-codegen',
|
||||||
|
configuration : gapi_parser_data)
|
||||||
|
endif
|
||||||
|
|
|
@ -420,6 +420,6 @@ api_xml = custom_target(pkg + '_api_xml',
|
||||||
output: pkg + '-api.xml',
|
output: pkg + '-api.xml',
|
||||||
command: [generate_api, '--fakeglue'],
|
command: [generate_api, '--fakeglue'],
|
||||||
depends: [source_gen],
|
depends: [source_gen],
|
||||||
install: true,
|
install: install,
|
||||||
install_dir: gapi_xml_installdir)
|
install_dir: gapi_xml_installdir)
|
||||||
gio_api_includes = join_paths(meson.current_build_dir(), 'gio-api.xml')
|
gio_api_includes = join_paths(meson.current_build_dir(), 'gio-api.xml')
|
||||||
|
|
|
@ -11,11 +11,12 @@ configure_file(input: assembly_name + '.dll.config.in',
|
||||||
output: assembly_name + '.dll.config',
|
output: assembly_name + '.dll.config',
|
||||||
configuration : remap_dl_data)
|
configuration : remap_dl_data)
|
||||||
|
|
||||||
configure_file(input: assembly_name + '-3.0.pc.in',
|
if install
|
||||||
|
configure_file(input: assembly_name + '-3.0.pc.in',
|
||||||
output: assembly_name + '-3.0.pc',
|
output: assembly_name + '-3.0.pc',
|
||||||
configuration : version_data,
|
configuration : version_data,
|
||||||
install_dir: pkg_install_dir,
|
install_dir: pkg_install_dir)
|
||||||
install: true)
|
endif
|
||||||
|
|
||||||
subdir('generated')
|
subdir('generated')
|
||||||
|
|
||||||
|
@ -33,7 +34,7 @@ sources = [
|
||||||
gio_sharp = library(assembly_name, source_gen, sources,
|
gio_sharp = library(assembly_name, source_gen, sources,
|
||||||
cs_args: ['-unsafe', '-keyfile:' + snk],
|
cs_args: ['-unsafe', '-keyfile:' + snk],
|
||||||
link_with: glib_sharp,
|
link_with: glib_sharp,
|
||||||
install: true,
|
install: install,
|
||||||
install_dir: lib_install_dir
|
install_dir: lib_install_dir
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -43,9 +44,9 @@ gluegen = custom_target('giogluegen',
|
||||||
command: [generate_api, '--fakeglue'],
|
command: [generate_api, '--fakeglue'],
|
||||||
depends: [source_gen])
|
depends: [source_gen])
|
||||||
|
|
||||||
library('giosharpglue-3', gluegen,
|
gio_glue = library('giosharpglue-3', gluegen,
|
||||||
dependencies: [glib_dep, gio_dep],
|
dependencies: [glib_dep, gio_dep],
|
||||||
install: true)
|
install: install)
|
||||||
|
|
||||||
install_infos += [assembly_name, gio_sharp.full_path()]
|
install_infos += [assembly_name, gio_sharp.full_path()]
|
||||||
gio_sharp_dep = declare_dependency(link_with: [glib_sharp, gio_sharp])
|
gio_sharp_dep = declare_dependency(link_with: [glib_sharp, gio_sharp])
|
||||||
|
|
|
@ -819,11 +819,11 @@ namespace GLib {
|
||||||
return g_type_check_instance_is_a (obj, GType.Object.Val);
|
return g_type_check_instance_is_a (obj, GType.Object.Val);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct GTypeInstance {
|
public struct GTypeInstance {
|
||||||
public IntPtr g_class;
|
public IntPtr g_class;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct GObject {
|
public struct GObject {
|
||||||
public GTypeInstance type_instance;
|
public GTypeInstance type_instance;
|
||||||
public uint ref_count;
|
public uint ref_count;
|
||||||
public IntPtr qdata;
|
public IntPtr qdata;
|
||||||
|
|
|
@ -5,11 +5,13 @@ configure_file(input: 'glib-sharp.dll.config.in',
|
||||||
output: 'glib-sharp.dll.config',
|
output: 'glib-sharp.dll.config',
|
||||||
configuration : remap_dl_data)
|
configuration : remap_dl_data)
|
||||||
|
|
||||||
configure_file(input: 'glib-sharp-3.0.pc.in',
|
if install
|
||||||
|
configure_file(input: 'glib-sharp-3.0.pc.in',
|
||||||
output: 'glib-sharp-3.0.pc',
|
output: 'glib-sharp-3.0.pc',
|
||||||
configuration : version_data,
|
configuration : version_data,
|
||||||
install_dir: pkg_install_dir,
|
install_dir: pkg_install_dir,
|
||||||
install: true)
|
install: install)
|
||||||
|
endif
|
||||||
|
|
||||||
policy_data = configuration_data()
|
policy_data = configuration_data()
|
||||||
policy_data.set('ASSEMBLY_NAME', assembly_name)
|
policy_data.set('ASSEMBLY_NAME', assembly_name)
|
||||||
|
@ -92,13 +94,16 @@ sources = [
|
||||||
|
|
||||||
glib_sharp = library(assembly_name, sources,
|
glib_sharp = library(assembly_name, sources,
|
||||||
cs_args: ['-unsafe', '-keyfile:' + snk],
|
cs_args: ['-unsafe', '-keyfile:' + snk],
|
||||||
install: true,
|
install: install,
|
||||||
install_dir: lib_install_dir
|
install_dir: lib_install_dir
|
||||||
)
|
)
|
||||||
|
|
||||||
install_infos += [assembly_name, glib_sharp.full_path()]
|
install_infos += [assembly_name, glib_sharp.full_path()]
|
||||||
|
|
||||||
glib_api_includes = join_paths(meson.current_source_dir(), 'glib-api.xml')
|
glib_api_includes = join_paths(meson.current_source_dir(), 'glib-api.xml')
|
||||||
install_data(glib_api_includes, install_dir: gapi_xml_installdir)
|
|
||||||
|
if install
|
||||||
|
install_data(glib_api_includes, install_dir: gapi_xml_installdir)
|
||||||
|
endif
|
||||||
|
|
||||||
glib_sharp_dep = declare_dependency(link_with: glib_sharp)
|
glib_sharp_dep = declare_dependency(link_with: glib_sharp)
|
||||||
|
|
|
@ -1089,6 +1089,6 @@ api_xml = custom_target(pkg + '_api_xml',
|
||||||
output: pkg + '-api.xml',
|
output: pkg + '-api.xml',
|
||||||
command: [generate_api, '--fakeglue'],
|
command: [generate_api, '--fakeglue'],
|
||||||
depends: [source_gen],
|
depends: [source_gen],
|
||||||
install: true,
|
install: install,
|
||||||
install_dir: gapi_xml_installdir)
|
install_dir: gapi_xml_installdir)
|
||||||
gtk_api_includes = join_paths(meson.current_build_dir(), 'gtk-api.xml')
|
gtk_api_includes = join_paths(meson.current_build_dir(), 'gtk-api.xml')
|
||||||
|
|
|
@ -12,11 +12,12 @@ configure_file(input: assembly_name + '.dll.config.in',
|
||||||
output: assembly_name + '.dll.config',
|
output: assembly_name + '.dll.config',
|
||||||
configuration : remap_dl_data)
|
configuration : remap_dl_data)
|
||||||
|
|
||||||
configure_file(input: assembly_name + '-3.0.pc.in',
|
if install
|
||||||
|
configure_file(input: assembly_name + '-3.0.pc.in',
|
||||||
output: assembly_name + '-3.0.pc',
|
output: assembly_name + '-3.0.pc',
|
||||||
configuration : version_data,
|
configuration : version_data,
|
||||||
install_dir: pkg_install_dir,
|
install_dir: pkg_install_dir)
|
||||||
install: true)
|
endif
|
||||||
|
|
||||||
subdir('generated')
|
subdir('generated')
|
||||||
|
|
||||||
|
@ -136,7 +137,7 @@ deps = [glib_sharp, pango_sharp, cairo_sharp, gio_sharp, atk_sharp, gdk_sharp]
|
||||||
gtk_sharp = library(assembly_name, source_gen, sources,
|
gtk_sharp = library(assembly_name, source_gen, sources,
|
||||||
cs_args: ['-unsafe', '-keyfile:' + snk, '-nowarn:0618,0612,0169'],
|
cs_args: ['-unsafe', '-keyfile:' + snk, '-nowarn:0618,0612,0169'],
|
||||||
link_with: deps,
|
link_with: deps,
|
||||||
install: true,
|
install: install,
|
||||||
install_dir: lib_install_dir
|
install_dir: lib_install_dir
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -148,7 +149,7 @@ gluegen = custom_target('gtkgluegen',
|
||||||
|
|
||||||
library('gtksharpglue-3', gluegen,
|
library('gtksharpglue-3', gluegen,
|
||||||
dependencies: [glib_dep, gio_dep, atk_dep, gdk_dep, gtk_dep],
|
dependencies: [glib_dep, gio_dep, atk_dep, gdk_dep, gtk_dep],
|
||||||
install: true)
|
install: install)
|
||||||
|
|
||||||
install_infos += [assembly_name, gtk_sharp.full_path()]
|
install_infos += [assembly_name, gtk_sharp.full_path()]
|
||||||
gtk_sharp_dep = declare_dependency(link_with: deps + [gtk_sharp])
|
gtk_sharp_dep = declare_dependency(link_with: deps + [gtk_sharp])
|
||||||
|
|
|
@ -30,6 +30,7 @@ if csc.get_id() == 'mono'
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
install = get_option('install')
|
||||||
assemblyinfo='/AssemblyInfo.cs'
|
assemblyinfo='/AssemblyInfo.cs'
|
||||||
|
|
||||||
gacutil = find_program('gacutil')
|
gacutil = find_program('gacutil')
|
||||||
|
@ -118,5 +119,7 @@ else
|
||||||
message('Gtk not found, not building')
|
message('Gtk not found, not building')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
gacutil_install = join_paths(meson.current_source_dir(), 'gacutil_install.py')
|
if install
|
||||||
meson.add_install_script(gacutil_install, install_infos)
|
gacutil_install = join_paths(meson.current_source_dir(), 'gacutil_install.py')
|
||||||
|
meson.add_install_script(gacutil_install, install_infos)
|
||||||
|
endif
|
||||||
|
|
1
meson_options.txt
Normal file
1
meson_options.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
option('install', type : 'boolean', value : true)
|
|
@ -138,6 +138,6 @@ api_xml = custom_target(pkg + '_api_xml',
|
||||||
output: pkg + '-api.xml',
|
output: pkg + '-api.xml',
|
||||||
command: [generate_api, '--fakeglue'],
|
command: [generate_api, '--fakeglue'],
|
||||||
depends: [source_gen],
|
depends: [source_gen],
|
||||||
install: true,
|
install: install,
|
||||||
install_dir: gapi_xml_installdir)
|
install_dir: gapi_xml_installdir)
|
||||||
pango_api_includes = join_paths(meson.current_build_dir(), pkg + '-api.xml')
|
pango_api_includes = join_paths(meson.current_build_dir(), pkg + '-api.xml')
|
||||||
|
|
|
@ -63,7 +63,7 @@ deps = [glib_sharp, cairo_sharp]
|
||||||
pango_sharp = library(assembly_name, source_gen, sources,
|
pango_sharp = library(assembly_name, source_gen, sources,
|
||||||
cs_args: ['-unsafe', '-keyfile:' + snk],
|
cs_args: ['-unsafe', '-keyfile:' + snk],
|
||||||
link_with: deps,
|
link_with: deps,
|
||||||
install: true,
|
install: install,
|
||||||
install_dir: lib_install_dir
|
install_dir: lib_install_dir
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ gluegen = custom_target('pangogluegen',
|
||||||
|
|
||||||
library('pangosharpglue-3', gluegen,
|
library('pangosharpglue-3', gluegen,
|
||||||
dependencies: [glib_dep, gio_dep, pango_dep],
|
dependencies: [glib_dep, gio_dep, pango_dep],
|
||||||
install: true)
|
install: install)
|
||||||
|
|
||||||
install_infos += [assembly_name, pango_sharp.full_path()]
|
install_infos += [assembly_name, pango_sharp.full_path()]
|
||||||
pango_sharp_dep = declare_dependency(link_with: deps + [pango_sharp])
|
pango_sharp_dep = declare_dependency(link_with: deps + [pango_sharp])
|
||||||
|
|
|
@ -3,24 +3,29 @@ pkg_install_dir = '@0@/pkgconfig'.format(get_option('libdir'))
|
||||||
|
|
||||||
gapi_parser = executable('gapi-parser', 'gapi-parser.cs',
|
gapi_parser = executable('gapi-parser', 'gapi-parser.cs',
|
||||||
install_dir : gapi_installdir,
|
install_dir : gapi_installdir,
|
||||||
install: true)
|
install: install)
|
||||||
|
|
||||||
gapi_parser_data = configuration_data()
|
gapi_parser_data = configuration_data()
|
||||||
gapi_parser_data.set('prefix', prefix)
|
gapi_parser_data.set('prefix', prefix)
|
||||||
gapi_parser_data.set('RUNTIME', runtime)
|
gapi_parser_data.set('RUNTIME', runtime)
|
||||||
|
|
||||||
configure_file(input: 'gapi3-parser.in',
|
|
||||||
output: 'gapi3-parser',
|
|
||||||
configuration : gapi_parser_data,
|
|
||||||
install_dir: get_option('bindir'),
|
|
||||||
install: true)
|
|
||||||
|
|
||||||
pkg_gapi_parser_data = configuration_data()
|
pkg_gapi_parser_data = configuration_data()
|
||||||
pkg_gapi_parser_data .set('VERSION', meson.project_version())
|
pkg_gapi_parser_data .set('VERSION', meson.project_version())
|
||||||
configure_file(input: 'gapi-3.0.pc.in',
|
|
||||||
|
if install
|
||||||
|
configure_file(input: 'gapi3-parser.in',
|
||||||
|
output: 'gapi3-parser',
|
||||||
|
configuration : gapi_parser_data,
|
||||||
|
install_dir: get_option('bindir'))
|
||||||
|
configure_file(input: 'gapi-3.0.pc.in',
|
||||||
output: 'gapi-3.0.pc',
|
output: 'gapi-3.0.pc',
|
||||||
configuration : pkg_gapi_parser_data,
|
configuration : pkg_gapi_parser_data,
|
||||||
install_dir: pkg_install_dir,
|
install_dir: pkg_install_dir)
|
||||||
install: true)
|
install_data('gapi_pp.pl', 'gapi2xml.pl', install_dir: gapi_installdir)
|
||||||
|
else
|
||||||
install_data('gapi_pp.pl', 'gapi2xml.pl', install_dir: gapi_installdir)
|
configure_file(input: 'gapi3-parser.in',
|
||||||
|
output: 'gapi3-parser',
|
||||||
|
configuration : gapi_parser_data)
|
||||||
|
configure_file(input: 'gapi-3.0.pc.in',
|
||||||
|
output: 'gapi-3.0.pc',
|
||||||
|
configuration : pkg_gapi_parser_data)
|
||||||
|
endif
|
||||||
|
|
Loading…
Reference in a new issue