Verify working meson build on windows.

Using MSVC, no need for GNU tools.
This commit is contained in:
Calvin Rose 2019-06-20 17:28:22 -04:00
parent a29e717fd7
commit bedd9ccaa1
3 changed files with 8 additions and 8 deletions

View File

@ -16,7 +16,7 @@
@rem Set compile and link options here
@setlocal
@set JANET_COMPILE=cl /nologo /Isrc\include /c /O2 /W3 /LD /D_CRT_SECURE_NO_WARNINGS
@set JANET_COMPILE=cl /nologo /Isrc\include /Isrc\conf /c /O2 /W3 /LD /D_CRT_SECURE_NO_WARNINGS
@set JANET_LINK=link /nologo
mkdir build
@ -132,7 +132,7 @@ copy README.md dist\README.md
copy janet.lib dist\janet.lib
copy janet.exp dist\janet.exp
copy src\include\janet.h dist\janet.h
copy src\include\janetconf.h dist\janetconf.h
copy src\conf\janetconf.h dist\janetconf.h
copy auxlib\cook.janet dist\cook.janet

View File

@ -19,9 +19,7 @@
# IN THE SOFTWARE.
project('janet', 'c',
default_options : ['c_std=c99', 'b_lundef=false', 'default_library=both',
'strip=true', 'optimization=2', 'werror=true',
'debug=false'],
default_options : ['c_std=c99', 'b_lundef=false', 'default_library=both'],
version : '1.0.0-dev')
# Global settings
@ -34,7 +32,9 @@ m_dep = cc.find_library('m', required : false)
dl_dep = cc.find_library('dl', required : false)
# Link options
add_project_link_arguments('-rdynamic', language : 'c')
if build_machine.system() != 'windows'
add_project_link_arguments('-rdynamic', language : 'c')
endif
# Generate custom janetconf.h
conf = configuration_data()
@ -50,7 +50,7 @@ conf.set('JANET_VERSION_MINOR', version_parts[1].to_int())
conf.set('JANET_VERSION_PATCH', last_parts[0].to_int())
conf.set_quoted('JANET_VERSION', meson.project_version())
# Use options
conf.set_quoted('JANET_BUILD', get_option('build_hash'))
conf.set_quoted('JANET_BUILD', get_option('git_hash'))
conf.set('JANET_NO_NANBOX', not get_option('nanbox'))
conf.set('JANET_SINGLE_THREADED', not get_option('single_threaded'))
conf.set('JANET_NO_DYNAMIC_MODULES', not get_option('dynamic_modules'))

View File

@ -1,4 +1,4 @@
option('build_hash', type : 'string', value : 'meson')
option('git_hash', type : 'string', value : 'meson')
option('single_threaded', type : 'boolean', value : false)
option('nanbox', type : 'boolean', value : true)