mirror of
https://github.com/GTAmodding/re3.git
synced 2024-11-15 02:29:01 +00:00
premake: add no-full-paths option for CI builds, rename lto to with-lto
This commit is contained in:
parent
63d9d9c148
commit
be6e273930
3 changed files with 14 additions and 5 deletions
2
.github/workflows/re3_msvc_amd64.yml
vendored
2
.github/workflows/re3_msvc_amd64.yml
vendored
|
@ -34,7 +34,7 @@ jobs:
|
||||||
7z x ${{env.GLFW_FILE}}
|
7z x ${{env.GLFW_FILE}}
|
||||||
- name: Configure build
|
- name: Configure build
|
||||||
run: |
|
run: |
|
||||||
./premake5 vs2019 --with-librw --glfwdir64=${{env.GLFW_BASE}}
|
./premake5 vs2019 --with-librw --no-full-paths --glfwdir64=${{env.GLFW_BASE}}
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
msbuild -m build/re3.sln /property:Configuration=${{matrix.buildtype}} /property:Platform=${{matrix.platform}}
|
msbuild -m build/re3.sln /property:Configuration=${{matrix.buildtype}} /property:Platform=${{matrix.platform}}
|
||||||
|
|
2
.github/workflows/re3_msvc_x86.yml
vendored
2
.github/workflows/re3_msvc_x86.yml
vendored
|
@ -34,7 +34,7 @@ jobs:
|
||||||
7z x ${{env.GLFW_FILE}}
|
7z x ${{env.GLFW_FILE}}
|
||||||
- name: Configure build
|
- name: Configure build
|
||||||
run: |
|
run: |
|
||||||
./premake5 vs2019 --with-librw --glfwdir32=${{env.GLFW_BASE}}
|
./premake5 vs2019 --with-librw --no-full-paths --glfwdir32=${{env.GLFW_BASE}}
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
msbuild -m build/re3.sln /property:Configuration=${{matrix.buildtype}} /property:Platform=${{matrix.platform}}
|
msbuild -m build/re3.sln /property:Configuration=${{matrix.buildtype}} /property:Platform=${{matrix.platform}}
|
||||||
|
|
15
premake5.lua
15
premake5.lua
|
@ -27,14 +27,19 @@ newoption {
|
||||||
description = "Build with opus"
|
description = "Build with opus"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
newoption {
|
||||||
|
trigger = "with-lto",
|
||||||
|
description = "Build with link time optimization"
|
||||||
|
}
|
||||||
|
|
||||||
newoption {
|
newoption {
|
||||||
trigger = "no-git-hash",
|
trigger = "no-git-hash",
|
||||||
description = "Don't print git commit hash into binary"
|
description = "Don't print git commit hash into binary"
|
||||||
}
|
}
|
||||||
|
|
||||||
newoption {
|
newoption {
|
||||||
trigger = "lto",
|
trigger = "no-full-paths",
|
||||||
description = "Use link time optimization"
|
description = "Don't print full paths into binary"
|
||||||
}
|
}
|
||||||
|
|
||||||
if(_OPTIONS["with-librw"]) then
|
if(_OPTIONS["with-librw"]) then
|
||||||
|
@ -114,7 +119,7 @@ workspace "re3"
|
||||||
filter "configurations:not Debug"
|
filter "configurations:not Debug"
|
||||||
defines { "NDEBUG" }
|
defines { "NDEBUG" }
|
||||||
optimize "Speed"
|
optimize "Speed"
|
||||||
if(_OPTIONS["lto"]) then
|
if(_OPTIONS["with-lto"]) then
|
||||||
flags { "LinkTimeOptimization" }
|
flags { "LinkTimeOptimization" }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -327,6 +332,10 @@ project "re3"
|
||||||
linkoptions "/SAFESEH:NO"
|
linkoptions "/SAFESEH:NO"
|
||||||
characterset ("MBCS")
|
characterset ("MBCS")
|
||||||
targetextension ".exe"
|
targetextension ".exe"
|
||||||
|
if(_OPTIONS["no-full-paths"]) then
|
||||||
|
usefullpaths "off"
|
||||||
|
linkoptions "/PDBALTPATH:%_PDB%"
|
||||||
|
end
|
||||||
if(_OPTIONS["with-librw"]) then
|
if(_OPTIONS["with-librw"]) then
|
||||||
-- external librw is dynamic
|
-- external librw is dynamic
|
||||||
staticruntime "on"
|
staticruntime "on"
|
||||||
|
|
Loading…
Reference in a new issue