rlottie/meson: make rlottie buildable as a subproject
authorsubhransu mohanty <sub.mohanty@samsung.com>
Thu, 4 Jul 2019 10:47:51 +0000 (19:47 +0900)
committerHermet Park <hermetpark@gmail.com>
Wed, 10 Jul 2019 01:59:08 +0000 (10:59 +0900)
example/meson.build
src/meson.build
test/meson.build

index 5526a18..7505801 100644 (file)
@@ -16,7 +16,7 @@ executable('lottie2gif',
 executable('vectorTest',
            'vectortest.cpp',
            include_directories : inc,
-           dependencies : [rlottie_dep])
+           dependencies : [rlottie_lib_dep])
 
 demo_dep = dependency('elementary', required : false)
 
index c177764..87f927b 100644 (file)
@@ -10,17 +10,22 @@ subdir('vector')
 subdir('lottie')
 subdir('binding')
 
-rlottie_dep  = [ vector_dep, lottie_dep, binding_dep, dependency('threads')]
+rlottie_lib_dep  = [ vector_dep, lottie_dep, binding_dep, dependency('threads')]
 
 rlottie_lib = shared_library('rlottie',
                              include_directories : inc,
                              version             : meson.project_version(),
-                             dependencies        : rlottie_dep,
+                             dependencies        : rlottie_lib_dep,
                              install             : true,
                              cpp_args            : compiler_flags,
                              gnu_symbol_visibility : 'hidden',
                             )
 
+# Make rlottie library usable as a Meson subproject.
+rlottie_dep = declare_dependency(
+                                 include_directories: inc,
+                                 link_with : rlottie_lib)
+
 pkg_mod = import('pkgconfig')
 
 pkg_mod.generate( libraries   : rlottie_lib,
index 69fff15..2b982dc 100644 (file)
@@ -12,7 +12,7 @@ vector_testsuite = executable('vectorTestSuite',
                               vector_test_sources,
                               include_directories : inc,
                               override_options : override_default,
-                              dependencies : [gtest_dep, rlottie_dep],
+                              dependencies : [gtest_dep, rlottie_lib_dep],
                               )
 
 test('Vector Testsuite', vector_testsuite)