Skip to content

Commit 20dfb3e

Browse files
authored
Merge pull request #280 from Madreag/pr/luajit-windows-source-build
Switched LuaJIT to source build on Windows
2 parents 15a66e9 + 1008242 commit 20dfb3e

10 files changed

Lines changed: 28 additions & 18 deletions

File tree

RTEA.sln

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ VisualStudioVersion = 17.7.34018.315
44
MinimumVisualStudioVersion = 16.0
55
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RTEA", "RTEA.vcxproj", "{A58C9DD7-8BC7-48DA-9E04-04D04F582BE3}"
66
EndProject
7+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libluajit", "external\sources\LuaJIT-2.1\libluajit.vcxproj", "{9C341649-AA1F-35E8-81E3-228A6A09B2BB}"
8+
EndProject
79
Global
810
GlobalSection(SolutionConfigurationPlatforms) = preSolution
911
Debug Full|x64 = Debug Full|x64
@@ -23,6 +25,16 @@ Global
2325
{A58C9DD7-8BC7-48DA-9E04-04D04F582BE3}.Final|x64.Build.0 = Final|x64
2426
{A58C9DD7-8BC7-48DA-9E04-04D04F582BE3}.Profiling|x64.ActiveCfg = Profiling|x64
2527
{A58C9DD7-8BC7-48DA-9E04-04D04F582BE3}.Profiling|x64.Build.0 = Profiling|x64
28+
{9C341649-AA1F-35E8-81E3-228A6A09B2BB}.Debug Full|x64.ActiveCfg = Debug|x64
29+
{9C341649-AA1F-35E8-81E3-228A6A09B2BB}.Debug Full|x64.Build.0 = Debug|x64
30+
{9C341649-AA1F-35E8-81E3-228A6A09B2BB}.Debug Minimal|x64.ActiveCfg = RelWithDebInfo|x64
31+
{9C341649-AA1F-35E8-81E3-228A6A09B2BB}.Debug Minimal|x64.Build.0 = RelWithDebInfo|x64
32+
{9C341649-AA1F-35E8-81E3-228A6A09B2BB}.Debug Release|x64.ActiveCfg = RelWithDebInfo|x64
33+
{9C341649-AA1F-35E8-81E3-228A6A09B2BB}.Debug Release|x64.Build.0 = RelWithDebInfo|x64
34+
{9C341649-AA1F-35E8-81E3-228A6A09B2BB}.Final|x64.ActiveCfg = Release|x64
35+
{9C341649-AA1F-35E8-81E3-228A6A09B2BB}.Final|x64.Build.0 = Release|x64
36+
{9C341649-AA1F-35E8-81E3-228A6A09B2BB}.Profiling|x64.ActiveCfg = RelWithDebInfo|x64
37+
{9C341649-AA1F-35E8-81E3-228A6A09B2BB}.Profiling|x64.Build.0 = RelWithDebInfo|x64
2638
EndGlobalSection
2739
GlobalSection(SolutionProperties) = preSolution
2840
HideSolutionNode = FALSE

RTEA.vcxproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,6 +1486,11 @@
14861486
<None Include="cpp.hint" />
14871487
<None Include="Source\System\Semver200\version.inl" />
14881488
</ItemGroup>
1489+
<ItemGroup>
1490+
<ProjectReference Include="external\sources\LuaJIT-2.1\libluajit.vcxproj">
1491+
<Project>{9C341649-AA1F-35E8-81E3-228A6A09B2BB}</Project>
1492+
</ProjectReference>
1493+
</ItemGroup>
14891494
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
14901495
<ImportGroup Label="ExtensionTargets">
14911496
</ImportGroup>

external/sources/LuaJIT-2.1/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ src/*.lib
1414
buildvm_arch.h
1515

1616
_Bin/libluajit*
17+
_Bin/luajit-*
1718

1819

1920
#cmake
-4.02 MB
Binary file not shown.
-4.01 MB
Binary file not shown.
-1.49 MB
Binary file not shown.

external/sources/LuaJIT-2.1/meson.build

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,14 @@ dynasm = files('dynasm/dynasm.lua')
2020

2121
subdir('src')
2222

23-
if not get_option('use_prebuilt_libraries') or host_machine.system() in ['linux', 'darwin']
24-
libluajit = library(lj_libname, ljlib_sources + ljcore_sources + buildvm_headers,
25-
include_directories: luajit_source_dir,
26-
c_args: lj_defines,
27-
name_prefix: lj_libprefix,
28-
dependencies: luajit_dependencies,
29-
build_by_default: false,
30-
install: true
31-
)
32-
else
33-
libluajit = []
34-
if get_option('debug')
35-
luajit_dependencies += cc.find_library('luajit-debug', dirs: meson.current_source_dir()/'_Bin')
36-
else
37-
luajit_dependencies += cc.find_library('luajit-release', dirs: meson.current_source_dir()/'_Bin')
38-
endif
39-
endif
23+
libluajit = library(lj_libname, ljlib_sources + ljcore_sources + buildvm_headers,
24+
include_directories: luajit_source_dir,
25+
c_args: lj_defines,
26+
name_prefix: lj_libprefix,
27+
dependencies: luajit_dependencies,
28+
build_by_default: false,
29+
install: true
30+
)
4031

4132
luajit_dep = declare_dependency(
4233
dependencies : luajit_dependencies,
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
option('portable', type : 'boolean', value : false, description: 'portable install in a single directory')
22
option('app', type : 'boolean', value : true, description: 'Build the luajit executable')
3-
option('use_prebuilt_libraries', type: 'boolean', value: true, yield: true, description: 'On windows use the prebuilt libraries')

external/sources/LuaJIT-2.1/msvc-postbuild.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
cd %~dp0\src\
66

77
@setlocal
8+
@set PATH=.;%PATH%
89
@set LJCOMPILE=cl /nologo /c /O2 /W3 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_STDIO_INLINE=__declspec(dllexport)__inline
910
@set LJLINK=link /nologo
1011
@set LJMT=mt /nologo

external/sources/LuaJIT-2.1/msvc-prebuild.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
cd %~dp0\src\
66

77
@setlocal
8+
@set PATH=.;%PATH%
89
@set LJCOMPILE=cl /nologo /c /O2 /W3 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_STDIO_INLINE=__declspec(dllexport)__inline
910
@set LJLINK=link /nologo
1011
@set LJMT=mt /nologo

0 commit comments

Comments
 (0)