mirror of
https://github.com/janet-lang/janet
synced 2025-05-04 08:24:15 +00:00
Verify working meson build on windows.
Using MSVC, no need for GNU tools.
This commit is contained in:
parent
a29e717fd7
commit
bedd9ccaa1
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
@rem Set compile and link options here
|
@rem Set compile and link options here
|
||||||
@setlocal
|
@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
|
@set JANET_LINK=link /nologo
|
||||||
|
|
||||||
mkdir build
|
mkdir build
|
||||||
@ -132,7 +132,7 @@ copy README.md dist\README.md
|
|||||||
copy janet.lib dist\janet.lib
|
copy janet.lib dist\janet.lib
|
||||||
copy janet.exp dist\janet.exp
|
copy janet.exp dist\janet.exp
|
||||||
copy src\include\janet.h dist\janet.h
|
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
|
copy auxlib\cook.janet dist\cook.janet
|
||||||
|
|
||||||
|
10
meson.build
10
meson.build
@ -19,9 +19,7 @@
|
|||||||
# IN THE SOFTWARE.
|
# IN THE SOFTWARE.
|
||||||
|
|
||||||
project('janet', 'c',
|
project('janet', 'c',
|
||||||
default_options : ['c_std=c99', 'b_lundef=false', 'default_library=both',
|
default_options : ['c_std=c99', 'b_lundef=false', 'default_library=both'],
|
||||||
'strip=true', 'optimization=2', 'werror=true',
|
|
||||||
'debug=false'],
|
|
||||||
version : '1.0.0-dev')
|
version : '1.0.0-dev')
|
||||||
|
|
||||||
# Global settings
|
# Global settings
|
||||||
@ -34,7 +32,9 @@ m_dep = cc.find_library('m', required : false)
|
|||||||
dl_dep = cc.find_library('dl', required : false)
|
dl_dep = cc.find_library('dl', required : false)
|
||||||
|
|
||||||
# Link options
|
# 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
|
# Generate custom janetconf.h
|
||||||
conf = configuration_data()
|
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('JANET_VERSION_PATCH', last_parts[0].to_int())
|
||||||
conf.set_quoted('JANET_VERSION', meson.project_version())
|
conf.set_quoted('JANET_VERSION', meson.project_version())
|
||||||
# Use options
|
# 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_NO_NANBOX', not get_option('nanbox'))
|
||||||
conf.set('JANET_SINGLE_THREADED', not get_option('single_threaded'))
|
conf.set('JANET_SINGLE_THREADED', not get_option('single_threaded'))
|
||||||
conf.set('JANET_NO_DYNAMIC_MODULES', not get_option('dynamic_modules'))
|
conf.set('JANET_NO_DYNAMIC_MODULES', not get_option('dynamic_modules'))
|
||||||
|
@ -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('single_threaded', type : 'boolean', value : false)
|
||||||
option('nanbox', type : 'boolean', value : true)
|
option('nanbox', type : 'boolean', value : true)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user