mirror of
https://github.com/GTAmodding/re3.git
synced 2021-02-19 17:49:54 +01:00
fix premake5.lua for macOS build, fix homebrew path, sperate CFLAGS and CXXFLAGS to avoid build failed
This commit is contained in:
parent
dfa0c8bf19
commit
f94a0a3b80
30
premake5.lua
30
premake5.lua
@ -137,11 +137,17 @@ workspace "reVC"
|
|||||||
filter { "platforms:*arm*" }
|
filter { "platforms:*arm*" }
|
||||||
architecture "ARM"
|
architecture "ARM"
|
||||||
|
|
||||||
filter { "platforms:macosx-arm64-*" }
|
filter { "platforms:macosx-arm64-*", "files:**.cpp"}
|
||||||
buildoptions { "-target", "arm64-apple-macos11", "-std=gnu++14" }
|
buildoptions {"-target", "arm64-apple-macos11", "--std=gnu++14"}
|
||||||
|
|
||||||
filter { "platforms:macosx-amd64-*" }
|
filter { "platforms:macosx-arm64-*", "files:**.c"}
|
||||||
buildoptions { "-target", "x86_64-apple-macos10.12", "-std=gnu++14" }
|
buildoptions {"-target", "arm64-apple-macos11"}
|
||||||
|
|
||||||
|
filter { "platforms:macosx-amd64-*", "files:**.cpp"}
|
||||||
|
buildoptions { "-target", "x86_64-apple-macos10.12", "--std=gnu++14"}
|
||||||
|
|
||||||
|
filter { "platforms:macosx-amd64-*", "files:**.c"}
|
||||||
|
buildoptions { "-target", "x86_64-apple-macos10.12"}
|
||||||
|
|
||||||
filter { "platforms:*librw_d3d9*" }
|
filter { "platforms:*librw_d3d9*" }
|
||||||
defines { "RW_D3D9" }
|
defines { "RW_D3D9" }
|
||||||
@ -204,9 +210,9 @@ project "librw"
|
|||||||
|
|
||||||
filter "platforms:macosx*"
|
filter "platforms:macosx*"
|
||||||
-- Support MacPorts and Homebrew
|
-- Support MacPorts and Homebrew
|
||||||
includedirs { "/opt/local/include" }
|
includedirs { "/opt/homebrew/include" }
|
||||||
includedirs {"/usr/local/include" }
|
includedirs {"/usr/local/include" }
|
||||||
libdirs { "/opt/local/lib" }
|
libdirs { "/opt/homebrew/lib" }
|
||||||
libdirs { "/usr/local/lib" }
|
libdirs { "/usr/local/lib" }
|
||||||
|
|
||||||
filter "platforms:*gl3_glfw*"
|
filter "platforms:*gl3_glfw*"
|
||||||
@ -342,15 +348,15 @@ project "reVC"
|
|||||||
libdirs { "vendor/openal-soft/libs/Win64" }
|
libdirs { "vendor/openal-soft/libs/Win64" }
|
||||||
|
|
||||||
filter "platforms:linux*oal"
|
filter "platforms:linux*oal"
|
||||||
links { "openal", "mpg123", "sndfile", "pthread", "X11" }
|
links { "openal", "mpg123", "sndfile", "pthread" }
|
||||||
|
|
||||||
filter "platforms:bsd*oal"
|
filter "platforms:bsd*oal"
|
||||||
links { "openal", "mpg123", "sndfile", "pthread", "X11" }
|
links { "openal", "mpg123", "sndfile", "pthread" }
|
||||||
|
|
||||||
filter "platforms:macosx*oal"
|
filter "platforms:macosx*oal"
|
||||||
links { "openal", "mpg123", "sndfile", "pthread" }
|
links { "openal", "mpg123", "sndfile", "pthread" }
|
||||||
includedirs { "/usr/local/opt/openal-soft/include" }
|
includedirs { "/opt/homebrew/opt/openal-soft/include" }
|
||||||
libdirs { "/usr/local/opt/openal-soft/lib" }
|
libdirs { "/opt/homebrew/opt/openal-soft/lib" }
|
||||||
|
|
||||||
if _OPTIONS["with-opus"] then
|
if _OPTIONS["with-opus"] then
|
||||||
filter {}
|
filter {}
|
||||||
@ -403,7 +409,7 @@ project "reVC"
|
|||||||
filter "platforms:macosx*gl3_glfw*"
|
filter "platforms:macosx*gl3_glfw*"
|
||||||
links { "glfw" }
|
links { "glfw" }
|
||||||
linkoptions { "-framework OpenGL" }
|
linkoptions { "-framework OpenGL" }
|
||||||
includedirs { "/opt/local/include" }
|
includedirs { "/opt/homebrew/include" }
|
||||||
includedirs { "/usr/local/include" }
|
includedirs { "/usr/local/include" }
|
||||||
libdirs { "/opt/local/lib" }
|
libdirs { "/opt/homebrew/lib/" }
|
||||||
libdirs { "/usr/local/lib" }
|
libdirs { "/usr/local/lib" }
|
||||||
|
Loading…
Reference in New Issue
Block a user