Skip to content

Commit 2900a15

Browse files
add option to select Lua lib, use ordinary Lua on Windows ARM64
1 parent 11913ef commit 2900a15

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.github/workflows/rebuildDependencies.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
- platform: windows-arm64
5252
os: windows-11-arm
5353
conan_profile: msvc-arm64
54+
conan_options: -o "&:lua_lib=lua"
5455
runs-on: ${{ matrix.os }}
5556
defaults:
5657
run:
@@ -158,6 +159,7 @@ jobs:
158159
159160
# TODO: remove LuaJIT when https://github.com/conan-io/conan-center-index/pull/26577 is merged
160161
- name: Build LuaJIT from PR changes
162+
if: ${{ !contains(matrix.conan_options, '"&:lua_lib=lua"') }}
161163
run: |
162164
cciForkRepo='cci-fork'
163165
branchName='vcmi'

conanfile.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ class VCMI(ConanFile):
1515
generators = "CMakeDeps"
1616

1717
_libRequires = [
18-
"luajit/2.1.0-beta3",
1918
"minizip/[^1.2.12]",
2019
"zlib/[^1.2.12]",
2120
]
@@ -33,10 +32,12 @@ class VCMI(ConanFile):
3332
options = {
3433
"target_pre_windows10": [True, False],
3534
"with_ffmpeg": [True, False],
35+
"lua_lib": [None, "luajit", "lua"]
3636
}
3737
default_options = {
3838
"target_pre_windows10": False,
3939
"with_ffmpeg": True,
40+
"lua_lib": "luajit",
4041
}
4142

4243
def config_options(self):
@@ -62,6 +63,14 @@ def requirements(self):
6263
else:
6364
self.requires(f"boost/[^{boostMinVersion}]")
6465

66+
if self.options.lua_lib:
67+
lib = str(self.options.lua_lib)
68+
libVersion = {
69+
"lua": "[^5.4.7]",
70+
"luajit": "2.1.0-beta3",
71+
}.get(lib)
72+
self.requires(f"{lib}/{libVersion}")
73+
6574
# client
6675
if self.options.with_ffmpeg:
6776
self.requires("ffmpeg/[>=4.4]")

0 commit comments

Comments
 (0)