From: Jaeyun Date: Wed, 19 Dec 2018 11:29:34 +0000 (+0900) Subject: [Meson] gbs build using meson X-Git-Tag: v0.1.0~49 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=939ede1f5a8ead0381b793fe51136f936dad1c15;p=platform%2Fupstream%2Fnnstreamer.git [Meson] gbs build using meson update .spec to build using meson Signed-off-by: Jaeyun Jung --- diff --git a/meson.build b/meson.build index 436784f..0e45b49 100644 --- a/meson.build +++ b/meson.build @@ -7,7 +7,7 @@ project('nnstreamer', 'c', 'cpp', meson_version: '>=0.40.0', default_options: [ 'warning_level=1', - 'c_std=c89', + 'c_std=gnu89', 'cpp_std=c++11' ] ) diff --git a/packaging/nnstreamer.spec b/packaging/nnstreamer.spec index 9d7585f..f4a68a1 100644 --- a/packaging/nnstreamer.spec +++ b/packaging/nnstreamer.spec @@ -1,6 +1,7 @@ # Execute gbs with --define "testcoverage 1" in case that you must get unittest coverage statictics %define gstpostfix gstreamer-1.0 %define gstlibdir %{_libdir}/%{gstpostfix} +%define nnstexampledir /usr/lib/nnstreamer/bin Name: nnstreamer Summary: gstremaer plugins for neural networks @@ -18,7 +19,7 @@ Requires: gstreamer >= 1.8.0 BuildRequires: gstreamer-devel BuildRequires: gst-plugins-base-devel BuildRequires: glib2-devel -BuildRequires: cmake +BuildRequires: meson # To run test cases, we need gst plugins BuildRequires: gst-plugins-good @@ -95,31 +96,31 @@ CFLAGS="${CFLAGS} -fprofile-arcs -ftest-coverage" %endif mkdir -p build -pushd build -export GST_PLUGIN_PATH=$(pwd) -export LD_LIBRARY_PATH=$(pwd):$(pwd)/gst/tensor_filter %ifarch x86_64 aarch64 - %cmake .. -DGST_INSTALL_DIR=%{gstlibdir} -DINSTALL_EXAMPLE_APP=ON -DENABLE_TENSORFLOW=ON + meson --buildtype=plain --werror --prefix=%{_prefix} --libdir=%{_libdir} --bindir=%{nnstexampledir} --includedir=%{_includedir} -DINSTALL_EXAMPLES=true build %else - %cmake .. -DGST_INSTALL_DIR=%{gstlibdir} -DINSTALL_EXAMPLE_APP=ON + meson --buildtype=plain --werror --prefix=%{_prefix} --libdir=%{_libdir} --bindir=%{nnstexampledir} --includedir=%{_includedir} -DINSTALL_EXAMPLES=true -DENABLE_TENSORFLOW=false build %endif -make %{?_smp_mflags} +ninja -C build %{?_smp_mflags} + %if 0%{?unit_test} + pushd build + # Copy bmp2png for ssat + cp ./tests/bmp2png ../tests + export LD_LIBRARY_PATH=$(pwd):$(pwd)/gst/tensor_filter ./tests/unittest_common ./tests/unittest_sink --gst-plugin-path=. ./tests/unittest_plugins --gst-plugin-path=. popd pushd tests ssat -n + popd %endif -popd %install -pushd build -%make_install -popd +DESTDIR=%{buildroot} ninja -C build %{?_smp_mflags} install %if 0%{?testcoverage} ## @@ -187,7 +188,7 @@ install build/gst/tensor_filter/*.a %{buildroot}%{_libdir}/ %defattr(-,root,root,-) %license LICENSE %{_libdir}/*.so -/usr/lib/nnstreamer/bin/* +%{nnstexampledir}/* %exclude %{_libdir}/libtensor_filter_tflitecore.so %ifarch x86_64 aarch64 %exclude %{_libdir}/libtensor_filter_tfcore.so