-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpremake5.lua
More file actions
70 lines (59 loc) · 2.02 KB
/
Copy pathpremake5.lua
File metadata and controls
70 lines (59 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
------------------------------------------------------------------------------
-- Utils
------------------------------------------------------------------------------
function local_require(path)
return dofile(path)
end
function this_directory()
local str = debug.getinfo(2, "S").source:sub(2)
local path = str:match("(.*/)")
return path:gsub("\\", "/") -- Replace \\ with /
end
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-- Bug fixes
------------------------------------------------------------------------------
-- Visual Studio: Bugfix for C++ Modules (same module file name per project)
-- https://github.com/premake/premake-core/issues/2177
require("vstudio")
premake.override(premake.vstudio.vc2010.elements, "clCompile", function(base, prj)
local m = premake.vstudio.vc2010
local calls = base(prj)
if premake.project.iscpp(prj) then
table.insertafter(calls, premake.xmlDeclaration, function()
premake.w('<ModuleDependenciesFile>$(IntDir)\\%%(RelativeDir)</ModuleDependenciesFile>')
premake.w('<ModuleOutputFile>$(IntDir)\\%%(RelativeDir)</ModuleOutputFile>')
premake.w('<ObjectFileName>$(IntDir)\\%%(RelativeDir)</ObjectFileName>')
end)
end
return calls
end)
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-- Solution
------------------------------------------------------------------------------
MacOSVersion = "14.5"
OutputDir = "%{cfg.buildcfg}-%{cfg.system}"
workspace "Photon"
architecture "x86_64"
startproject "Sandbox"
configurations
{
"Debug",
"Release",
"Dist"
}
flags
{
"MultiProcessorCompile"
}
group "Dependencies"
include "vendor/GameNetworkingSockets"
include "vendor/protobuf"
include "vendor/abseil"
group ""
group "Photon"
include "Photon"
group ""
include "Sandbox"
------------------------------------------------------------------------------