mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-11 00:40:25 +00:00
define LOT_BUILD only for DLL
This commit is contained in:
parent
15e715103d
commit
a0f0f3c4cc
@ -23,6 +23,10 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
#ifdef LOT_EXPORT
|
||||||
|
#undef LOT_EXPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32 || defined __CYGWIN__
|
||||||
#ifdef LOT_BUILD
|
#ifdef LOT_BUILD
|
||||||
#define LOT_EXPORT __declspec(dllexport)
|
#define LOT_EXPORT __declspec(dllexport)
|
||||||
@ -451,4 +455,7 @@ template<> struct MapType<std::integral_constant<Property, Property::TrScale>>:
|
|||||||
|
|
||||||
} // namespace lotplayer
|
} // namespace lotplayer
|
||||||
|
|
||||||
|
#undef LOT_EXPORT
|
||||||
|
#define LOT_EXPORT
|
||||||
|
|
||||||
#endif // _RLOTTIE_H_
|
#endif // _RLOTTIE_H_
|
||||||
|
|||||||
@ -19,6 +19,10 @@
|
|||||||
#ifndef _RLOTTIE_COMMON_H_
|
#ifndef _RLOTTIE_COMMON_H_
|
||||||
#define _RLOTTIE_COMMON_H_
|
#define _RLOTTIE_COMMON_H_
|
||||||
|
|
||||||
|
#ifdef LOT_EXPORT
|
||||||
|
#undef LOT_EXPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32 || defined __CYGWIN__
|
||||||
#ifdef LOT_BUILD
|
#ifdef LOT_BUILD
|
||||||
#define LOT_EXPORT __declspec(dllexport)
|
#define LOT_EXPORT __declspec(dllexport)
|
||||||
@ -226,4 +230,7 @@ typedef struct LOTLayerNode {
|
|||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#undef LOT_EXPORT
|
||||||
|
#define LOT_EXPORT
|
||||||
|
|
||||||
#endif // _RLOTTIE_COMMON_H_
|
#endif // _RLOTTIE_COMMON_H_
|
||||||
|
|||||||
@ -5,7 +5,6 @@ project('rlottie',
|
|||||||
license : 'Apache')
|
license : 'Apache')
|
||||||
|
|
||||||
add_project_arguments('-DDEMO_DIR="@0@/example/resource/"'.format(meson.current_source_dir()), language : 'cpp')
|
add_project_arguments('-DDEMO_DIR="@0@/example/resource/"'.format(meson.current_source_dir()), language : 'cpp')
|
||||||
add_project_arguments('-DLOT_BUILD', language: 'cpp')
|
|
||||||
|
|
||||||
inc = [include_directories('inc')]
|
inc = [include_directories('inc')]
|
||||||
config_dir = include_directories('.')
|
config_dir = include_directories('.')
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
cc = meson.get_compiler('cpp')
|
cc = meson.get_compiler('cpp')
|
||||||
compiler_flags =[]
|
compiler_flags = []
|
||||||
if (cc.get_id() != 'msvc')
|
if (cc.get_id() != 'msvc')
|
||||||
compiler_flags = ['-fno-exceptions', '-fno-rtti',
|
compiler_flags = ['-fno-exceptions', '-fno-rtti',
|
||||||
'-fno-unwind-tables' , '-fno-asynchronous-unwind-tables',
|
'-fno-unwind-tables' , '-fno-asynchronous-unwind-tables',
|
||||||
@ -10,6 +10,8 @@ subdir('vector')
|
|||||||
subdir('lottie')
|
subdir('lottie')
|
||||||
subdir('binding')
|
subdir('binding')
|
||||||
|
|
||||||
|
compiler_flags += ['-DLOT_BUILD=1']
|
||||||
|
|
||||||
rlottie_lib_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',
|
rlottie_lib = shared_library('rlottie',
|
||||||
|
|||||||
@ -1,11 +1,14 @@
|
|||||||
|
|
||||||
source_file = ['stb_image.cpp']
|
source_file = ['stb_image.cpp']
|
||||||
|
|
||||||
|
compiler_flags = ['-DLOT_BUILD=1']
|
||||||
|
|
||||||
if get_option('module') == true
|
if get_option('module') == true
|
||||||
rlottie_image_loader_lib = shared_library('rlottie-image-loader',
|
rlottie_image_loader_lib = shared_library('rlottie-image-loader',
|
||||||
source_file,
|
source_file,
|
||||||
include_directories : [include_directories('.'), config_dir],
|
include_directories : [include_directories('.'), config_dir],
|
||||||
install : true,
|
install : true,
|
||||||
|
cpp_args : compiler_flags,
|
||||||
gnu_symbol_visibility : 'hidden',
|
gnu_symbol_visibility : 'hidden',
|
||||||
)
|
)
|
||||||
cc = meson.get_compiler('cpp')
|
cc = meson.get_compiler('cpp')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user