3 default_options : ['warning_level=3', 'werror=true', 'cpp_std=c++14', 'optimization=s'],
6 meson_version : '>=0.49',
9 add_project_arguments('-DDEMO_DIR="@0@/example/resource/"'.format(meson.current_source_dir()), language : 'cpp')
11 inc = [include_directories('inc')]
12 config_dir = include_directories('.')
15 config_h = configuration_data()
17 if get_option('thread') == true
18 config_h.set10('LOTTIE_THREAD_SUPPORT', true)
21 if get_option('module') == true
22 config_h.set10('LOTTIE_IMAGE_MODULE_SUPPORT', true)
24 if meson.get_compiler('cpp').get_id() != 'msvc'
29 if host_machine.system() == 'darwin'
31 elif host_machine.system() == 'windows'
36 if get_option('moduledir') != ''
37 config_h.set_quoted('LOTTIE_IMAGE_MODULE_PLUGIN',
38 get_option('prefix') / get_option('moduledir') / lib_prefix + 'rlottie-image-loader' + lib_suffix)
40 config_h.set_quoted('LOTTIE_IMAGE_MODULE_PLUGIN', lib_prefix + 'rlottie-image-loader' + lib_suffix)
44 if get_option('cache') == true
45 config_h.set10('LOTTIE_CACHE_SUPPORT', true)
48 if get_option('log') == true
49 config_h.set10('LOTTIE_LOGGING_SUPPORT', true)
52 if get_option('dumptree') == true
53 config_h.set10('LOTTIE_LOGGING_SUPPORT', true)
54 config_h.set10('LOTTIE_DUMP_TREE_SUPPORT', true)
60 configuration: config_h
67 if get_option('example') == true
71 if get_option('test') == true
76 if get_option('cmake') == true and host_machine.system() != 'windows'
77 cmake_bin = find_program('cmake', required: false)
79 cmake = import('cmake')
80 cmake.write_basic_package_version_file(
81 version: meson.project_version(),
85 cmakeconf = configuration_data()
86 cmakeconf.set('VERSION', meson.project_version())
88 cmake.configure_package_config_file(
89 input: meson.current_source_dir() + '/cmake/rlottieConfig.cmake.in',
91 configuration: cmakeconf,
108 meson.project_version(),
109 get_option('buildtype'),
110 get_option('thread'),
111 get_option('module'),
113 get_option('example'),
115 get_option('prefix'),