-project('rive-tizen',
+project('rive_tizen',
'cpp',
version : '0.1.0',
license : 'MIT')
-subdir('lib')
+#thorvg_dep = dependency('thorvg', required : true)
-thorvg_dep = dependency('thorvg', required : true)
+headers = [include_directories('inc')]
-rive-tizen_lib = library(
- 'rive-tizen',
- include_directories : [headers, math_headers, thorvg_headers],
+rive_tizen_src = [
+ 'src/rive_tizen.cpp',
+]
+
+install_headers([
+ 'inc/rive_tizen.hpp',
+ ])
+
+rive_tizen_dep = declare_dependency(
+ include_directories : include_directories('.'),
+ sources : rive_tizen_src
+)
+
+rive_src = [
+ 'submodule/src/math/aabb.cpp',
+ 'submodule/src/math/vec2d.cpp',
+]
+
+rive_dep = declare_dependency(
+ include_directories : include_directories(['submodule/include']),
+ sources : rive_src
+)
+
+rive_tizen_lib = library(
+ 'rive_tizen',
+ include_directories : [headers],
version : meson.project_version(),
- dependencies : [math_dep, rive-tizen_dep, rive-tizen_render_dep, thorvg_dep],
+ dependencies : [rive_tizen_dep, rive_dep],
install : true,
- gnu_symbol_visibility : 'hidden',
+ gnu_symbol_visibility : 'hidden',
)
-rive-tizen_lib_dep = declare_dependency(
- include_directories : [headers, math_headers, thorvg_headers],
- link_with : rive-tizen_lib
+rive_tizen_lib_dep = declare_dependency(
+ include_directories : [headers],
+ link_with : rive_tizen_lib
)
pkg_mod = import('pkgconfig')
pkg_mod.generate(
- libraries : rive-tizen_lib,
+ libraries : rive_tizen_lib,
version : meson.project_version(),
- name : 'librive-tizen',
- filebase : 'rive-tizen',
+ name : 'librive_tizen',
+ filebase : 'rive_tizen',
description : 'A Rive Animation Tizen Runtime Engine'
)
subdir('example')
-subdir('assets')
-
--- /dev/null
+diff --git include/math/aabb.hpp include/math/aabb.hpp
+index 6e5114e..1824756 100644
+--- include/math/aabb.hpp
++++ include/math/aabb.hpp
+@@ -15,10 +15,6 @@ namespace rive
+ float buffer[4];
+ struct
+ {
+- Vec2D min, max;
+- };
+- struct
+- {
+ float minX, minY, maxX, maxY;
+ };
+ };
+@@ -48,4 +44,4 @@ namespace rive
+ float perimeter() const;
+ };
+ } // namespace rive
+-#endif
+\ No newline at end of file
++#endif
+diff --git src/math/aabb.cpp src/math/aabb.cpp
+index 94de5d0..a7ea1db 100644
+--- src/math/aabb.cpp
++++ src/math/aabb.cpp
+@@ -77,9 +77,9 @@ bool AABB::areIdentical(const AABB& a, const AABB& b)
+ return a[0] == b[0] && a[1] == b[1] && a[2] == b[2] && a[3] == b[3];
+ }
+
+-float AABB::width() const { return max[0] - min[0]; }
++float AABB::width() const { return buffer[2] - buffer[0]; }
+
+-float AABB::height() const { return max[1] - min[1]; }
++float AABB::height() const { return buffer[3] - buffer[1]; }
+
+ float AABB::perimeter() const
+ {