-
Notifications
You must be signed in to change notification settings - Fork 468
[WIP] Build with Meson #3073
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
SolarLiner
wants to merge
15
commits into
sass:master
Choose a base branch
from
SolarLiner:feature/meson
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[WIP] Build with Meson #3073
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
1e613e5
[WIP] Add meson.build for project
SolarLiner 22e7fc1
Add `install: true` to libsass target
SolarLiner 6f66286
Add instructions to install include dir and headers
SolarLiner 824cbab
Add warning about non-virtual destructors to cpp compiler
SolarLiner fa617f4
Use lazka's version of the include meson.build
SolarLiner a1b75e6
Add support for the Windows resource files
SolarLiner a8851fa
Add ADD_EXPORTS defines on library exports
SolarLiner 53291a5
Add SASS_CUSTOM_ALLOCATOR option for Meson
SolarLiner ad6019a
Add builds with meson to CI
SolarLiner f09cbfa
Add meson and ninja dependencies from pip3
SolarLiner ae4d352
Try with pip? Reading documentation is hard
SolarLiner 30f1be1
Revert "Try with pip? Reading documentation is hard"
SolarLiner 3f40650
Add pip3 addon on linux installs
SolarLiner 998ab03
Add python3-setuptools to apt addons
SolarLiner 675017a
Use pip3 on Linux and pip otherwise
SolarLiner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
plugin = shared_library('plugin', 'plugin.cpp', dependencies: [sass_dep]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
sass_inc = include_directories('.') | ||
version_h = configure_file(input: 'sass/version.h.in', output: 'version.h', | ||
configuration: {'PACKAGE_VERSION': meson.version()} | ||
) | ||
|
||
install_subdir('sass', install_dir: get_option('includedir'), exclude_files: ['version.h', 'version.h.in']) | ||
install_headers('sass.h', 'sass2scss.h', version_h, subdir: 'sass') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
project('libsass', 'c', 'cpp', version: '3.6.4', meson_version: '>=0.49', default_options: ['c_std=c11','cpp_std=c++11']) | ||
cpp = meson.get_compiler('cpp') | ||
if target_machine.system() == 'windows' | ||
add_project_arguments('-D_WIN32', cpp.get_supported_arguments('-Wno-non-virtual-dtor'), language: 'cpp') | ||
endif | ||
|
||
deps = [ | ||
meson.get_compiler('cpp').find_library('dl', required: false) | ||
] | ||
|
||
subdir('res') # Must be before src as src_res is declared here and used there | ||
subdir('include') | ||
subdir('src') | ||
subdir('contrib') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
option('SASS_CUSTOM_ALLOCATOR', type: 'boolean', value: false, description: 'Activate a custom allocator for performance improvements') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
winres_path = files('resource.rc') | ||
src_res = [] | ||
|
||
if host_machine.system() == 'windows' | ||
src_res += [import('windows').compile_resources(winres_path)] | ||
endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
src_memory = files( | ||
'allocator.cpp', | ||
'shared_ptr.cpp' | ||
) | ||
memory_lib_args = [] | ||
if get_option('SASS_CUSTOM_ALLOCATOR') | ||
memory_lib_args += ['-DSASS_CUSTOM_ALLOCATOR'] | ||
endif | ||
memory_lib = static_library('memory', src_memory, include_directories: sass_inc, cpp_args: memory_lib_args) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
src_cpp = files( | ||
'ast.cpp', | ||
'ast2c.cpp', | ||
'ast_fwd_decl.cpp', | ||
'ast_sel_cmp.cpp', | ||
'ast_sel_super.cpp', | ||
'ast_sel_unify.cpp', | ||
'ast_sel_weave.cpp', | ||
'ast_selectors.cpp', | ||
'ast_supports.cpp', | ||
'ast_values.cpp', | ||
'backtrace.cpp', | ||
'base64vlq.cpp', | ||
'bind.cpp', | ||
'c2ast.cpp', | ||
'check_nesting.cpp', | ||
'color_maps.cpp', | ||
'constants.cpp', | ||
'context.cpp', | ||
'cssize.cpp', | ||
'emitter.cpp', | ||
'environment.cpp', | ||
'error_handling.cpp', | ||
'eval.cpp', | ||
'eval_selectors.cpp', | ||
'expand.cpp', | ||
'extender.cpp', | ||
'extension.cpp', | ||
'file.cpp', | ||
'fn_colors.cpp', | ||
'fn_lists.cpp', | ||
'fn_maps.cpp', | ||
'fn_miscs.cpp', | ||
'fn_numbers.cpp', | ||
'fn_selectors.cpp', | ||
'fn_strings.cpp', | ||
'fn_utils.cpp', | ||
'inspect.cpp', | ||
'json.cpp', | ||
'lexer.cpp', | ||
'listize.cpp', | ||
'operators.cpp', | ||
'output.cpp', | ||
'parser.cpp', | ||
'parser_selectors.cpp', | ||
'plugins.cpp', | ||
'position.cpp', | ||
'prelexer.cpp', | ||
'remove_placeholders.cpp', | ||
'sass.cpp', | ||
'sass2scss.cpp', | ||
'sass_context.cpp', | ||
'sass_functions.cpp', | ||
'sass_values.cpp', | ||
'source.cpp', | ||
'source_map.cpp', | ||
'stylesheet.cpp', | ||
'to_value.cpp', | ||
'units.cpp', | ||
'utf8_string.cpp', | ||
'util.cpp', | ||
'util_string.cpp', | ||
'values.cpp' | ||
) | ||
src_c = files( | ||
'c99func.c', | ||
'cencode.c' | ||
) | ||
|
||
subdir('memory') | ||
|
||
sass_lib = library('sass', src_cpp, src_c, src_res, | ||
include_directories: sass_inc, | ||
dependencies: deps, | ||
c_args: ['-DADD_EXPORTS'], | ||
cpp_args: ['-DADD_EXPORTS'], | ||
install: true | ||
) | ||
|
||
sass_dep = declare_dependency(link_with: sass_lib, include_directories: sass_inc) | ||
|
||
import('pkgconfig').generate( | ||
sass_lib, | ||
description: 'A C implementation of a Sass compiler' | ||
) |
Empty file.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.