aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2019-08-06 01:44:53 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2019-08-06 01:44:53 -0300
commit84c1e335868134e5db09a2c680eb164d9921532d (patch)
tree0b79cc61a818583364ab80f995987e91bd98700b
parentcsharp: fix ownership of value types in arrays and lists (diff)
downloadefl-devs/lauromoura/nuget.tar.gz
csharp: Add a target to generate NuGet package.devs/lauromoura/nuget
This commit adds the option to run `ninja nuget_pack` to create a NuGet package containing both the EFL# dll and xml doc file. It may help referencing EFL# in IDE's, dotnet projects, etc.
-rw-r--r--src/bindings/mono/efl_mono.dll.nuspec.in19
-rw-r--r--src/bindings/mono/meson.build13
2 files changed, 32 insertions, 0 deletions
diff --git a/src/bindings/mono/efl_mono.dll.nuspec.in b/src/bindings/mono/efl_mono.dll.nuspec.in
new file mode 100644
index 0000000000..fe80eadd28
--- /dev/null
+++ b/src/bindings/mono/efl_mono.dll.nuspec.in
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<package >
+ <metadata>
+ <id>Efl.CSharp</id>
+ <version>@EFL_VERSION@</version>
+ <authors>EFL Team</authors>
+ <owners>EFL Team</owners>
+ <license type="expression">Apache-2.0</license>
+ <projectUrl>http://www.enlightenment.org</projectUrl>
+ <requireLicenseAcceptance>false</requireLicenseAcceptance>
+ <description>EFL C# Bindings</description>
+ <copyright>Copyright 2019</copyright>
+ <tags>EFL</tags>
+ </metadata>
+ <files>
+ <file src="efl_mono.dll" target="lib/net46" />
+ <file src="efl_mono.xml" target="lib/net46" />
+ </files>
+</package>
diff --git a/src/bindings/mono/meson.build b/src/bindings/mono/meson.build
index 8a87da9572..14b40fd4f6 100644
--- a/src/bindings/mono/meson.build
+++ b/src/bindings/mono/meson.build
@@ -135,6 +135,19 @@ efl_mono_dll_config = configure_file(input : 'efl_mono.dll.config.in',
output : 'efl_mono.dll.config',
configuration : efl_mono_conf_data)
+nuget_conf_data = configuration_data()
+
+nuget_conf_data.set('EFL_VERSION', meson.project_version())
+
+nuget_nuspec = configure_file(input : 'efl_mono.dll.nuspec.in',
+ output : 'efl_mono.dll.nuspec',
+ configuration : nuget_conf_data)
+
+run_target('nuget_pack',
+ command: ['nuget', 'pack', '-OutputDirectory', meson.current_build_dir(),
+ join_paths(meson.current_build_dir(), 'efl_mono.dll.nuspec')]
+)
+
extra_cs_args = runtime_assemblies
if get_option('mono-beta')