|
| 1 | +cpp_sources = [ |
| 2 | + 'ast.cpp', |
| 3 | + 'ast_values.cpp', |
| 4 | + 'ast_supports.cpp', |
| 5 | + 'ast_sel_cmp.cpp', |
| 6 | + 'ast_sel_unify.cpp', |
| 7 | + 'ast_sel_super.cpp', |
| 8 | + 'ast_sel_weave.cpp', |
| 9 | + 'ast_selectors.cpp', |
| 10 | + 'context.cpp', |
| 11 | + 'constants.cpp', |
| 12 | + 'fn_utils.cpp', |
| 13 | + 'fn_miscs.cpp', |
| 14 | + 'fn_maps.cpp', |
| 15 | + 'fn_lists.cpp', |
| 16 | + 'fn_colors.cpp', |
| 17 | + 'fn_numbers.cpp', |
| 18 | + 'fn_strings.cpp', |
| 19 | + 'fn_selectors.cpp', |
| 20 | + 'color_maps.cpp', |
| 21 | + 'environment.cpp', |
| 22 | + 'ast_fwd_decl.cpp', |
| 23 | + 'bind.cpp', |
| 24 | + 'file.cpp', |
| 25 | + 'util.cpp', |
| 26 | + 'util_string.cpp', |
| 27 | + 'json.cpp', |
| 28 | + 'units.cpp', |
| 29 | + 'values.cpp', |
| 30 | + 'plugins.cpp', |
| 31 | + 'source.cpp', |
| 32 | + 'position.cpp', |
| 33 | + 'lexer.cpp', |
| 34 | + 'parser.cpp', |
| 35 | + 'parser_selectors.cpp', |
| 36 | + 'prelexer.cpp', |
| 37 | + 'eval.cpp', |
| 38 | + 'eval_selectors.cpp', |
| 39 | + 'expand.cpp', |
| 40 | + 'listize.cpp', |
| 41 | + 'cssize.cpp', |
| 42 | + 'extender.cpp', |
| 43 | + 'extension.cpp', |
| 44 | + 'stylesheet.cpp', |
| 45 | + 'output.cpp', |
| 46 | + 'inspect.cpp', |
| 47 | + 'emitter.cpp', |
| 48 | + 'check_nesting.cpp', |
| 49 | + 'remove_placeholders.cpp', |
| 50 | + 'sass.cpp', |
| 51 | + 'sass_values.cpp', |
| 52 | + 'sass_context.cpp', |
| 53 | + 'sass_functions.cpp', |
| 54 | + 'sass2scss.cpp', |
| 55 | + 'backtrace.cpp', |
| 56 | + 'operators.cpp', |
| 57 | + 'ast2c.cpp', |
| 58 | + 'c2ast.cpp', |
| 59 | + 'to_value.cpp', |
| 60 | + 'source_map.cpp', |
| 61 | + 'error_handling.cpp', |
| 62 | + 'memory/allocator.cpp', |
| 63 | + 'memory/shared_ptr.cpp', |
| 64 | + 'utf8_string.cpp', |
| 65 | + 'base64vlq.cpp', |
| 66 | +] |
| 67 | + |
| 68 | +c_sources = [ |
| 69 | + 'cencode.c', |
| 70 | +] |
| 71 | + |
| 72 | +sass_sources = cpp_sources + c_sources |
| 73 | + |
| 74 | +if host_machine.system() == 'windows' |
| 75 | + windows = import('windows') |
| 76 | + sass_sources += [windows.compile_resources(winres_path)] |
| 77 | +endif |
| 78 | + |
| 79 | +dl_dep = cpp.find_library('dl', required : false) |
| 80 | + |
| 81 | +libsass = shared_library( |
| 82 | + 'sass', |
| 83 | + sass_sources, |
| 84 | + dependencies: [dl_dep], |
| 85 | + c_args: ['-DADD_EXPORTS'], |
| 86 | + cpp_args: ['-DADD_EXPORTS'], |
| 87 | + include_directories: inc, |
| 88 | + install: true) |
| 89 | + |
| 90 | +libsass_dep = declare_dependency( |
| 91 | + link_with: libsass, |
| 92 | + include_directories: [inc]) |
| 93 | + |
| 94 | +conf_data = configuration_data() |
| 95 | +conf_data.set('prefix', get_option('prefix')) |
| 96 | +conf_data.set('exec_prefix', '${prefix}') |
| 97 | +conf_data.set('libdir', join_paths('${exec_prefix}', get_option('libdir'))) |
| 98 | +conf_data.set('includedir', join_paths('${prefix}', get_option('includedir'))) |
| 99 | +conf_data.set('VERSION', meson.project_version()) |
| 100 | + |
| 101 | +pkg_install_dir = join_paths(get_option('libdir'), 'pkgconfig') |
| 102 | + |
| 103 | +configure_file( |
| 104 | + input: 'support/libsass.pc.in', |
| 105 | + output: 'libsass.pc', |
| 106 | + configuration: conf_data, |
| 107 | + install_dir: pkg_install_dir) |
0 commit comments