From 4e7c1947893f0d19fa1a3bd9d150eda90129887d Mon Sep 17 00:00:00 2001 From: Orfeas Zafeiris Date: Wed, 6 Jun 2018 10:02:37 +0300 Subject: [PATCH] Fix line endings --- meson.build | 118 +++++++++++++++++++++---------------------- meson_options.txt | 2 +- subprojects/lua.wrap | 18 +++---- 3 files changed, 69 insertions(+), 69 deletions(-) diff --git a/meson.build b/meson.build index dad6df24..d1f273c9 100644 --- a/meson.build +++ b/meson.build @@ -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 \ No newline at end of file diff --git a/meson_options.txt b/meson_options.txt index b0155d65..dc6ddd9c 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -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') \ No newline at end of file diff --git a/subprojects/lua.wrap b/subprojects/lua.wrap index d709cbf2..ef8ecff4 100644 --- a/subprojects/lua.wrap +++ b/subprojects/lua.wrap @@ -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 \ No newline at end of file