Fix line endings

pull/658/head
Orfeas Zafeiris 2018-06-06 10:02:37 +03:00
parent 814377890f
commit 4e7c194789
3 changed files with 69 additions and 69 deletions

View File

@ -1,60 +1,60 @@
project('sol2', 'cpp')
# Find lua dependency
if get_option('lua_cpp')
lua_cpp = 'true'
else
lua_cpp = 'false'
endif
lua_dep = dependency('lua', fallback: [ 'lua', 'lua_dep' ], default_options: [ 'lua_cpp=' + lua_cpp ])
# Set compiler flags if we're compiling lua as C++.
compile_args = []
if get_option('lua_cpp')
compile_args = [ '-DSOL_USING_CXX_LUA=1' ]
endif
# Expose standard dependency.
sol2_dep = declare_dependency(
include_directories: include_directories('.'),
compile_args: compile_args,
dependencies: [ lua_dep ],
)
# Single header targets requested.
if get_option('single')
# Check if we have python installed (required for creating single).
python = find_program('python3', required: false)
if not python.found()
python = find_program('python', required: false)
endif
if not python.found()
error('Could not locate Python. Python is required when building a single header.')
endif
# List all headers that the single header comprises of.
cmd = run_command(python, 'list-headers.py')
if cmd.returncode() != 0
error('Could not list sol2 header files.')
endif
# Create our custom target to generate the single header file.
sol2_single = custom_target('sol2_single',
input: cmd.stdout().strip().split('\n'),
output: 'sol.hpp',
command: [ python, files('single.py'), '--output', '@OUTPUT@' ]
)
# Expose the dependency.
sol2_dep = declare_dependency(
sources: [ sol2_single ],
compile_args: compile_args,
dependencies: [ lua_dep ],
)
project('sol2', 'cpp')
# Find lua dependency
if get_option('lua_cpp')
lua_cpp = 'true'
else
lua_cpp = 'false'
endif
lua_dep = dependency('lua', fallback: [ 'lua', 'lua_dep' ], default_options: [ 'lua_cpp=' + lua_cpp ])
# Set compiler flags if we're compiling lua as C++.
compile_args = []
if get_option('lua_cpp')
compile_args = [ '-DSOL_USING_CXX_LUA=1' ]
endif
# Expose standard dependency.
sol2_dep = declare_dependency(
include_directories: include_directories('.'),
compile_args: compile_args,
dependencies: [ lua_dep ],
)
# Single header targets requested.
if get_option('single')
# Check if we have python installed (required for creating single).
python = find_program('python3', required: false)
if not python.found()
python = find_program('python', required: false)
endif
if not python.found()
error('Could not locate Python. Python is required when building a single header.')
endif
# List all headers that the single header comprises of.
cmd = run_command(python, 'list-headers.py')
if cmd.returncode() != 0
error('Could not list sol2 header files.')
endif
# Create our custom target to generate the single header file.
sol2_single = custom_target('sol2_single',
input: cmd.stdout().strip().split('\n'),
output: 'sol.hpp',
command: [ python, files('single.py'), '--output', '@OUTPUT@' ]
)
# Expose the dependency.
sol2_dep = declare_dependency(
sources: [ sol2_single ],
compile_args: compile_args,
dependencies: [ lua_dep ],
)
endif

View File

@ -1,2 +1,2 @@
option('single', type: 'boolean', value: false, description: 'Generate the sol2 single header and expose the corresponding build targets')
option('single', type: 'boolean', value: false, description: 'Generate the sol2 single header and expose the corresponding build targets')
option('lua_cpp', type: 'boolean', value: false, description: 'Compile lua as C++ code')

View File

@ -1,10 +1,10 @@
[wrap-file]
directory = lua-5.3.4
source_url = https://www.lua.org/ftp/lua-5.3.4.tar.gz
source_filename = lua-5.3.4.tar.gz
source_hash = f681aa518233bc407e23acf0f5887c884f17436f000d453b2491a9f11a52400c
patch_url = https://github.com/OrfeasZ/lua-meson/releases/download/v5.3.4/lua-5.3.4-wrap.zip
patch_filename = lua-5.3.4-wrap.zip
[wrap-file]
directory = lua-5.3.4
source_url = https://www.lua.org/ftp/lua-5.3.4.tar.gz
source_filename = lua-5.3.4.tar.gz
source_hash = f681aa518233bc407e23acf0f5887c884f17436f000d453b2491a9f11a52400c
patch_url = https://github.com/OrfeasZ/lua-meson/releases/download/v5.3.4/lua-5.3.4-wrap.zip
patch_filename = lua-5.3.4-wrap.zip
patch_hash = 400ca3e7f2a7e2a8363abe7a25f339b87488d56a1351ad843931a4d097624e57