-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpremake5.lua
71 lines (60 loc) · 2.04 KB
/
premake5.lua
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
newoption {
trigger = "RenderAPI",
description = "Choose a particular 3D API for rendering",
default = "vulkan",
category = "Build Options",
allowed = {
{ "opengl", "OpenGL" },
{ "direct3d", "Direct3D (Windows only)" },
{ "vulkan", "Vulkan" }
}
}
workspace "BlackPearl"
--architecture "x86"
architecture "x86_64"
-- local renderApi = _OPTIONS["RenderAPI"]
print(_OPTIONS["RenderAPI"])
if _OPTIONS["RenderAPI"] == "opengl" then
startproject "Sandbox"
print("set startproject to Sandbox.")
elseif _OPTIONS["RenderAPI"] == "vulkan" then
startproject "SandboxVK"
print("set startproject to SandboxVK.")
elseif _OPTIONS["RenderAPI"] == "direct3d" then
startproject "SandboxDX"
print("set startproject to SandboxDX.")
else
print("Invalid RenderAPI option. Defaulting to SandboxVK.")
startproject "SandboxVK"
end
configurations
{
"Debug",
"Release",
"Dist"
}
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
-- Include directories relative to root folder (solution directory)
IncludeDir = {}
IncludeDir["GLFW"] = "BlackPearl/vendor/GLFW/include"
IncludeDir["Glad"] = "BlackPearl/vendor/Glad/include"
IncludeDir["ImGui"] = "BlackPearl/vendor/imgui"
IncludeDir["glm"] = "BlackPearl/vendor/glm"
IncludeDir["stb"] = "BlackPearl/vendor/stb"
IncludeDir["assimp"] = "BlackPearl/vendor/assimp/include"
IncludeDir["GLEW"] = "BlackPearl/vendor/GLEW/include"
IncludeDir["vulkan"] = "BlackPearl/vendor/VulkanSDK/1.3.236.0/Include"
IncludeDir["directxtex"] = "BlackPearl/vendor/directxtex_uwp.2022.7.30.1/include"
IncludeDir["directxmesh"] = "BlackPearl/vendor/directxmesh_desktop_win10.2022.7.30.1/include"
IncludeDir["ShaderMake"] = "BlackPearl/vendor/ShaderMake/include"
IncludeDir["hlslShader"] = "SandboxDX/assets/shaders_hlsl_h"
include "BlackPearl/vendor/GLFW"
include "BlackPearl/vendor/Glad"
include "BlackPearl/vendor/imgui"
include "BlackPearl/vendor/GLEW"
--include "BlackPearl/vendor/ShaderMake"
include "BlackPearl"
include "SandBox"
include "SandBoxVK"
include "SandBoxDX"
include "ShaderCompiler"