Skip to content

Commit 80c1c71

Browse files
committed
fix deprecation warning
this is somehow even more hacky than whatI was doing before, but it works (until it inevitably breaks)
1 parent de790fe commit 80c1c71

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

external/include/meson.build

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ external_inc_dirs = [include_directories('boost_1_75',
66
'thread-pool-3.5.0/include',
77
'hopscotch-map-2.3.1/include',)]
88
if host_machine.system() in ['linux', 'darwin']
9+
luajit_proj = subproject('LuaJIT-2.1', default_options: ['header_only=true'])
10+
external_inc_dirs += luajit_proj.get_variable('luajit_source_dir')
911
endif
1012
if host_machine.system() == 'windows'
1113
external_inc_dirs += include_directories('LZ4-1.9.3/LZ4',)

external/meson.build

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
subdir('include')
22
subdir('lib')
3-
subdir('sources')
4-
external_inc_dirs += include_directories('sources/LuaJIT-2.1/src')
3+
subdir('sources')

external/sources/LuaJIT-2.1/meson.build

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Meson files from github.com/franko/luajit
22
project('luajit', 'c', version : '2.0.5', default_options : ['c_winlibs='])
3-
3+
if get_option('header_only')
4+
luajit_source_dir = include_directories('src')
5+
else
46
pkg = import('pkgconfig')
57

68
cc = meson.get_compiler('c')
@@ -21,6 +23,7 @@ if not get_option('use_prebuilt_libraries') or host_machine.system() in ['darwin
2123
c_args: lj_defines,
2224
name_prefix: lj_libprefix,
2325
dependencies: luajit_dependencies,
26+
build_by_default: false,
2427
install: true
2528
)
2629
else
@@ -39,11 +42,5 @@ luajit_dep = declare_dependency(
3942
link_args: lj_linkargs,
4043
)
4144

42-
meson.override_dependency('luajit', luajit_dep)
43-
44-
pkg.generate(libluajit,
45-
filebase : 'luajit',
46-
name : 'LuaJIT',
47-
description : 'Just-in-time compiler for Lua',
48-
url : 'http://luajit.org',
49-
)
45+
#meson.override_dependency('luajit', luajit_dep)
46+
endif
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11

2-
option('use_prebuilt_libraries', type: 'boolean', value: true, yield: true, description: 'On windows use the prebuilt libraries')
2+
option('use_prebuilt_libraries', type: 'boolean', value: true, yield: true, description: 'On windows use the prebuilt libraries')
3+
option('header_only', type: 'boolean', value: false, description: 'Only expose the header files')

external/sources/LuaJIT-2.1/src/host/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ buildvm = executable('buildvm',
3636
include_directories: luajit_source_dir,
3737
c_args: buildvm_defines,
3838
dependencies: libm,
39+
build_by_default: false,
3940
install: false,
4041
native: true
4142
)

external/sources/LuaJIT-2.1/src/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ endforeach
148148
vmdef = custom_target('vmdef.lua',
149149
input : ljlib_sources,
150150
output : 'vmdef.lua',
151-
build_by_default : true,
151+
build_by_default : false,
152152
install: true,
153153
install_dir: jitlib_install_dir,
154154
command : [buildvm, '-m', 'vmdef', '-o', '@OUTPUT@', '@INPUT@']

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ elif host_machine.system() == 'windows'
212212
sdl2 = subproject('SDL2-2.26.3')
213213
sdl2_dep = dependency('sdl2')
214214
luajit = subproject('LuaJIT-2.1')
215-
luajit_dep = dependency('luajit')
215+
luajit_dep = luajit.get_variable(luajit_dep)
216216
zlib = subproject('zlib-ng-2.1.3')
217217
zlib_dep = dependency('zlib')
218218
minizip = subproject('minizip-ng-4.0.0')

0 commit comments

Comments
 (0)