rlottie: refactor meson build file

This commit is contained in:
sub.mohanty@samsung.com
2019-06-29 18:13:16 +09:00
committed by Subhransu
parent 5b79983f0a
commit e99767bb90
8 changed files with 97 additions and 39 deletions

View File

@@ -20,8 +20,6 @@
//#define DEBUG_PARSER
//#define DEBUG_PRINT_TREE
// This parser implements JSON token-by-token parsing with an API that is
// more direct; we don't have to create handler object and
// callbacks. Instead, we retrieve values from the JSON stream by calling
@@ -2032,7 +2030,7 @@ void LottieParserImpl::parseProperty(LOTAnimatable<T> &obj)
}
}
#ifdef DEBUG_PRINT_TREE
#if LOTTIE_DUMP_TREE_SUPPORT
class LOTDataInspector {
public:
@@ -2233,7 +2231,7 @@ std::shared_ptr<LOTModel> LottieParser::model()
model->mRoot = d->composition();
model->mRoot->processRepeaterObjects();
#ifdef DEBUG_PRINT_TREE
#if LOTTIE_DUMP_TREE_SUPPORT
LOTDataInspector inspector;
inspector.visit(model->mRoot.get(), "");
#endif

View File

@@ -8,7 +8,7 @@ library_deps += binding_dep
rlottie_lib = shared_library('rlottie',
include_directories : inc,
version : rlottie_lib_version,
version : meson.project_version(),
dependencies : library_deps,
install : true
)

View File

@@ -1,16 +0,0 @@
#ifndef CONFIG_H
#define CONFIG_H
// enable threading
#define LOTTIE_THREAD_SUPPORT
//enable logging
//#define LOTTIE_LOGGING_SUPPORT
//enable static building of image loader
//#define LOTTIE_STATIC_IMAGE_LOADER
//enable lottie model caching
#define LOTTIE_CACHE_SUPPORT
#endif // CONFIG_H

View File

@@ -5,6 +5,8 @@ subdir('stb')
vector_dep = [freetype_dep]
vector_dep += pixman_dep
vector_dep += stb_dep
source_file = files('vdasher.cpp')
source_file += files('vbrush.cpp')
@@ -28,11 +30,10 @@ source_file += files('vbezier.cpp')
source_file += files('vraster.cpp')
source_file += files('vimageloader.cpp')
# dl dependancy for dlopen, dlsym, dlclose symbol
cc = meson.get_compiler('cpp')
vector_dep += cc.find_library('dl', required : false)
inc_dir = [include_directories('.')]
inc_dir += config_dir
vector_dep += declare_dependency( include_directories : include_directories('.'),
vector_dep += declare_dependency( include_directories : inc_dir,
sources : source_file
)

View File

@@ -1,8 +1,19 @@
rlottie_image_loader_sources = ['stb_image.cpp']
source_file = ['stb_image.cpp']
if get_option('module') == true
rlottie_image_loader_lib = shared_library('rlottie-image-loader',
source_file,
install : true
)
# dl dependancy for dlopen, dlsym, dlclose symbol
cc = meson.get_compiler('cpp')
stb_dep = cc.find_library('dl', required : false)
else
stb_dep = declare_dependency(
include_directories : include_directories('.'),
sources : source_file
)
endif
rlottie_image_loader_lib = shared_library('rlottie-image-loader',
rlottie_image_loader_sources,
install : true
)

View File

@@ -35,7 +35,7 @@ struct VImageLoader::Impl {
lottie_image_free_f imageFree{nullptr};
lottie_image_load_data_f imageFromData{nullptr};
#ifndef LOTTIE_STATIC_IMAGE_LOADER
#if LOTTIE_IMAGE_MODULE_SUPPORT
#ifdef WIN32
HMODULE dl_handle{nullptr};
bool moduleLoad()