-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlib.lua
More file actions
91 lines (72 loc) · 2.86 KB
/
lib.lua
File metadata and controls
91 lines (72 loc) · 2.86 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
local BUILD_DIR = path.join("build", _ACTION)
if _OPTIONS["cc"] ~= nil then
BUILD_DIR = BUILD_DIR .. "_" .. _OPTIONS["cc"]
end
local TMT_DIR = "D:/Code/ImportantRepos/TomatoEngine/"
local BGFX_DIR = TMT_DIR.."vendor/bgfx/"
local BIMG_DIR = TMT_DIR.."vendor/bimg/"
local BX_DIR = TMT_DIR.."vendor/bx/"
local GLFW_DIR = TMT_DIR.."vendor/glfw/"
function setBxCompat()
filter "action:vs*"
includedirs { path.join(BX_DIR, "include/compat/msvc") }
filter { "system:windows", "action:gmake" }
includedirs { path.join(BX_DIR, "include/compat/mingw") }
filter { "system:macosx" }
includedirs { path.join(BX_DIR, "include/compat/osx") }
buildoptions { "-x objective-c++" }
buildoptions {
"/Zc:__cplusplus", -- Enable updated __cplusplus macro.
"/Zc:preprocessor", -- Enable preprocessor conformance mode.
}
end
project "tmgl"
kind "StaticLib"
language "C++"
cppdialect "C++20"
location "generated\\"
compileas "C++"
targetdir "bin/%{cfg.buildcfg}"
staticruntime "on"
buildoptions {
"/Zc:__cplusplus", -- Enable updated __cplusplus macro.
"/Zc:preprocessor", -- Enable preprocessor conformance mode.
}
includedirs {
path.join(BGFX_DIR, "include"),
path.join(BX_DIR, "include"),
path.join(BIMG_DIR, "include"),
path.join(GLFW_DIR, "include"),
"include/",
"vendor/"
}
libdirs { path.join(BGFX_DIR,".build/win64_vs2022/bin/") }
defines {"_CRT_SECURE_NO_WARNINGS", "GENERATOR_USE_GLM", "TOMATO_DLLBUILD",'MONO_HOME="C:/Program Files/Mono/"', 'MSBUILD_HOME="C:/Windows/Microsoft.NET/Framework/v4.0.30319/"', 'RENDERDOC_HOME="C:/Program Files/RenderDoc"'}
files {
"include/**",
"source/**",
"resources/**",
".editorconfig",
}
filter "system:windows"
links { "gdi32", "kernel32", "psapi", "opengl32" }
filter "system:linux"
links { "dl", "GL", "pthread", "X11" }
filter "system:macosx"
links { "QuartzCore.framework", "Metal.framework", "Cocoa.framework", "IOKit.framework", "CoreVideo.framework" }
filter "action:vs*"
defines{"_WINSOCK_DEPRECATED_NO_WARNINGS", "_CRT_SECURE_NO_WARNINGS"}
characterset ("MBCS")
libdirs {"./bin/%{cfg.buildcfg}"}
filter "configurations:Debug"
defines { "DEBUG", "BX_CONFIG_DEBUG=1" }
symbols "On"
debugdir "./"
runtime "Debug"
optimize "Off"
links { "bgfxDebug", "bimgDebug", "bxDebug", }
filter "configurations:Release"
defines { "NDEBUG", "BX_CONFIG_DEBUG=0" }
optimize "On"
runtime "Release"
links { "bgfxRelease", "bimgRelease", "bxRelease" }