mm-resource-manager is not available at Tizen 4.0.
Do not depend on Tizen API mm-resource-manager if it is Tizen 4.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
#define set_feature_state(...) ml_tizen_set_feature_state(__VA_ARGS__)
#define convert_tizen_element(...) ml_tizen_convert_element(__VA_ARGS__)
+
+#if (TIZENVERSION >= 5) && (TIZENVERSION < 9999)
#define get_tizen_resource(...) ml_tizen_get_resource(__VA_ARGS__)
#define release_tizen_resource(...) ml_tizen_release_resource(__VA_ARGS__)
+#elif (TIZENVERSION < 5)
+#define get_tizen_resource(...) (0)
+#define release_tizen_resource(...) do { } while (0)
+#else
+#error Tizen version is not defined.
+#endif
+
#else
#define check_feature_state()
#define set_feature_state(...)
if (get_option('enable-tizen'))
message('CAPI is in Tizen mode')
- tizen_deps = [
- dependency('dpm'),
- dependency('mm-resource-manager'),
- dependency('mm-camcorder'),
- dependency('capi-privacy-privilege-manager'),
- dependency('capi-base-common'),
- dependency('capi-system-info'),
- dependency('dlog')
- ]
+ if (tizenVmajor == 4)
+ tizen_deps = [
+ dependency('dpm'),
+ dependency('mm-camcorder'),
+ dependency('capi-privacy-privilege-manager'),
+ dependency('capi-base-common'),
+ dependency('capi-system-info'),
+ dependency('dlog')
+ ]
+ else
+ tizen_deps = [
+ dependency('dpm'),
+ dependency('mm-resource-manager'),
+ dependency('mm-camcorder'),
+ dependency('capi-privacy-privilege-manager'),
+ dependency('capi-base-common'),
+ dependency('capi-system-info'),
+ dependency('dlog')
+ ]
+ endif
capi_deps += tizen_deps
endif
# Pass __TIZEN__ to the compiler
add_project_arguments('-D__TIZEN__=1', language: ['c', 'cpp'])
build_platform = 'tizen'
+
+ tizenVmajor = get_option('tizen-version-major')
+ add_project_arguments('-DTIZENVERSION='+tizenVmajor.to_string(), language: ['c', 'cpp'])
+
elif not meson.is_cross_build()
if cc.get_id() == 'clang' and cxx.get_id() == 'clang'
if build_machine.system() == 'darwin'
option('enable-capi', type: 'boolean', value: false)
option('enable-python', type: 'boolean', value: false)
option('enable-tizen', type: 'boolean', value: false)
+option('tizen-version-major', type: 'integer', min : 4, max : 9999, value: 9999) # 9999 means "not Tizen"
option('enable-element-restriction', type: 'boolean', value: false) # true to restrict gst-elements in api
option('restricted-elements', type: 'string', value: '')
option('enable-tflite-nnapi-delegation', type: 'boolean', value: false) # true to enable tensorflow-lite to delegate nnapi interpretation to nnfw backend in tizen
# To run test cases, we need gst plugins
BuildRequires: gst-plugins-good
+%if 0%{tizen_version_major} >= 5
BuildRequires: gst-plugins-good-extra
+%endif
BuildRequires: gst-plugins-base
# and gtest
BuildRequires: gtest-devel
%endif
%if %{with tizen}
BuildRequires: pkgconfig(dpm)
+%if 0%{tizen_version_major} >= 5
BuildRequires: pkgconfig(mm-resource-manager)
+%endif
BuildRequires: pkgconfig(mm-camcorder)
BuildRequires: pkgconfig(capi-privacy-privilege-manager)
BuildRequires: pkgconfig(capi-system-info)
%endif
%if %{with tizen}
-%define enable_tizen -Denable-tizen=true -Denable-tizen-sensor=true
+%define enable_tizen -Denable-tizen=true -Denable-tizen-sensor=true -Dtizen-version-major=0%{tizen_version_major}
%define enable_api -Denable-capi=true
%ifarch %arm aarch64
%define enable_nnfw_runtime -Denable-nnfw-runtime=true